Removed bool return value from
authorJussi Laitinen <jupe@l3l7588.ixonos.local>
Thu, 10 Jun 2010 05:58:09 +0000 (08:58 +0300)
committerJussi Laitinen <jupe@l3l7588.ixonos.local>
Thu, 10 Jun 2010 05:58:09 +0000 (08:58 +0300)
MainWindow::showEnableAutomaticLocationUpdateDialog.

src/ui/mainwindow.cpp
src/ui/mainwindow.h

index 567c362..7e8917d 100644 (file)
@@ -83,6 +83,12 @@ MainWindow::MainWindow(QWidget *parent)
     m_settingsDialog->hide();
     connect(m_settingsDialog, SIGNAL(enableAutomaticLocationUpdate(bool,int)),
             this, SIGNAL(enableAutomaticLocationUpdate(bool,int)));
+    m_automaticUpdateLocationDialog = new QMessageBox(QMessageBox::Question,
+                                                      tr("Automatic location update"), "",
+                                                      QMessageBox::Yes | QMessageBox::No |
+                                                      QMessageBox::Cancel, this);
+    connect(m_automaticUpdateLocationDialog, SIGNAL(finished(int)),
+            this, SLOT(automaticUpdateDialogFinished(int)));
 
     createMenus();
     setWindowTitle(tr("Situare"));
@@ -694,6 +700,7 @@ void MainWindow::requestAutomaticLocationUpdateSettings()
 {
     qDebug() << __PRETTY_FUNCTION__;
 
+    m_settingsDialog->readSettings();
     m_settingsDialog->emitAutomaticLocationUpdateSettings();
 }
 
@@ -791,14 +798,12 @@ void MainWindow::setViewPortSize(const QSize &size)
     m_viewPortHeight = size.height();
 }
 
-bool MainWindow::showEnableAutomaticUpdateLocationDialog(const QString &text)
+void MainWindow::showEnableAutomaticUpdateLocationDialog(const QString &text)
 {
-    m_automaticUpdateLocationDialog = new QMessageBox(QMessageBox::Question,
-                                                      tr("Automatic location update"), text,
-                                                      QMessageBox::Yes | QMessageBox::No |
-                                                      QMessageBox::Cancel, this);
-    connect(m_automaticUpdateLocationDialog, SIGNAL(finished(int)),
-            this, SLOT(automaticUpdateDialogFinished(int)));
+    qDebug() << __PRETTY_FUNCTION__;
+
+    m_automaticUpdateLocationDialog->setText(text);
+
     m_automaticUpdateLocationDialog->show();
 }
 
index 2839b8e..71fd17e 100644 (file)
@@ -136,9 +136,8 @@ public:
     * Shows dialog with enable automatic location update question.
     *
     * @param text text to show in dialog
-    * @return true if accepted, false otherwise
     */
-    bool showEnableAutomaticUpdateLocationDialog(const QString &text);
+    void showEnableAutomaticUpdateLocationDialog(const QString &text);
 
     /**
     * @brief Gets the username from member variable for saving purposes