Changes: Changed the route table to a layout of buttons and tamed the layouts a bit.
authorMax Waterman <david.waterman@nokia.com>
Tue, 20 Apr 2010 06:35:46 +0000 (09:35 +0300)
committerMax Waterman <david.waterman@nokia.com>
Tue, 20 Apr 2010 07:22:04 +0000 (10:22 +0300)
zouba/src/gpscontroller.cpp
zouba/src/gpscontroller_p.cpp
zouba/src/gpscontroller_p.h
zouba/src/location.cpp
zouba/src/ui.cpp
zouba/src/ui.h
zouba/src/uicontroller.cpp
zouba/tests/ut_gpscontroller/Makefile
zouba/tests/ut_gpscontroller/ut_gpscontroller
zouba/tests/ut_gpscontroller/ut_gpscontroller.cpp
zouba/tests/ut_gpscontroller/ut_gpscontroller.pro

index abecb2d..32568b0 100644 (file)
@@ -1,8 +1,6 @@
 #include "gpscontroller.h"
 #include "gpscontroller_p.h"
 
-#include "locations.h"
-
 #include <QObject>
 #include <QGeoPositionInfo>
 #include <QGeoPositionInfoSource>
@@ -32,8 +30,7 @@ void GpsController::getGps()
   Location *location;
 
   if ( q->useFakeLocation() ) {
-    Locations *locations = Locations::instance();
-    location = locations->location( q->fakeLocationLabel() );
+    location = q->fakeLocation();
   } else {
     location = q->liveLocation();
   }
@@ -52,15 +49,14 @@ void GpsController::useFakeGps( const QString &fakeLocationLabel )
 {
   qDebug() << "using fake gps (" << fakeLocationLabel << ")";
 
-  Locations *locations = Locations::instance();
-  Location  *fakeLocation = locations->location( fakeLocationLabel );
+  q->setFakeLocationLabel( fakeLocationLabel );
+  Location  *fakeLocation = q->fakeLocation();
 
   if ( fakeLocation == 0 ) {
     qDebug() << "invalid fake location label; cannot use fake location";
   } else {
     q->stopGps();
     q->setUseFakeLocation( true );
-    q->setFakeLocationLabel( fakeLocationLabel );
     emit locationChanged( fakeLocation );
   }
 }
index ff60837..537d10a 100644 (file)
@@ -1,6 +1,7 @@
 #include "gpscontroller_p.h"
 
 #include "location.h"
+#include "locations.h"
 
 #include <QObject>
 #include <QGeoPositionInfo>
@@ -59,6 +60,13 @@ Location *GpsControllerPrivate::liveLocation()
   return m_liveLocation;
 }
 
