projects
/
ptas
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
1f88ace
)
Changes: added notification for address resolution failure and no route; fixed issue...
author
Max Waterman
<david.waterman@nokia.com>
Sun, 25 Apr 2010 03:09:50 +0000
(06:09 +0300)
committer
Max Waterman
<david.waterman@nokia.com>
Sun, 25 Apr 2010 03:13:06 +0000
(06:13 +0300)
zouba/debian/changelog
patch
|
blob
|
history
zouba/src/gpscontroller.cpp
patch
|
blob
|
history
zouba/src/gpscontroller_p.cpp
patch
|
blob
|
history
zouba/src/gpscontroller_p.h
patch
|
blob
|
history
zouba/src/location_p.cpp
patch
|
blob
|
history
zouba/src/route_p.cpp
patch
|
blob
|
history
zouba/src/uicontroller.cpp
patch
|
blob
|
history
zouba/zouba.pro
patch
|
blob
|
history
diff --git
a/zouba/debian/changelog
b/zouba/debian/changelog
index
8249ab2
..
a37b5e8
100644
(file)
--- a/
zouba/debian/changelog
+++ b/
zouba/debian/changelog
@@
-1,3
+1,10
@@
+zouba (0.9) unstable; urgency=low
+
+ * added notification for address resolution failure and no route
+ * fixed issue with multiple route requests for a single button click
+
+ -- Max Waterman <davidmaxwaterman@fastmail.co.uk> Sun, 25 Apr 2010 06:12:00 +0200
+
zouba (0.8) unstable; urgency=low
* Fixed problem when changing the address of a location to something invalid.
zouba (0.8) unstable; urgency=low
* Fixed problem when changing the address of a location to something invalid.
diff --git
a/zouba/src/gpscontroller.cpp
b/zouba/src/gpscontroller.cpp
index
32568b0
..
d924564
100644
(file)
--- a/
zouba/src/gpscontroller.cpp
+++ b/
zouba/src/gpscontroller.cpp
@@
-28,6
+28,7
@@
GpsController::~GpsController()
void GpsController::getGps()
{
Location *location;
void GpsController::getGps()
{
Location *location;
+ Location *previousLocation = q->mostRecentlyReportedLocation();
if ( q->useFakeLocation() ) {
location = q->fakeLocation();
if ( q->useFakeLocation() ) {
location = q->fakeLocation();
@@
-35,7
+36,9
@@
void GpsController::getGps()
location = q->liveLocation();
}
location = q->liveLocation();
}
- emit locationChanged( location );
+ if ( location != previousLocation ) {
+ emit locationChanged( location );
+ }
}
void GpsController::useLiveGps()
}
void GpsController::useLiveGps()
diff --git
a/zouba/src/gpscontroller_p.cpp
b/zouba/src/gpscontroller_p.cpp
index
537d10a
..
831aacf
100644
(file)
--- a/
zouba/src/gpscontroller_p.cpp
+++ b/
zouba/src/gpscontroller_p.cpp
@@
-57,6
+57,7
@@
void GpsControllerPrivate::setGps( QGeoPositionInfoSource *gps )
Location *GpsControllerPrivate::liveLocation()
{
Location *GpsControllerPrivate::liveLocation()
{
+ m_mostRecentlyReportedLocation = m_liveLocation;
return m_liveLocation;
}
return m_liveLocation;
}
@@
-64,6
+65,7
@@
Location *GpsControllerPrivate::fakeLocation()
{
Locations *locations = Locations::instance();
Location *location = locations->location( fakeLocationLabel() );
{
Locations *locations = Locations::instance();
Location *location = locations->location( fakeLocationLabel() );
+ m_mostRecentlyReportedLocation = location;
return location;
}
return location;
}
@@
-92,3
+94,7
@@
void GpsControllerPrivate::updateLocation( QGeoPositionInfo positionInfo )
m_liveLocation->setLocation( positionInfo );
}
m_liveLocation->setLocation( positionInfo );
}
+Location *GpsControllerPrivate::mostRecentlyReportedLocation()
+{
+ return m_mostRecentlyReportedLocation;
+}
diff --git
a/zouba/src/gpscontroller_p.h
b/zouba/src/gpscontroller_p.h
index
46bd6c9
..
a101ffe
100644
(file)
--- a/
zouba/src/gpscontroller_p.h
+++ b/
zouba/src/gpscontroller_p.h
@@
-27,6
+27,7
@@
public:
virtual QGeoPositionInfoSource *gps();
virtual Location *liveLocation();
virtual Location *fakeLocation();
virtual QGeoPositionInfoSource *gps();
virtual Location *liveLocation();
virtual Location *fakeLocation();
+ virtual Location *mostRecentlyReportedLocation();
virtual QString fakeLocationLabel();
virtual bool useFakeLocation();
virtual QString fakeLocationLabel();
virtual bool useFakeLocation();
@@
-38,6
+39,7
@@
private:
Location *m_liveLocation;
QString m_fakeLocationLabel;
bool m_useFakeLocation;
Location *m_liveLocation;
QString m_fakeLocationLabel;
bool m_useFakeLocation;
+ Location *m_mostRecentlyReportedLocation;
};
#endif //GPSCONTROLLER_P_H
};
#endif //GPSCONTROLLER_P_H
diff --git
a/zouba/src/location_p.cpp
b/zouba/src/location_p.cpp
index
442977b
..
fe9d555
100644
(file)
--- a/
zouba/src/location_p.cpp
+++ b/
zouba/src/location_p.cpp
@@
-4,6
+4,7
@@
#include <QXmlStreamReader>
#include <QByteArray>
#include <QDebug>
#include <QXmlStreamReader>
#include <QByteArray>
#include <QDebug>
+#include <QMaemo5InformationBox>
LocationPrivate::LocationPrivate( const QString &x, const QString &y, const QString &label ) :
m_label(label),
LocationPrivate::LocationPrivate( const QString &x, const QString &y, const QString &label ) :
m_label(label),
@@
-63,6
+64,7
@@
void LocationPrivate::parseReply( const QByteArray &reply )
}
if ( xml.hasError() || responseHasError ) {
}
if ( xml.hasError() || responseHasError ) {
+ QMaemo5InformationBox::information( 0, "address resolution error - please check address" );
qDebug() << "xml error";
m_valid = false;
} else {
qDebug() << "xml error";
m_valid = false;
} else {
diff --git
a/zouba/src/route_p.cpp
b/zouba/src/route_p.cpp
index
18380f7
..
d2125da
100644
(file)
--- a/
zouba/src/route_p.cpp
+++ b/
zouba/src/route_p.cpp
@@
-6,6
+6,7
@@
#include <QList>
#include <QFile>
#include <QStringList>
#include <QList>
#include <QFile>
#include <QStringList>
+#include <QMaemo5InformationBox>
RoutePrivate::RoutePrivate( QObject *parent ) :
m_fromValid(false),
RoutePrivate::RoutePrivate( QObject *parent ) :
m_fromValid(false),
@@
-169,6
+170,7
@@
QList<RouteData> RoutePrivate::parseReply( const QByteArray &reply )
if ( retVal.isEmpty() ) {
qDebug() << "no routes found";
if ( retVal.isEmpty() ) {
qDebug() << "no routes found";
+ QMaemo5InformationBox::information( 0, "no routes found" );
}
return retVal;
}
return retVal;
diff --git
a/zouba/src/uicontroller.cpp
b/zouba/src/uicontroller.cpp
index
962135f
..
333a1d8
100644
(file)
--- a/
zouba/src/uicontroller.cpp
+++ b/
zouba/src/uicontroller.cpp
@@
-126,9
+126,10
@@
void UiController::changeDestination( int id )
if ( destinationHasChanged ) {
qDebug() << "Emitting destination changed (" << m_destination[id]->label() << ")";
emit destinationChanged( m_destination[id] );
if ( destinationHasChanged ) {
qDebug() << "Emitting destination changed (" << m_destination[id]->label() << ")";
emit destinationChanged( m_destination[id] );
+ m_currentDestination = id;
}
}
- // always want to emit this so that the gps position is update
+ // always want to emit this so that the gps position is updated
// and the user gets new information
emit buttonClicked();
}
// and the user gets new information
emit buttonClicked();
}
diff --git
a/zouba/zouba.pro
b/zouba/zouba.pro
index
845d0ff
..
d978a4c
100644
(file)
--- a/
zouba/zouba.pro
+++ b/
zouba/zouba.pro
@@
-46,7
+46,7
@@
VPATH += src uis
CONFIG -=
CONFIG += debug qt mobility
MOBILITY += location bearer
CONFIG -=
CONFIG += debug qt mobility
MOBILITY += location bearer
-QT=core gui network
+QT=core gui network maemo5
INSTALLS += target
target.path = /usr/bin/
INSTALLS += target
target.path = /usr/bin/