backup before review
[situare] / src / ui / userinfo.cpp
index e620de8..928902c 100644 (file)
@@ -6,6 +6,7 @@
        Jussi Laitinen - jussi.laitinen@ixonos.com
        Katri Kaikkonen - katri.kaikkonen@ixonos.com
        Henri Lampela - henri.lampela@ixonos.com
+       Ville Tiensuu - ville.tiensuu@ixonos.com
 
    Situare is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
 const int BACKGROUND_WIDTH = 240; ///< Width for item
 const int BACKGROUND_TOP_HEIGHT = 16; ///< Height for item top
 const int BACKGROUND_BOTTOM_HEIGHT = 15; ///< Height for item bottom
-//const QColor COLOR_GRAY = QColor(152, 152, 152); ///< Gray color
-//const QFont NOKIA_FONT_NORMAL = QFont("Nokia Sans", 18, QFont::Normal); ///< Normal font
-//const QFont NOKIA_FONT_SMALL = QFont("Nokia Sans", 13, QFont::Normal);  ///< Small font
 const int ICON_HEIGHT = 24; ///< Icon height
 const int ICON_WIDTH = 24;  ///< Icon width
-//const int IMAGE_HEIGHT = 60;    ///< Profile image height
-//const int IMAGE_WIDTH = 60;     ///< Profile image width
 const int MARGIN = 5; ///< Icon margin
 const int MOUSE_PRESS_AREA_WIDTH = 20;  ///< Area width for item height toggling
 const int MOUSE_PRESS_AREA_HEIGHT = 20; ///< Area height for item height toggling
@@ -133,9 +129,6 @@ UserInfo::UserInfo(QWidget *parent)
     connect(m_messageDialog, SIGNAL(statusUpdate(QString,bool)),
             this, SLOT(backupUpdateLocationDialogData(QString,bool)));
 
-    connect(this, SIGNAL(messageUpdatedToSituare()),
-            this, SLOT(clearUpdateLocationDialogData()));
-
     setFixedWidth(BACKGROUND_WIDTH);
 
     this->setFont(NOKIA_FONT_SMALL);
@@ -188,11 +181,12 @@ void UserInfo::clearUpdateLocationDialogData()
 
 void UserInfo::restoreUnsendMessage()
 {
+    qDebug() << __PRETTY_FUNCTION__;
+
     QSettings settings(DIRECTORY_NAME, FILE_NAME);
     m_backupMessage = settings.value(USER_UNSEND_MESSAGE, "").toString();
     m_backupFacebookPublishPolicity =
             settings.value(USER_UNSEND_MESSAGE_PUBLISH_POLICITY, false).toBool();
-
 }
 
 void UserInfo::setAddress(const QString &address)
@@ -271,7 +265,7 @@ void UserInfo::setText(bool expanded)
     }
 }
 
-void UserInfo::verifyMessageUpdateToServer(QString errorMessage)
+void UserInfo::verifyMessageUpdateToServer(const QString &errorMessage)
 {
     qDebug() << __PRETTY_FUNCTION__;
 
@@ -350,7 +344,5 @@ void UserInfo::messageUpdate()
     m_messageDialog->m_checkBox->setCheckState(Qt::Unchecked);
 
     if (m_backupFacebookPublishPolicity == true)
-        m_messageDialog->m_checkBox->setCheckState(Qt::Checked);   
-
-    m_messageDialog->exec();
+        m_messageDialog->m_checkBox->setCheckState(Qt::Checked);
 }