Added signal for successful update image_fetcher
authorlampehe-local <henri.lampela@ixonos.com>
Fri, 30 Apr 2010 06:34:17 +0000 (09:34 +0300)
committerlampehe-local <henri.lampela@ixonos.com>
Fri, 30 Apr 2010 06:34:17 +0000 (09:34 +0300)
src/engine/engine.cpp
src/engine/engine.h
src/situareservice/situareservice.cpp
src/situareservice/situareservice.h

index 3dd2cfd..22f2b11 100644 (file)
@@ -43,6 +43,7 @@ SituareEngine::SituareEngine(QMainWindow *parent)
     connect(m_situareService, SIGNAL(reverseGeoReady(QString)), m_ui, SIGNAL(reverseGeoReady(QString)));
     connect(m_ui, SIGNAL(statusUpdate(QString,bool)), this, SLOT(requestUpdateLocation(QString,bool)));
     connect(m_situareService, SIGNAL(error(QString)), this, SLOT(error(QString)));
+    connect(m_situareService, SIGNAL(updateWasSuccessful()), this, SLOT(updateWasSuccessful()));
 
     start();
 }
@@ -82,7 +83,7 @@ void SituareEngine::requestAddress()
 {
     qDebug() << __PRETTY_FUNCTION__;
 
-    QPointF coordinates(65, 25.5); // this will be get from somewhere, map etc...
+    QPointF coordinates(65.0109, 25.5092); // this will be get from somewhere, map etc...
     m_situareService->reverseGeo(coordinates);
 }
 
@@ -90,7 +91,7 @@ void SituareEngine::requestUpdateLocation(const QString &status, const bool &pub
 {
     qDebug() << __PRETTY_FUNCTION__;
 
-    QPointF coordinates(65, 25.5); // this will be get from somewhere, map etc...
+    QPointF coordinates(65.0109, 25.5092); // this will be get from somewhere, map etc...
     m_situareService->updateLocation(coordinates, status, publish);
 }
 
@@ -99,3 +100,10 @@ void SituareEngine::updateFriendsList()
     qDebug() << __PRETTY_FUNCTION__;
     //code here
 }
+
+void SituareEngine::updateWasSuccessful()
+{
+    qDebug() << __PRETTY_FUNCTION__;
+
+    m_situareService->fetchLocations();
+}
index 7e4374e..df940d5 100644 (file)
@@ -95,6 +95,8 @@ public slots:
 
     void updateFriendsList();
 
+    void updateWasSuccessful();
+
 /*******************************************************************************
  * SIGNALS
  ******************************************************************************/
index 6f86fbf..204c091 100644 (file)
@@ -221,7 +221,7 @@ void SituareService::requestFinished(QNetworkReply *reply)
         }
         else if(replyArray == "") {
             qDebug() << "No error, update was successful";
-            // ToDo: signal UI?
+            emit updateWasSuccessful();
         }
         else {
             // Street address ready
index f74f3b1..971150c 100644 (file)
@@ -184,6 +184,8 @@ signals:
     */
     void reverseGeoReady(const QString &address);
 
+    void updateWasSuccessful();
+
     /**
     * @brief Signals when user data is retrieved
     *