Fixed build for Symbian target.
authorRoman Moravcik <roman.moravcik@gmail.com>
Tue, 29 Mar 2011 09:30:26 +0000 (11:30 +0200)
committerRoman Moravcik <roman.moravcik@gmail.com>
Tue, 29 Mar 2011 09:30:26 +0000 (11:30 +0200)
gpsdata.pro
src/compass.cpp
src/compass.h
src/mainwindow.cpp
src/mainwindow.h
src/satelliteview.cpp

index 4fa1b87..778a9c1 100644 (file)
@@ -10,20 +10,13 @@ DEFINES += ORIENTATIONLOCK
 # Needs to be defined for Symbian
 #DEFINES += NETWORKACCESS
 
-symbian {
-TARGET.UID3 = 0xECDDA32D
-TARGET.CAPABILITY = Location
-}
-
 # If your application uses the Qt Mobility libraries, uncomment
 # the following lines and add the respective components to the 
 # MOBILITY variable. 
 CONFIG += mobility
 MOBILITY += location
 
-QT += dbus
-
-contains(QT_CONFIG, opengl): QT += opengl
+QT += dbus opengl
 
 SOURCES += \
     src/satelliteviewwindow.cpp \
@@ -43,8 +36,14 @@ HEADERS += \
 FORMS += 
 
 symbian {
-SOURCES += src/satellitesignalstrengthwindow.cpp
-HEADERS += src/satellitesignalstrengthwindow.h
+    SOURCES += src/satellitesignalstrengthwindow.cpp
+    HEADERS += src/satellitesignalstrengthwindow.h
+
+    QT -= dbus opengl
+    DEFINES += QT_NO_OPENGL
+
+    TARGET.UID3 = 0xECDDA32D
+    TARGET.CAPABILITY = Location
 }
 
 # Please do not modify the following two lines. Required for deployment.
index 7636b46..081daa1 100644 (file)
 #include "compass.h"
 
 #ifndef M_PI
-#define M_PI 3.14159265358979323846
+# define M_PI 3.14159265358979323846
 #endif
 
 #ifdef Q_WS_MAEMO_5
-#define LABEL_FONT_HIGH 44
+# define LABEL_FONT_HIGH 44
 #else
-#define LABEL_FONT_HIGH 14
+# define LABEL_FONT_HIGH 14
 #endif
 
 #ifdef Q_WS_MAEMO_5
-#define LABEL_FONT_SMALL 26
+# define LABEL_FONT_SMALL 26
 #else
-#define LABEL_FONT_SMALL 8
+# define LABEL_FONT_SMALL 8
 #endif
 
 #define GPS_MIN_GROUND_SPEED 1  /* 3.6 km/h */
@@ -324,10 +324,10 @@ void Compass::moveTimerEvent()
     update();
 }
 
-#ifdef QT_NO_OPENGL
-Compass::Compass(CompassType type) : QWidget()
-#else
+#ifndef QT_NO_OPENGL
 Compass::Compass(CompassType type) : QGLWidget(QGLFormat(QGL::SampleBuffers), 0)
+#else
+Compass::Compass(CompassType type) : QWidget()
 #endif
 {
     m_type = type;
index f30ea82..8462564 100644 (file)
 #ifndef COMPASS_H
 #define COMPASS_H
 
-#ifdef QT_NO_OPENGL
-#include <QWidget>
+#ifndef QT_NO_OPENGL
+# include <QGLWidget>
 #else
-#include <QGLWidget>
+# include <QWidget>
 #endif
 #include <QTimer>
 
-#ifdef QT_NO_OPENGL
-class Compass : public QWidget
-#else
+#ifndef QT_NO_OPENGL
 class Compass : public QGLWidget
+#else
+class Compass : public QWidget
 #endif
 {
   Q_OBJECT
index 892ed58..d790bc7 100644 (file)
 #include <qnumeric.h>
 
 #ifdef Q_OS_SYMBIAN
-#include <eikenv.h>
-#include <eikappui.h>
-#include <aknenv.h>
-#include <aknappui.h>
+# include <eikenv.h>
+# include <eikappui.h>
+# include <aknenv.h>
+# include <aknappui.h>
 #endif
 
 #ifdef Q_WS_MAEMO_5
-#include <QtDBus>
+# include <QtDBus>
 #endif
 
 #include "mainwindow.h"
@@ -38,7 +38,7 @@
 #include "satelliteviewwindow.h"
 
 #ifdef Q_OS_SYMBIAN
-#include "satellitesignalstrengthwindow.h"
+# include "satellitesignalstrengthwindow.h"
 #endif
 
 MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
@@ -376,7 +376,7 @@ void MainWindow::onSatellitesInUseUpdated(const QList<QGeoSatelliteInfo> &satell
 }
 
 #ifdef Q_OS_SYMBIAN
-void MainWindow::satelliteSignalStrengthMenuClicked()
+void MainWindow::onSatelliteSignalStrengthMenuClicked()
 {
     SatelliteSignalStrengthWindow *satelliteSignalStrengthWindow = new SatelliteSignalStrengthWindow(this);
     satelliteSignalStrengthWindow->setSatelliteInfoSource(m_satellite);
index 8930707..9f55391 100644 (file)
@@ -31,7 +31,7 @@
 #include <QGeoSatelliteInfoSource>
 
 #ifdef Q_WS_MAEMO_5
-#include "satellitesignalstrength.h"
+# include "satellitesignalstrength.h"
 #endif
 
 QTM_USE_NAMESPACE
index d95deb3..73460f0 100644 (file)
@@ -22,7 +22,7 @@
 #include "satelliteview.h"
 
 #ifndef M_PI
-#define M_PI 3.14159265358979323846
+# define M_PI 3.14159265358979323846
 #endif
 
 void SatelliteView::updateWidget(const QList<QGeoSatelliteInfo> &satellites, bool inUseList)