+Location *GpsControllerPrivate::fakeLocation()
+{
+  Locations *locations = Locations::instance();
+  Location  *location = locations->location( fakeLocationLabel() );
+  return location;
+}
+
 QString GpsControllerPrivate::fakeLocationLabel()
 {
   return m_fakeLocationLabel;
index 8958d90..46bd6c9 100644 (file)
@@ -26,6 +26,7 @@ public:
 
     virtual QGeoPositionInfoSource *gps();
     virtual Location               *liveLocation();
+    virtual Location               *fakeLocation();
     virtual QString                 fakeLocationLabel();
     virtual bool                    useFakeLocation();
 
index 95f7c8a..d7761fd 100644 (file)
@@ -33,7 +33,6 @@ Location::Location( const QString &x, const QString &y, const QString &label ) :
   q( new LocationPrivate( x, y, label ) ),
   manager( new QNetworkAccessManager(this) )
 {
-  qDebug() << "Location::Location(" << x << "," << y << "," << label <<")";
   connect(
       manager, SIGNAL( finished(QNetworkReply*) ),
       this, SLOT( replyFinished(QNetworkReply*) )
@@ -67,7 +66,6 @@ Location::Location( const Location &from ) :
   q( new LocationPrivate( from.label() ) ),
   manager(0)
 {
-  qDebug() << "Location::Location( const Location [" << from.label() << "] )";
   q->setAddress( from.address() );
   q->setX( from.x() );
   q->setY( from.y() );
@@ -82,7 +80,6 @@ Location::Location( const QString &label ) :
   q( new LocationPrivate( label ) ),
   manager( new QNetworkAccessManager(this) )
 {
-  qDebug() << "Location::Location( const QString &label=" << label << " )";
   connect( manager, SIGNAL( finished(QNetworkReply*) ), this, SLOT( replyFinished(QNetworkReply*) ) );
 }
 
@@ -96,7 +93,6 @@ Location::~Location()
 
 Location &Location::operator=( const Location &from )
 {
-  qDebug() << "Location::Location( const Location &from )";
   q = new LocationPrivate( from.label() );
   q->setAddress( from.address() );
   q->setX( from.x() );
@@ -115,8 +111,7 @@ Location &Location::operator=( const Location &from )
 
 void Location::resolveAddress( const QString &address )
 {
-  qDebug() << "resolving address";
-  qDebug() << address;
+  qDebug() << "resolving address (" << address << ")";
 
   q->setAddress( address );
   q->setValid( false );
index aea68b6..1b6784f 100644 (file)
@@ -2,6 +2,7 @@
 
 #include "messagetable.h"
 #include "locations.h"
+#include "ytv.h"
 
 #include <QMainWindow>
 #include <QRadioButton>
@@ -24,7 +25,7 @@ MessageTable *Ui::messageTable = 0;
 Ui::Ui() :
   centralWidget(0),
   destinationButtons(0),
-  routeTable(0),
+  routeStack(0),
   usingFakeGps( false ),
   messagesShown( false ),
   fakeLocationLabel( "work" )
@@ -84,15 +85,19 @@ void Ui::setupUi( QMainWindow *mainWindow )
   destinationButtons->addButton( workButton, WorkButtonId );
   destinationButtons->setExclusive( true );
 
-  routeTable = new QTableWidget( 1, 2 );
-  QStringList columnHeaders;
-  columnHeaders << "Time" << "Bus";
-  routeTable->setHorizontalHeaderLabels( columnHeaders );
-  routeTable->verticalHeader()->hide();
-  routeTable->setSelectionMode( QAbstractItemView::SingleSelection );
+  routeStack = new QVBoxLayout();
+  for ( int i=0; i<Ytv::ShowFiveResults; ++i ) {
+    QRadioButton *button = new QRadioButton();
+    button->setObjectName( "routeButton"+i );
+    button->setEnabled( false );
+
+    routeStack->addWidget( button, i );
+  }
+  routeStack->addStretch();
 
   QHBoxLayout *topLayout = new QHBoxLayout();
-  topLayout->addWidget( routeTable );
+  topLayout->addLayout( routeStack );
+  topLayout->addStretch();
 
   buttonLayout = new QGridLayout();
   buttonLayout->addWidget( homeButton, 0, 0 );
index c64d869..2a30cf8 100644 (file)
@@ -36,7 +36,7 @@ public:
 
   QWidget *centralWidget;
   QButtonGroup *destinationButtons;
-  QTableWidget *routeTable;
+  QVBoxLayout *routeStack;
   static MessageTable *messageTable;
   QHBoxLayout *mainLayout;
   QGridLayout *buttonLayout;
index 31d2b9f..28d4232 100644 (file)
@@ -7,10 +7,11 @@
 #include "locations.h"
 
 #include <QObject>
-#include <QTableWidgetItem>
 #include <QPushButton>
 #include <QDebug>
 #include <QButtonGroup>
+#include <QRadioButton>
+#include <QVBoxLayout>
 
 UiController::UiController( Ui *ui ) :
   ui(ui)
@@ -99,13 +100,23 @@ void UiController::displayRoute( const QList<RouteData> &routeData )
 {
   qDebug() << "displaying route";
 
-  ui->routeTable->setRowCount( routeData.count() );
+  for ( int i=0; i<Ytv::ShowFiveResults; ++i ) {
+    QString label;
 
-  for ( int i=0; i<routeData.count(); i++ ) {
-    QTableWidgetItem *timeItem = new QTableWidgetItem( routeData.at(i).arrivalTime );
-    ui->routeTable->setItem( i, 0, timeItem );
+    QWidget *widget = ui->routeStack->itemAt( i )->widget();
+    QRadioButton *button = qobject_cast<QRadioButton *>(widget);
 
-    QTableWidgetItem *lineItem = new QTableWidgetItem( routeData.at(i).lineCode );
-    ui->routeTable->setItem( i, 1, lineItem );
+    if ( i<routeData.count() ) {
+      RouteData thisRouteData = routeData.at(i);
+      label = ( QStringList()
+          << thisRouteData.arrivalTime
+          << thisRouteData.lineCode ).join( "/" );
+      button->setEnabled( true );
+    } else {
+      button->setEnabled( false );
+    }
+
+    button->setText( label );
   }
+
 }
index 6b92eb4..fbab136 100644 (file)
@@ -1,6 +1,6 @@
 #############################################################################
 # Makefile for building: ut_gpscontroller
-# Generated by qmake (2.01a) (Qt 4.6.2) on: Mon Apr 19 11:20:53 2010
+# Generated by qmake (2.01a) (Qt 4.6.2) on: Tue Apr 20 10:09:10 2010
 # Project:  ut_gpscontroller.pro
 # Template: app
 # Command: /usr/bin/qmake -unix -o Makefile ut_gpscontroller.pro
@@ -46,20 +46,24 @@ OBJECTS_DIR   = ./
 SOURCES       = ut_gpscontroller.cpp \
                ../../src/gpscontroller.cpp \
                ../../src/gpscontroller_p.cpp \
+               ../../src/locations.cpp \
                ../../src/location.cpp \
                ../../src/location_p.cpp moc_ut_gpscontroller.cpp \
                moc_gpscontroller.cpp \
                moc_gpscontroller_p.cpp \
+               moc_locations.cpp \
                moc_location.cpp \
                moc_location_p.cpp
 OBJECTS       = ut_gpscontroller.o \
                gpscontroller.o \
                gpscontroller_p.o \
+               locations.o \
                location.o \
                location_p.o \
                moc_ut_gpscontroller.o \
                moc_gpscontroller.o \
                moc_gpscontroller_p.o \
+               moc_locations.o \
                moc_location.o \
                moc_location_p.o
 DIST          = /targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/common/unix.conf \
@@ -169,7 +173,7 @@ qmake:  FORCE
 
 dist: 
        @$(CHK_DIR_EXISTS) .tmp/ut_gpscontroller1.0.0 || $(MKDIR) .tmp/ut_gpscontroller1.0.0 
-       $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/ut_gpscontroller1.0.0/ && $(COPY_FILE) --parents ut_gpscontroller.h ../../src/gpscontroller.h ../../src/gpscontroller_p.h ../../src/location.h ../../src/location_p.h .tmp/ut_gpscontroller1.0.0/ && $(COPY_FILE) --parents ut_gpscontroller.cpp ../../src/gpscontroller.cpp ../../src/gpscontroller_p.cpp ../../src/location.cpp ../../src/location_p.cpp .tmp/ut_gpscontroller1.0.0/ && (cd `dirname .tmp/ut_gpscontroller1.0.0` && $(TAR) ut_gpscontroller1.0.0.tar ut_gpscontroller1.0.0 && $(COMPRESS) ut_gpscontroller1.0.0.tar) && $(MOVE) `dirname .tmp/ut_gpscontroller1.0.0`/ut_gpscontroller1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/ut_gpscontroller1.0.0
+       $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/ut_gpscontroller1.0.0/ && $(COPY_FILE) --parents ut_gpscontroller.h ../../src/gpscontroller.h ../../src/gpscontroller_p.h ../../src/locations.h ../../src/location.h ../../src/location_p.h .tmp/ut_gpscontroller1.0.0/ && $(COPY_FILE) --parents ut_gpscontroller.cpp ../../src/gpscontroller.cpp ../../src/gpscontroller_p.cpp ../../src/locations.cpp ../../src/location.cpp ../../src/location_p.cpp .tmp/ut_gpscontroller1.0.0/ && (cd `dirname .tmp/ut_gpscontroller1.0.0` && $(TAR) ut_gpscontroller1.0.0.tar ut_gpscontroller1.0.0 && $(COMPRESS) ut_gpscontroller1.0.0.tar) && $(MOVE) `dirname .tmp/ut_gpscontroller1.0.0`/ut_gpscontroller1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/ut_gpscontroller1.0.0
 
 
 clean:compiler_clean 
@@ -191,9 +195,9 @@ mocclean: compiler_moc_header_clean compiler_moc_source_clean
 
 mocables: compiler_moc_header_make_all compiler_moc_source_make_all
 
-compiler_moc_header_make_all: moc_ut_gpscontroller.cpp moc_gpscontroller.cpp moc_gpscontroller_p.cpp moc_location.cpp moc_location_p.cpp
+compiler_moc_header_make_all: moc_ut_gpscontroller.cpp moc_gpscontroller.cpp moc_gpscontroller_p.cpp moc_locations.cpp moc_location.cpp moc_location_p.cpp
 compiler_moc_header_clean:
-       -$(DEL_FILE) moc_ut_gpscontroller.cpp moc_gpscontroller.cpp moc_gpscontroller_p.cpp moc_location.cpp moc_location_p.cpp
+       -$(DEL_FILE) moc_ut_gpscontroller.cpp moc_gpscontroller.cpp moc_gpscontroller_p.cpp moc_locations.cpp moc_location.cpp moc_location_p.cpp
 moc_ut_gpscontroller.cpp: ut_gpscontroller.h
        /usr/bin/moc $(DEFINES) $(INCPATH) ut_gpscontroller.h -o moc_ut_gpscontroller.cpp
 
@@ -206,6 +210,11 @@ moc_gpscontroller.cpp: ../../src/location.h \
 moc_gpscontroller_p.cpp: ../../src/gpscontroller_p.h
        /usr/bin/moc $(DEFINES) $(INCPATH) ../../src/gpscontroller_p.h -o moc_gpscontroller_p.cpp
 
+moc_locations.cpp: ../../src/location.h \
+               ../../src/location_p.h \
+               ../../src/locations.h
+       /usr/bin/moc $(DEFINES) $(INCPATH) ../../src/locations.h -o moc_locations.cpp
+
 moc_location.cpp: ../../src/location_p.h \
                ../../src/location.h
        /usr/bin/moc $(DEFINES) $(INCPATH) ../../src/location.h -o moc_location.cpp
@@ -243,9 +252,15 @@ gpscontroller.o: ../../src/gpscontroller.cpp ../../src/gpscontroller.h \
 
 gpscontroller_p.o: ../../src/gpscontroller_p.cpp ../../src/gpscontroller_p.h \
                ../../src/location.h \
-               ../../src/location_p.h
+               ../../src/location_p.h \
+               ../../src/locations.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o gpscontroller_p.o ../../src/gpscontroller_p.cpp
 
+locations.o: ../../src/locations.cpp ../../src/locations.h \
+               ../../src/location.h \
+               ../../src/location_p.h
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o locations.o ../../src/locations.cpp
+
 location.o: ../../src/location.cpp ../../src/location.h \
                ../../src/location_p.h \
                ../../src/ytv.h
@@ -263,6 +278,9 @@ moc_gpscontroller.o: moc_gpscontroller.cpp
 moc_gpscontroller_p.o: moc_gpscontroller_p.cpp 
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_gpscontroller_p.o moc_gpscontroller_p.cpp
 
+moc_locations.o: moc_locations.cpp 
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_locations.o moc_locations.cpp
+
 moc_location.o: moc_location.cpp 
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_location.o moc_location.cpp
 
index 5a810c2..ddabd08 100755 (executable)
Binary files a/zouba/tests/ut_gpscontroller/ut_gpscontroller and b/zouba/tests/ut_gpscontroller/ut_gpscontroller differ
index bbe467c..e391645 100644 (file)
@@ -16,30 +16,37 @@ public:
   void stopGps();
 
   void setGps( QGeoPositionInfoSource *gps );
-  void setCurrentLocation( Location *location );
+  void setFakeLocationLabel( const QString &label );
   void setUseFakeLocation( bool useFake );
   void updateLocation();
 
   QGeoPositionInfoSource *gps();
-  Location               *currentLocation();
+  Location               *liveLocation();
+  Location               *fakeLocation();
   bool                    useFakeLocation();
 
   bool                    m_gpsOn;
-  Location               *m_currentLocation;
+  Location               *m_liveLocation;
+  Location               *m_fakeLocation;
+  QString                 m_fakeLocationLabel;
   bool                    m_useFakeLocation;
 };
 
 MyGpsControllerPrivate::MyGpsControllerPrivate() :
   m_gpsOn(false),
-  m_currentLocation(0),
+  m_liveLocation( new Location( "livegps" ) ),
+  m_fakeLocation( new Location( "fakegps" ) ),
+  m_fakeLocationLabel(),
   m_useFakeLocation(false)
 {
 }
 
 MyGpsControllerPrivate::~MyGpsControllerPrivate()
 {
-  delete m_currentLocation;
-  m_currentLocation=0;
+  delete m_liveLocation;
+  m_liveLocation = 0;
+  delete m_fakeLocation;
+  m_fakeLocation = 0;
 }
 
 void MyGpsControllerPrivate::init()
@@ -66,14 +73,20 @@ void MyGpsControllerPrivate::setGps( QGeoPositionInfoSource *gps )
   Q_UNUSED( gps );
 }
 
-Location *MyGpsControllerPrivate::currentLocation()
+Location *MyGpsControllerPrivate::liveLocation()
 {
-  return m_currentLocation;
+  return m_liveLocation;
 }
 
-void MyGpsControllerPrivate::setCurrentLocation( Location *location )
+Location *MyGpsControllerPrivate::fakeLocation()
 {
-  m_currentLocation = location;
+  return m_fakeLocation;
+}
+
+void MyGpsControllerPrivate::setFakeLocationLabel( const QString &label )
+{
+  m_fakeLocationLabel = label;
+  m_fakeLocation->setLabel( label );
 }
 
 bool MyGpsControllerPrivate::useFakeLocation()
@@ -88,10 +101,6 @@ void MyGpsControllerPrivate::setUseFakeLocation( bool useFake )
 
 void MyGpsControllerPrivate::updateLocation()
 {
-  if ( m_currentLocation && m_currentLocation->label() == "livegps" ) {
-    delete m_currentLocation;
-  }
-  m_currentLocation = new Location( "livegps" );
 }
 
 void Ut_GpsController::init()
@@ -121,20 +130,18 @@ void Ut_GpsController::testGetGpsWithNoGpsUpdates()
   QSignalSpy spy(m_subject, SIGNAL(locationChanged(Location*)));
 
   // this should start the gps,
-  // but since there's been no update from the GPS, there should be
-  // no signal
+  // one signal to invalidate the previous display
+  // (which could be showing fake results, for example
   m_subject->getGps();
 
   QCOMPARE(m_subject_p->m_gpsOn, true);
-  QCOMPARE(spy.count(), 0);
+  QCOMPARE(spy.count(), 1);
 }
 
 void Ut_GpsController::testGetGpsWithGpsUpdates()
 {
   QSignalSpy spy(m_subject, SIGNAL(locationChanged(Location*)));
 
-  m_subject_p->updateLocation(); // pretend GPS has given an update
-
   // make test call
   m_subject->getGps();
 
@@ -142,20 +149,17 @@ void Ut_GpsController::testGetGpsWithGpsUpdates()
   QCOMPARE(m_subject_p->m_gpsOn, true);
   QCOMPARE(spy.count(), 1);
   QList<QVariant> arguments = spy.takeFirst();
-  QCOMPARE(arguments.at(0).value<Location*>(), m_subject_p->m_currentLocation);
-  QVERIFY(m_subject_p->m_currentLocation != 0);
+  QCOMPARE(arguments.at(0).value<Location*>(), m_subject_p->m_liveLocation);
 }
 
 void Ut_GpsController::testFakeGps()
 {
   QSignalSpy spy(m_subject, SIGNAL(locationChanged(Location*)));
 
-  m_subject_p->updateLocation(); // pretend GPS has given an update
-  Location *gpsLocation = m_subject_p->m_currentLocation; // position from GPS
-  Location *fakeLocation = new Location("fakegps");
+  Location *gpsLocation = m_subject_p->m_liveLocation; // position from GPS
 
   // make test call
-  m_subject->useFakeGps( fakeLocation ); // ownership -> m_subject
+  m_subject->useFakeGps( "fakegps" );
   m_subject->getGps();
 
   // check effect
@@ -169,16 +173,11 @@ void Ut_GpsController::testFakeGps()
 
   // both args should be the fake gps position supplied to useFakeGps()
   arguments = spy.takeFirst();
-  QCOMPARE( arguments.at(0).value<Location*>(), m_subject_p->m_currentLocation );
+  QCOMPARE( arguments.at(0).value<Location*>(), m_subject_p->m_fakeLocation );
   QCOMPARE( arguments.at(0).value<Location*>()->label(), QString( "fakegps" ) );
   arguments = spy.takeFirst();
-  QCOMPARE( arguments.at(0).value<Location*>(), m_subject_p->m_currentLocation );
+  QCOMPARE( arguments.at(0).value<Location*>(), m_subject_p->m_fakeLocation );
   QCOMPARE( arguments.at(0).value<Location*>()->label(), QString( "fakegps" ) );
-  QCOMPARE( m_subject_p->m_currentLocation, fakeLocation );
-
-  // should not be the gpsLocation or zero
-  QVERIFY(m_subject_p->m_currentLocation != gpsLocation);
-  QVERIFY(m_subject_p->m_currentLocation != 0);
 
   // switch back to GPS
   m_subject->useLiveGps();
@@ -187,14 +186,13 @@ void Ut_GpsController::testFakeGps()
   // gps should be on
   QCOMPARE(m_subject_p->m_gpsOn, true);
 
-  QVERIFY2(spy.count()==1, "should get a locationChanged signal from getGps" );
+  QVERIFY2(spy.count()==2, "should get two locationChanged signals" );
   arguments = spy.takeFirst();
-  QCOMPARE(arguments.at(0).value<Location*>(), m_subject_p->m_currentLocation);
+  QCOMPARE(arguments.at(0).value<Location*>(), m_subject_p->m_liveLocation);
+  QCOMPARE( arguments.at(0).value<Location*>()->label(), QString( "livegps" ) );
+  arguments = spy.takeFirst();
+  QCOMPARE(arguments.at(0).value<Location*>(), m_subject_p->m_liveLocation);
   QCOMPARE( arguments.at(0).value<Location*>()->label(), QString( "livegps" ) );
-  QVERIFY(m_subject_p->m_currentLocation != fakeLocation);
-
-  // fake a GPS update
-  m_subject_p->updateLocation(); // pretend GPS has given an update
 
   // get GPS location
   m_subject->getGps();
@@ -202,36 +200,22 @@ void Ut_GpsController::testFakeGps()
   // check effect
   QCOMPARE(spy.count(), 1);
   arguments = spy.takeFirst();
-  QCOMPARE(arguments.at(0).value<Location*>(), m_subject_p->m_currentLocation);
+  QCOMPARE(arguments.at(0).value<Location*>(), m_subject_p->m_liveLocation);
   QCOMPARE( arguments.at(0).value<Location*>()->label(), QString( "livegps" ) );
-  QVERIFY(m_subject_p->m_currentLocation != 0);
 }
 
 void Ut_GpsController::testLiveToFakeToLive()
 {
   m_subject_p->updateLocation(); // pretend GPS has given an update
-  Location *fakeLocation = new Location();
 
-  m_subject->useFakeGps( fakeLocation ); // ownership -> m_subject
+  m_subject->useFakeGps( "fakegps" );
   m_subject->getGps();
 
   // switch back to live GPS
   m_subject->useLiveGps();
   m_subject->getGps();
 
-  // fake a GPS update
-  m_subject_p->updateLocation(); // pretend GPS has given an update
-
-  // get GPS location
-  m_subject->getGps();
-
-  m_subject->useFakeGps( fakeLocation ); // ownership -> m_subject
-  m_subject->getGps();
-
-  // fake a GPS update
-  m_subject_p->updateLocation(); // pretend GPS has given an update
-
-  // get GPS location
+  m_subject->useFakeGps( "fakegps" );
   m_subject->getGps();
 }
 
index a2cf2bb..0eea86d 100644 (file)
@@ -26,6 +26,7 @@ SOURCES  = \
   ut_gpscontroller.cpp \
   $$ZOUBASRC/gpscontroller.cpp \
   $$ZOUBASRC/gpscontroller_p.cpp \
+  $$ZOUBASRC/locations.cpp \
   $$ZOUBASRC/location.cpp \
   $$ZOUBASRC/location_p.cpp \
 
@@ -33,6 +34,7 @@ HEADERS += \
   ut_gpscontroller.h \
   $$ZOUBASRC/gpscontroller.h \
   $$ZOUBASRC/gpscontroller_p.h \
+  $$ZOUBASRC/locations.h \
   $$ZOUBASRC/location.h \
   $$ZOUBASRC/location_p.h \