From f02b43801b7bcb1d5fc6fe70f64c19f008da45b6 Mon Sep 17 00:00:00 2001 From: Roman Moravcik Date: Tue, 29 Mar 2011 11:30:26 +0200 Subject: [PATCH] Fixed build for Symbian target. --- gpsdata.pro | 19 +++++++++---------- src/compass.cpp | 16 ++++++++-------- src/compass.h | 12 ++++++------ src/mainwindow.cpp | 14 +++++++------- src/mainwindow.h | 2 +- src/satelliteview.cpp | 2 +- 6 files changed, 32 insertions(+), 33 deletions(-) diff --git a/gpsdata.pro b/gpsdata.pro index 4fa1b87..778a9c1 100644 --- a/gpsdata.pro +++ b/gpsdata.pro @@ -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. diff --git a/src/compass.cpp b/src/compass.cpp index 7636b46..081daa1 100644 --- a/src/compass.cpp +++ b/src/compass.cpp @@ -22,19 +22,19 @@ #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; diff --git a/src/compass.h b/src/compass.h index f30ea82..8462564 100644 --- a/src/compass.h +++ b/src/compass.h @@ -20,17 +20,17 @@ #ifndef COMPASS_H #define COMPASS_H -#ifdef QT_NO_OPENGL -#include +#ifndef QT_NO_OPENGL +# include #else -#include +# include #endif #include -#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 diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 892ed58..d790bc7 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -23,14 +23,14 @@ #include #ifdef Q_OS_SYMBIAN -#include -#include -#include -#include +# include +# include +# include +# include #endif #ifdef Q_WS_MAEMO_5 -#include +# include #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 &satell } #ifdef Q_OS_SYMBIAN -void MainWindow::satelliteSignalStrengthMenuClicked() +void MainWindow::onSatelliteSignalStrengthMenuClicked() { SatelliteSignalStrengthWindow *satelliteSignalStrengthWindow = new SatelliteSignalStrengthWindow(this); satelliteSignalStrengthWindow->setSatelliteInfoSource(m_satellite); diff --git a/src/mainwindow.h b/src/mainwindow.h index 8930707..9f55391 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -31,7 +31,7 @@ #include #ifdef Q_WS_MAEMO_5 -#include "satellitesignalstrength.h" +# include "satellitesignalstrength.h" #endif QTM_USE_NAMESPACE diff --git a/src/satelliteview.cpp b/src/satelliteview.cpp index d95deb3..73460f0 100644 --- a/src/satelliteview.cpp +++ b/src/satelliteview.cpp @@ -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 &satellites, bool inUseList) -- 1.7.9.5