backup...
authorVille Tiensuu <ville.tiensuu@ixonos.com>
Thu, 3 Jun 2010 13:08:48 +0000 (16:08 +0300)
committerVille Tiensuu <ville.tiensuu@ixonos.com>
Thu, 3 Jun 2010 13:08:48 +0000 (16:08 +0300)
continue by routing signals

src/engine/engine.cpp
src/engine/engine.h
src/ui/mainwindow.cpp
src/ui/mainwindow.h
src/ui/updatelocation/updatelocationdialog.cpp
src/ui/updatelocation/updatelocationdialog.h
src/ui/userinfo.cpp
src/ui/userinfo.h
src/ui/userinfopanel.cpp
src/ui/userinfopanel.h

index 2457c1f..612792a 100644 (file)
@@ -431,7 +431,7 @@ void SituareEngine::signalsFromMainWindow()
             this, SLOT(requestUpdateLocation(QString,bool)));
 
     connect(m_ui, SIGNAL(enableAutomaticLocationUpdate(bool, int)),
-            this, SLOT(enableAutomaticLocationUpdate(bool, int)));
+            this, SLOT(enableAutomaticLocationUpdate(bool, int)));    
 
     // signals from user info tab
     connect(m_ui, SIGNAL(refreshUserData()),
@@ -485,13 +485,14 @@ void SituareEngine::signalsFromSituareService()
             this, SLOT(userDataChanged(User*, QList<User*>&)));
 
     connect(m_situareService, SIGNAL(updateWasSuccessful()),
-            this, SLOT(updateWasSuccessful()));
+            this, SLOT(updateWasSuccessful()));    
 
+    // signals to mainwindow
     connect(m_situareService, SIGNAL(updateWasSuccessful()),
-            this, SIGNAL(messageUpdatedToSituare()));
-
-    connect(this, SIGNAL(messageUpdatedToSituare()),
             m_ui, SIGNAL(messageUpdatedToSituare()));
+
+    connect(m_situareService, SIGNAL(error(QString)),
+            m_ui, SIGNAL(messageSendingFailed(QString)));
 }
 
 void SituareEngine::updateWasSuccessful()
index 5f21a61..ecdd024 100644 (file)
@@ -255,6 +255,7 @@ signals:
     */
     void friendsLocationsReady(QList<User *> &friendList);
     void messageUpdatedToSituare();
+    void messageSendingFailed(const QString &error);
 
     /**
     * @brief Signals when new user data is ready
index 475f9b6..0c93be4 100644 (file)
@@ -246,6 +246,9 @@ void MainWindow::buildUserInfoPanel()
 
     connect(this, SIGNAL(messageUpdatedToSituare()),
             m_userPanel, SIGNAL(messageUpdatedToSituare()));
+
+    connect(this, SIGNAL(messageSendingFailed(QString)),
+            m_userPanel, SIGNAL(messageSendingFailed(QString)));
 }
 
 void MainWindow::buildWebView()
index 02bec91..c940119 100644 (file)
@@ -445,6 +445,7 @@ signals:
     void updateCredentials(const QUrl &url);
 
     void messageUpdatedToSituare();
+    void messageSendingFailed(const QString &error);
 
     /**
     * @brief MapView has finished zooming
index 34bc85c..8020ba1 100755 (executable)
@@ -70,6 +70,13 @@ UpdateLocationDialog::~UpdateLocationDialog()
     // emit m_textEdit sisältö userInfo luokalle talteen
 }
 
+void UpdateLocationDialog::saveMessageAndClose()
+{
+    qDebug() << __PRETTY_FUNCTION__ << "NONIIN NONIIN";
+
+
+}
+
 void UpdateLocationDialog::setAddress(const QString &address)
 {
     qDebug() << __PRETTY_FUNCTION__;
index efb4546..9f8ecd1 100755 (executable)
@@ -69,7 +69,8 @@ public slots:
     *
     * @param address Street address, result from SituareService's reverseGeo
     */
-    void setAddress(const QString &address);   
+    void setAddress(const QString &address);
+    void saveMessageAndClose();
 
 private slots:
 
index 3ab3afe..4a700e4 100644 (file)
@@ -269,6 +269,8 @@ void UserInfo::messageUpdate()
             this, SIGNAL(statusUpdate(QString, bool)));
     connect(this, SIGNAL(messageUpdatedToSituare()),
             &updateLocationDialog, SLOT(close()));
+    connect(this, SIGNAL(messageSendingFailed(QString)),
+            &updateLocationDialog, SLOT(saveMessageAndClose()));
 
     updateLocationDialog.exec();
 }
index c309695..81207e2 100644 (file)
@@ -143,7 +143,7 @@ private slots:
     * @brief Slot function to forward messageUpdate launch signal
     *
     */
-    void messageUpdate();
+    void messageUpdate();    
 
 /******************************************************************************
 * SIGNALS
@@ -183,6 +183,7 @@ signals:
     */
     void statusUpdate(const QString &status, const bool &publish);
     void messageUpdatedToSituare();
+    void messageSendingFailed(const QString &error);
 
 /******************************************************************************
 * DATA MEMBERS
index a674e2d..50a2975 100644 (file)
@@ -65,6 +65,9 @@ UserInfoPanel::UserInfoPanel(QWidget *parent)
 
     connect(this, SIGNAL(messageUpdatedToSituare()),
             m_userInfo, SIGNAL(messageUpdatedToSituare()));
+
+    connect(this, SIGNAL(messageSendingFailed(QString)),
+            m_userInfo, SIGNAL(messageSendingFailed(QString)));
 }
 
 void UserInfoPanel::userDataReceived(User *user)
index a539a10..f0f907c 100644 (file)
@@ -96,6 +96,7 @@ signals:
     */
     void statusUpdate(const QString &status, const bool &publish);
     void messageUpdatedToSituare();
+    void messageSendingFailed(const QString &error);
 
 /*******************************************************************************
  * DATA MEMBERS