summaryrefslogtreecommitdiff
path: root/src/plugins/position/gypsy
diff options
context:
space:
mode:
authorAlex Wilson <alex.wilson@nokia.com>2012-05-15 15:38:49 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-15 08:50:10 +0200
commitbc49b871f1c5c69ccefb18f87db1f3f94a995a56 (patch)
tree778d018a5729a4c672cb1cfe08cd807b3c4d27ee /src/plugins/position/gypsy
parentd9a01fd2df5068c8722ba358fe05f08ba39ca83e (diff)
downloadqtlocation-bc49b871f1c5c69ccefb18f87db1f3f94a995a56.tar.gz
Coding style fixes: whitespace around pointers/references
Change-Id: Ie527591e2d9a1578137136fb6664e86c43eed1bf Reviewed-by: Thomas Lowe <thomas.lowe@nokia.com> Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
Diffstat (limited to 'src/plugins/position/gypsy')
-rw-r--r--src/plugins/position/gypsy/qgeosatelliteinfosource_gypsy.cpp34
-rw-r--r--src/plugins/position/gypsy/qgeosatelliteinfosource_gypsy_p.h22
2 files changed, 28 insertions, 28 deletions
diff --git a/src/plugins/position/gypsy/qgeosatelliteinfosource_gypsy.cpp b/src/plugins/position/gypsy/qgeosatelliteinfosource_gypsy.cpp
index cbfb31ae..4c4606cb 100644
--- a/src/plugins/position/gypsy/qgeosatelliteinfosource_gypsy.cpp
+++ b/src/plugins/position/gypsy/qgeosatelliteinfosource_gypsy.cpp
@@ -59,10 +59,10 @@ static void satellites_changed (GypsySatellite *satellite,
#ifdef Q_LOCATION_GYPSY_DEBUG
qDebug() << "QGeoSatelliteInfoSourceGypsy Gypsy satellites-changed -signal received.";
#endif
- ((QGeoSatelliteInfoSourceGypsy*)userdata)->satellitesChanged(satellite, satellites);
+ ((QGeoSatelliteInfoSourceGypsy *)userdata)->satellitesChanged(satellite, satellites);
}
-SatelliteGypsyEngine::SatelliteGypsyEngine(QGeoSatelliteInfoSource* parent) :
+SatelliteGypsyEngine::SatelliteGypsyEngine(QGeoSatelliteInfoSource *parent) :
m_owner(parent)
{
}
@@ -72,7 +72,7 @@ SatelliteGypsyEngine::~SatelliteGypsyEngine()
// Glib symbols
gulong SatelliteGypsyEngine::eng_g_signal_connect(gpointer instance,
- const gchar* detailed_signal,
+ const gchar *detailed_signal,
GCallback c_handler,
gpointer data)
{
@@ -90,11 +90,11 @@ void SatelliteGypsyEngine::eng_g_free(gpointer mem)
return ::g_free(mem);
}
// Gypsy symbols
-GypsyControl* SatelliteGypsyEngine::eng_gypsy_control_get_default (void)
+GypsyControl *SatelliteGypsyEngine::eng_gypsy_control_get_default (void)
{
return ::gypsy_control_get_default();
}
-char *SatelliteGypsyEngine::eng_gypsy_control_create (GypsyControl *control, const char*device_name, GError **error)
+char *SatelliteGypsyEngine::eng_gypsy_control_create (GypsyControl *control, const char *device_name, GError **error)
{
return ::gypsy_control_create(control, device_name, error);
}
@@ -133,11 +133,11 @@ void SatelliteGypsyEngine::eng_gypsy_satellite_free_satellite_array (GPtrArray *
return ::gypsy_satellite_free_satellite_array(satellites);
}
// GConf symbols (mockability due to X11 requirement)
-GConfClient* SatelliteGypsyEngine::eng_gconf_client_get_default(void)
+GConfClient *SatelliteGypsyEngine::eng_gconf_client_get_default(void)
{
return ::gconf_client_get_default();
}
-gchar* SatelliteGypsyEngine::eng_gconf_client_get_string(GConfClient* client, const gchar* key, GError** err)
+gchar *SatelliteGypsyEngine::eng_gconf_client_get_string(GConfClient *client, const gchar *key, GError** err)
{
return ::gconf_client_get_string(client, key, err);
}
@@ -158,7 +158,7 @@ void QGeoSatelliteInfoSourceGypsy::createEngine()
QGeoSatelliteInfoSourceGypsy::~QGeoSatelliteInfoSourceGypsy()
{
- GError* error = NULL;
+ GError *error = NULL;
if (m_device) {
m_engine->eng_gypsy_device_stop (m_device, &error);
g_object_unref(m_device);
@@ -171,8 +171,8 @@ QGeoSatelliteInfoSourceGypsy::~QGeoSatelliteInfoSourceGypsy()
delete m_engine;
}
-void QGeoSatelliteInfoSourceGypsy::satellitesChanged(GypsySatellite* satellite,
- GPtrArray* satellites)
+void QGeoSatelliteInfoSourceGypsy::satellitesChanged(GypsySatellite *satellite,
+ GPtrArray *satellites)
{
if (!satellite || !satellites)
return;
@@ -185,7 +185,7 @@ void QGeoSatelliteInfoSourceGypsy::satellitesChanged(GypsySatellite* satellite,
unsigned int i;
for (i = 0; i < satellites->len; i++) {
- GypsySatelliteDetails *details = (GypsySatelliteDetails*)satellites->pdata[i];
+ GypsySatelliteDetails *details = (GypsySatelliteDetails *)satellites->pdata[i];
QGeoSatelliteInfo info;
info.setAttribute(QGeoSatelliteInfo::Elevation, details->elevation);
info.setAttribute(QGeoSatelliteInfo::Azimuth, details->azimuth);
@@ -202,7 +202,7 @@ void QGeoSatelliteInfoSourceGypsy::satellitesChanged(GypsySatellite* satellite,
m_requestOngoing = false;
// If there is no regular updates ongoing, disconnect now.
if (!m_updatesOngoing) {
- m_engine->eng_g_signal_handlers_disconnect_by_func(G_OBJECT(m_satellite), (void*)satellites_changed, this);
+ m_engine->eng_g_signal_handlers_disconnect_by_func(G_OBJECT(m_satellite), (void *)satellites_changed, this);
}
}
// If regular updates are to be delivered as they come:
@@ -219,8 +219,8 @@ int QGeoSatelliteInfoSourceGypsy::init()
{
GError *error = NULL;
char *path;
- GConfClient* client;
- gchar* device_name;
+ GConfClient *client;
+ gchar *device_name;
g_type_init ();
createEngine();
@@ -306,7 +306,7 @@ void QGeoSatelliteInfoSourceGypsy::stopUpdates()
// is completed and it notices that there is no active update ongoing, it will disconnect
// the signal.
if (!m_requestTimer.isActive())
- m_engine->eng_g_signal_handlers_disconnect_by_func(G_OBJECT(m_satellite), (void*)satellites_changed, this);
+ m_engine->eng_g_signal_handlers_disconnect_by_func(G_OBJECT(m_satellite), (void *)satellites_changed, this);
}
void QGeoSatelliteInfoSourceGypsy::requestUpdate(int timeout)
@@ -326,7 +326,7 @@ void QGeoSatelliteInfoSourceGypsy::requestUpdate(int timeout)
#ifdef Q_LOCATION_GYPSY_DEBUG
qDebug() << "QGeoSatelliteInfoSourceGypsy fix available, requesting current satellite data";
#endif
- GPtrArray* satelliteData = m_engine->eng_gypsy_satellite_get_satellites(m_satellite, &error);
+ GPtrArray *satelliteData = m_engine->eng_gypsy_satellite_get_satellites(m_satellite, &error);
if (!error) {
// The fix was available and we have satellite data to deliver right away.
satellitesChanged(m_satellite, satelliteData);
@@ -358,7 +358,7 @@ void QGeoSatelliteInfoSourceGypsy::requestUpdateTimeout()
// Emit timeout and disconnect from signal if regular updates are not
// ongoing (as we were listening just for one single requestUpdate).
if (!m_updatesOngoing) {
- m_engine->eng_g_signal_handlers_disconnect_by_func(G_OBJECT(m_satellite), (void*)satellites_changed, this);
+ m_engine->eng_g_signal_handlers_disconnect_by_func(G_OBJECT(m_satellite), (void *)satellites_changed, this);
}
m_requestOngoing = false;
emit requestTimeout();
diff --git a/src/plugins/position/gypsy/qgeosatelliteinfosource_gypsy_p.h b/src/plugins/position/gypsy/qgeosatelliteinfosource_gypsy_p.h
index 956836ad..a6079a8e 100644
--- a/src/plugins/position/gypsy/qgeosatelliteinfosource_gypsy_p.h
+++ b/src/plugins/position/gypsy/qgeosatelliteinfosource_gypsy_p.h
@@ -70,11 +70,11 @@ QT_BEGIN_NAMESPACE
class SatelliteGypsyEngine
{
public:
- SatelliteGypsyEngine(QGeoSatelliteInfoSource* parent = 0);
+ SatelliteGypsyEngine(QGeoSatelliteInfoSource *parent = 0);
virtual ~SatelliteGypsyEngine();
// Glib symbols
virtual gulong eng_g_signal_connect(gpointer instance,
- const gchar* detailed_signal,
+ const gchar *detailed_signal,
GCallback c_handler,
gpointer data);
virtual guint eng_g_signal_handlers_disconnect_by_func(gpointer instance,
@@ -82,8 +82,8 @@ public:
gpointer data);
virtual void eng_g_free(gpointer mem);
// Gypsy symbols
- virtual GypsyControl* eng_gypsy_control_get_default (void);
- virtual char *eng_gypsy_control_create (GypsyControl *control, const char*device_name, GError **error);
+ virtual GypsyControl *eng_gypsy_control_get_default (void);
+ virtual char *eng_gypsy_control_create (GypsyControl *control, const char *device_name, GError **error);
virtual GypsyDevice *eng_gypsy_device_new (const char *object_path);
virtual GypsySatellite *eng_gypsy_satellite_new (const char *object_path);
virtual gboolean eng_gypsy_device_start (GypsyDevice *device, GError **error);
@@ -92,10 +92,10 @@ public:
virtual GPtrArray *eng_gypsy_satellite_get_satellites (GypsySatellite *satellite, GError **error);
virtual void eng_gypsy_satellite_free_satellite_array (GPtrArray *satellites);
// GConf symbols (mockability due to X11 requirement)
- virtual GConfClient* eng_gconf_client_get_default(void);
- virtual gchar* eng_gconf_client_get_string(GConfClient* client, const gchar* key, GError** err);
+ virtual GConfClient *eng_gconf_client_get_default(void);
+ virtual gchar *eng_gconf_client_get_string(GConfClient *client, const gchar *key, GError** err);
protected:
- QGeoSatelliteInfoSource* m_owner;
+ QGeoSatelliteInfoSource *m_owner;
};
class QGeoSatelliteInfoSourceGypsy : public QGeoSatelliteInfoSource
@@ -111,7 +111,7 @@ public slots:
virtual void startUpdates();
void stopUpdates();
void requestUpdate(int timeout = 5000);
- void satellitesChanged(GypsySatellite* satellite, GPtrArray* satellites);
+ void satellitesChanged(GypsySatellite *satellite, GPtrArray *satellites);
signals:
void satellitesInViewUpdated(const QList<QGeoSatelliteInfo> &satellites);
@@ -124,12 +124,12 @@ protected:
// Creates an engine which encapsulates all used symbols
// that we want to be also able to mock.
virtual void createEngine();
- SatelliteGypsyEngine* m_engine;
+ SatelliteGypsyEngine *m_engine;
private:
Q_DISABLE_COPY(QGeoSatelliteInfoSourceGypsy)
- GypsySatellite* m_satellite;
- GypsyDevice* m_device;
+ GypsySatellite *m_satellite;
+ GypsyDevice *m_device;
QTimer m_requestTimer;
bool m_updatesOngoing;
bool m_requestOngoing;