qtmobility/src/location/qgeopositioninfosource.cpp
changeset 4 90517678cc4f
parent 1 2b40d63a9c3d
child 11 06b8e2af4411
--- a/qtmobility/src/location/qgeopositioninfosource.cpp	Fri Apr 16 15:51:22 2010 +0300
+++ b/qtmobility/src/location/qgeopositioninfosource.cpp	Mon May 03 13:18:40 2010 +0300
@@ -46,6 +46,8 @@
 #   include "qgeopositioninfosource_wince_p.h"
 #elif defined(Q_WS_MAEMO_6)
 #   include "qgeopositioninfosource_maemo_p.h"
+#elif defined(Q_WS_MAEMO_5)
+#   include "qgeopositioninfosource_maemo5_p.h"
 #endif
 
 QTM_BEGIN_NAMESPACE
@@ -74,7 +76,8 @@
     \code
         // Emit updates every 10 seconds if available
         QGeoPositionInfoSource *source = QGeoPositionInfoSource::createDefaultSource();
-        source->setUpdateInterval(10000);
+        if (source)
+            source->setUpdateInterval(10000);
     \endcode
 
     To remove an update interval that was previously set, call
@@ -136,6 +139,11 @@
     interval is less than the minimumUpdateInterval(),
     the minimum interval is used instead.
 
+    Changes to the update interval will happen as soon as is practical, however the 
+    time the change takes may vary between implementations.  Whether or not the elapsed 
+    time from the previous interval is counted as part of the new interval is also 
+    implementation dependent.
+
     The default value for this property is 0.
 
     Note: Subclass implementations must call the base implementation of
@@ -193,10 +201,12 @@
 #if defined(Q_OS_SYMBIAN)
     QGeoPositionInfoSource *ret = NULL;
     TRAPD(error, ret = CQGeoPositionInfoSourceS60::NewL(parent));
+    if (error != KErrNone)
+        return 0;
     return ret;
 #elif defined(Q_OS_WINCE)
     return new QGeoPositionInfoSourceWinCE(parent);
-#elif defined(Q_WS_MAEMO_6)
+#elif (defined(Q_WS_MAEMO_6)) || (defined(Q_WS_MAEMO_5))
     QGeoPositionInfoSourceMaemo *source = new QGeoPositionInfoSourceMaemo(parent);
 
     int status = source->init();
@@ -208,8 +218,8 @@
     return source;
 #else
     Q_UNUSED(parent);
+    return 0;
 #endif
-    return 0;
 }
 
 /*!
@@ -250,7 +260,7 @@
     as soon as they become available.
 
     An updateTimout() signal will be emitted if this QGeoPositionInfoSource subclass determines
-    that it will not be able to provide regular updates.  This could happen if a satelllite fix is
+    that it will not be able to provide regular updates.  This could happen if a satellite fix is
     lost or if a hardware error is detected.  Position updates will recommence if the data becomes
     available later on.  The updateTimout() signal will not be emitted again until after the
     periodic updates resume.