From: Sami Rämö Date: Fri, 12 Nov 2010 11:24:00 +0000 (+0200) Subject: Moved location update logic to new class called UpdateLocation. X-Git-Url: https://vcs.maemo.org/git/?p=situare;a=commitdiff_plain;h=b1971264e6e95cb5f13ce8f2ca852edd028a8869 Moved location update logic to new class called UpdateLocation. --- diff --git a/src/common.h b/src/common.h index 9c27d2b..8c0f9e0 100644 --- a/src/common.h +++ b/src/common.h @@ -33,8 +33,6 @@ const QString SETTINGS_APPLICATION_NAME = "Situare"; // QSettings common values const QString SETTINGS_AUTOMATIC_UPDATE_ENABLED = "SETTINGS_AUTOMATIC_UPDATE_ENABLED"; const QString SETTINGS_AUTOMATIC_UPDATE_INTERVAL = "SETTINGS_AUTOMATIC_UPDATE_INTERVAL"; -const QString USER_UNSEND_MESSAGE = "UNSEND_MESSAGE_CONTENT"; -const QString USER_UNSEND_MESSAGE_PUBLISH = "UNSEND_MESSAGE_PUBLISH_POLICITY"; // Misc values const int DEFAULT_SCREEN_WIDTH = 800; ///< Default N900 screen width diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index 7f2f32d..6b68d34 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -376,7 +376,6 @@ void SituareEngine::onLogout() qDebug() << __PRETTY_FUNCTION__; m_ui->loggedIn(false); - m_ui->clearUpdateLocationDialogData(); m_situareService->updateSession(""); // empty session string means logged out m_automaticUpdateFirstStart = true; } @@ -626,7 +625,7 @@ void SituareEngine::signalsFromMainWindow() connect(m_ui, SIGNAL(requestReverseGeo()), this, SLOT(requestAddress())); - connect(m_ui, SIGNAL(statusUpdate(QString,bool)), + connect(m_ui, SIGNAL(locationUpdate(QString,bool)), this, SLOT(requestUpdateLocation(QString,bool))); connect(m_ui, SIGNAL(enableAutomaticLocationUpdate(bool, int)), @@ -744,7 +743,7 @@ void SituareEngine::signalsFromSituareService() this, SLOT(updateWasSuccessful())); connect(m_situareService, SIGNAL(updateWasSuccessful()), - m_ui, SLOT(clearUpdateLocationDialogData())); + m_ui, SIGNAL(updateWasSuccessful())); } void SituareEngine::startAutomaticUpdate() diff --git a/src/engine/updatelocation.cpp b/src/engine/updatelocation.cpp new file mode 100644 index 0000000..4997316 --- /dev/null +++ b/src/engine/updatelocation.cpp @@ -0,0 +1,105 @@ +/* + Situare - A location system for Facebook + Copyright (C) 2010 Ixonos Plc. Authors: + + Sami Rämö - sami.ramo@ixonos.com + + Situare is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Situare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Situare; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. +*/ + +#include +#include + +#include "common.h" + +#include "updatelocation.h" + +const QString UNSENT_MESSAGE_SETTING = "UNSENT_MESSAGE"; +const QString UNSENT_MESSAGE_PUBLISH_SETTING = "UNSENT_MESSAGE_PUBLISH"; + +UpdateLocation::UpdateLocation(QObject *parent) : + QObject(parent), + m_publish(false) +{ + qWarning() << __PRETTY_FUNCTION__; + + QSettings settings(SETTINGS_ORGANIZATION_NAME, SETTINGS_APPLICATION_NAME); + m_message = settings.value(UNSENT_MESSAGE_SETTING).toString(); + m_publish = settings.value(UNSENT_MESSAGE_PUBLISH_SETTING, false).toBool(); +} + +UpdateLocation::~UpdateLocation() +{ + qWarning() << __PRETTY_FUNCTION__; + + QSettings settings(SETTINGS_ORGANIZATION_NAME, SETTINGS_APPLICATION_NAME); + + if (!m_message.isEmpty()) { + settings.setValue(UNSENT_MESSAGE_SETTING, m_message); + settings.setValue(UNSENT_MESSAGE_PUBLISH_SETTING, m_publish); + } else { + settings.remove(UNSENT_MESSAGE_SETTING); + settings.remove(UNSENT_MESSAGE_PUBLISH_SETTING); + } +} + +void UpdateLocation::clear() +{ + qWarning() << __PRETTY_FUNCTION__; + + m_message.clear(); + m_publish = false; +} + +QString UpdateLocation::message() const +{ + qWarning() << __PRETTY_FUNCTION__; + + return m_message; +} + +void UpdateLocation::send() +{ + qWarning() << __PRETTY_FUNCTION__; + + emit locationUpdate(m_message, m_publish); +} + +void UpdateLocation::setMessage(const QString &message) +{ + qWarning() << __PRETTY_FUNCTION__; + + if (message != m_message) { + m_message = message; + emit messageChanged(); + } +} + +bool UpdateLocation::publish() const +{ + qWarning() << __PRETTY_FUNCTION__; + + return m_publish; +} + +void UpdateLocation::setPublish(bool publish) +{ + qWarning() << __PRETTY_FUNCTION__; + + if (publish != m_publish) { + m_publish = publish; + emit publishChanged(); + } +} diff --git a/src/engine/updatelocation.h b/src/engine/updatelocation.h new file mode 100644 index 0000000..8140644 --- /dev/null +++ b/src/engine/updatelocation.h @@ -0,0 +1,131 @@ +/* + Situare - A location system for Facebook + Copyright (C) 2010 Ixonos Plc. Authors: + + Sami Rämö - sami.ramo@ixonos.com + + Situare is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Situare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Situare; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. +*/ + + +#ifndef UPDATELOCATION_H +#define UPDATELOCATION_H + +#include + +/** + * @brief Controller for location update + * + * @author Sami Rämö (at) ixonos.com + */ +class UpdateLocation : public QObject +{ + Q_OBJECT + + /** + * @brief Message text + * + * @property message + */ + Q_PROPERTY(QString message READ message WRITE setMessage NOTIFY messageChanged) + + /** + * @brief Publish on FB wall setting + * + * @property publish + */ + Q_PROPERTY(bool publish READ publish WRITE setPublish NOTIFY publishChanged) + +public: + /** + * @brief Constructor + * + * Read unsent message from settigs. + */ + explicit UpdateLocation(QObject *parent = 0); + + /** + * @brief Destructor + * + * Save unsent message to settings. + */ + ~UpdateLocation(); + + /** + * @brief Getter for message. + * + * @returns Message + */ + QString message() const; + + /** + * @brief Getter for publish setting + * + * @returns True is update should be published on FB wall. + */ + bool publish() const; + +public slots: + /** + * @brief Clear data. + */ + void clear(); + + /** + * @brief Send location update + * + * Emits locationUpdate() signal. + */ + void send(); + + /** + * @brief Setter for message + * + * @param message New message. + */ + void setMessage(const QString &message); + + /** + * @brief Setter for publish setting + * + * @param publish True is update should be published on FB wall. + */ + void setPublish(bool publish); + +signals: + /** + * @brief Send location update + * + * @param status Status message + * @param publish Publish on Facebook? + */ + void locationUpdate(const QString &status, bool publish); + + /** + * @brief Notifies that message has changed + */ + void messageChanged(); + + /** + * @brief Notifies that publish setting has changed + */ + void publishChanged(); + +private: + bool m_publish; ///< Should the update be published on FB wall + QString m_message; ///< Location update message +}; + +#endif // UPDATELOCATION_H diff --git a/src/facebookservice/facebookauthentication.cpp b/src/facebookservice/facebookauthentication.cpp index 4579725..dce4aeb 100644 --- a/src/facebookservice/facebookauthentication.cpp +++ b/src/facebookservice/facebookauthentication.cpp @@ -67,15 +67,12 @@ void FacebookAuthentication::browserDestroyed() void FacebookAuthentication::clearAccountInformation(bool clearUserInformation) { + /// @todo Parameter not needed qWarning() << __PRETTY_FUNCTION__ << "clearUserInformation:" << clearUserInformation; - QSettings settings(SETTINGS_ORGANIZATION_NAME, SETTINGS_APPLICATION_NAME); - - settings.remove(USER_UNSEND_MESSAGE); - settings.remove(USER_UNSEND_MESSAGE_PUBLISH); - if (clearUserInformation) { NetworkCookieJar::clearCookiesSetting(); + QSettings settings(SETTINGS_ORGANIZATION_NAME, SETTINGS_APPLICATION_NAME); settings.remove(SETTINGS_AUTOMATIC_UPDATE_ENABLED); settings.remove(SETTINGS_AUTOMATIC_UPDATE_INTERVAL); } diff --git a/src/situareservice/situareservice.cpp b/src/situareservice/situareservice.cpp index f632495..78f212e 100644 --- a/src/situareservice/situareservice.cpp +++ b/src/situareservice/situareservice.cpp @@ -111,6 +111,8 @@ void SituareService::buildRequest(const QString &script, const QHash #include "common.h" +#include "engine/updatelocation.h" #include "error.h" #include "friendlistpanel.h" #include "fullscreenbutton.h" @@ -77,7 +78,7 @@ MainWindow::MainWindow(QWidget *parent) m_fullScreenButton(0), m_indicatorButtonPanel(0), m_mapScale(0), - m_updateLocation(0) + m_updateLocationController(0) { qDebug() << __PRETTY_FUNCTION__; @@ -126,16 +127,6 @@ MainWindow::~MainWindow() qDeleteAll(m_error_queue.begin(), m_error_queue.end()); m_error_queue.clear(); - - QSettings settings(SETTINGS_ORGANIZATION_NAME, SETTINGS_APPLICATION_NAME); - - if (!m_backupMessage.isEmpty()) { - settings.setValue(USER_UNSEND_MESSAGE, m_backupMessage.toAscii()); - settings.setValue(USER_UNSEND_MESSAGE_PUBLISH, m_backupFacebookPublishPolicity); - } else { - settings.remove(USER_UNSEND_MESSAGE); - settings.remove(USER_UNSEND_MESSAGE_PUBLISH); - } } void MainWindow::automaticUpdateDialogFinished(int result) @@ -153,14 +144,6 @@ void MainWindow::automaticUpdateDialogFinished(int result) m_automaticUpdateLocationDialog->deleteLater(); } -void MainWindow::backupUpdateLocationDialogData(const QString &status, bool publish) -{ - qDebug() << __PRETTY_FUNCTION__; - - m_backupMessage = status; - m_backupFacebookPublishPolicity = publish; -} - void MainWindow::buildCrosshair() { qDebug() << __PRETTY_FUNCTION__; @@ -507,14 +490,6 @@ void MainWindow::buildZoomButtonPanel() this, SIGNAL(draggingModeTriggered())); } -void MainWindow::clearUpdateLocationDialogData() -{ - qDebug() << __PRETTY_FUNCTION__; - - m_backupMessage.clear(); - m_backupFacebookPublishPolicity = false; -} - void MainWindow::createMenus() { qDebug() << __PRETTY_FUNCTION__; @@ -684,6 +659,7 @@ void MainWindow::loggedIn(bool logged) } else { m_loginAct->setText(tr("Login")); m_userInfoPanel->showUserInfo(false); + m_updateLocationController->clear(); } updateItemVisibility(logged); } @@ -753,15 +729,6 @@ void MainWindow::readAutomaticLocationUpdateSettings() } } -void MainWindow::restoreUnsendMessage() -{ - qDebug() << __PRETTY_FUNCTION__; - - QSettings settings(SETTINGS_ORGANIZATION_NAME, SETTINGS_APPLICATION_NAME); - m_backupMessage = settings.value(USER_UNSEND_MESSAGE).toString(); - m_backupFacebookPublishPolicity = settings.value(USER_UNSEND_MESSAGE_PUBLISH, false).toBool(); -} - void MainWindow::setCrosshairVisibility(bool visibility) { qDebug() << __PRETTY_FUNCTION__; @@ -857,23 +824,23 @@ void MainWindow::showUpdateLocationDialog() { qDebug() << __PRETTY_FUNCTION__; - delete m_updateLocation; - m_updateLocation = new UpdateLocationDialog(m_backupMessage, m_backupFacebookPublishPolicity, - this); - - connect(this, SIGNAL(reverseGeoReady(QString)), - m_updateLocation, SLOT(setAddress(QString))); - - connect(m_updateLocation, SIGNAL(statusUpdate(QString, bool)), - this, SIGNAL(statusUpdate(QString, bool))); + if (!m_updateLocationController) { + m_updateLocationController = new UpdateLocation(this); + if (!m_updateLocationController) + return; + else + connect(this, SIGNAL(updateWasSuccessful()), m_updateLocationController, SLOT(clear())); + connect(m_updateLocationController, SIGNAL(locationUpdate(QString,bool)), + this, SIGNAL(locationUpdate(QString,bool))); + } - connect(m_updateLocation, SIGNAL(statusUpdate(QString, bool)), - this, SLOT(backupUpdateLocationDialogData(QString, bool))); + UpdateLocationDialog *updateLocationDialog + = new UpdateLocationDialog(m_updateLocationController, this); - connect(m_updateLocation, SIGNAL(finished(int)), - this, SLOT(updateLocationDialogFinished(int))); + connect(this, SIGNAL(reverseGeoReady(QString)), + updateLocationDialog, SLOT(setAddress(QString))); - m_updateLocation->show(); + updateLocationDialog->show(); emit requestReverseGeo(); } @@ -929,27 +896,3 @@ void MainWindow::updateItemVisibility(bool loggedIn) m_tabbedPanel->setTabsEnabled(m_situareTabsIndexes, loggedIn); } - -void MainWindow::updateLocationDialogFinished(int reason) -{ - qDebug() << __PRETTY_FUNCTION__; - - Q_UNUSED(reason); - - if (m_updateLocation) { - disconnect(this, SIGNAL(reverseGeoReady(QString)), - m_updateLocation, SLOT(setAddress(QString))); - - disconnect(m_updateLocation, SIGNAL(statusUpdate(QString,bool)), - this, SIGNAL(statusUpdate(QString,bool))); - - disconnect(m_updateLocation, SIGNAL(statusUpdate(QString,bool)), - this, SLOT(backupUpdateLocationDialogData(QString,bool))); - - disconnect(m_updateLocation, SIGNAL(finished(int)), - this, SLOT(updateLocationDialogFinished(int))); - - m_updateLocation->deleteLater(); - m_updateLocation = 0; - } -} diff --git a/src/ui/mainwindow.h b/src/ui/mainwindow.h index c9e4caf..ea5683a 100644 --- a/src/ui/mainwindow.h +++ b/src/ui/mainwindow.h @@ -56,7 +56,7 @@ class SceneCoordinate; class SettingsDialog; class SituareService; class TabbedPanel; -class UpdateLocationDialog; +class UpdateLocation; class User; class UserInfoPanel; class ZoomButtonPanel; @@ -145,15 +145,6 @@ public: public slots: /** - * @brief Saves status message and Facebook publish setting - * - * @param status message that user sends. Message is stored to m_backupMessage data member - * @param publish setting that determines whether the user status message is published on - * Facebook. This value is stored to m_backupFacebookPublishPolicity data member. - */ - void backupUpdateLocationDialogData(const QString &status, bool publish); - - /** * @brief Builds information box with message. * * @param message Information message @@ -162,11 +153,6 @@ public slots: void buildInformationBox(const QString &message, bool modal=false); /** - * @brief Clears backups of message and publish on Facebook setting - */ - void clearUpdateLocationDialogData(); - - /** * @brief Hides and deletes login dialog */ void destroyLoginDialog(); @@ -287,11 +273,6 @@ private: void queueDialog(QDialog *dialog); /** - * @brief reads Unsend message from settings at startup - */ - void restoreUnsendMessage(); - - /** * @brief Shows queued error information box * */ @@ -391,11 +372,6 @@ private slots: */ void toggleFullScreen(); - /** - * @brief Slot function to get indication when dialog is finished - */ - void updateLocationDialogFinished(int reason); - /******************************************************************************* * SIGNALS ******************************************************************************/ @@ -496,6 +472,14 @@ signals: void locationItemClicked(const GeoCoordinate &swBound, const GeoCoordinate &neBound); /** + * @brief Send location update + * + * @param status Status message + * @param publish Publish on Facebook? + */ + void locationUpdate(const QString &status, bool publish); + + /** * @brief Signals when Login/Logout action is pressed * */ @@ -590,14 +574,6 @@ signals: void searchHistoryItemClicked(const QString &searchString); /** - * @brief Signal for requestLocationUpdate from SituareEngine - * - * @param status Status message - * @param publish Publish on Facebook - */ - void statusUpdate(const QString &status, const bool &publish); - - /** * @brief Dragging mode triggered. */ void draggingModeTriggered(); @@ -608,6 +584,11 @@ signals: void viewZoomFinished(); /** + * @brief Signals when updateLocation request finished successfully + */ + void updateWasSuccessful(); + + /** * @brief Signal for use location ready. * * @param user User object @@ -633,7 +614,6 @@ signals: * DATA MEMBERS ******************************************************************************/ private: - bool m_backupFacebookPublishPolicity; ///< Backup of publish on Facebook checkbox value bool m_errorShown; ///< Indicates if error dialog/note is shown bool m_loggedIn; ///< Indicates login state bool m_refresh; ///< Indicates when webpage is refreshed @@ -658,8 +638,6 @@ private: QMessageBox *m_automaticUpdateLocationDialog; ///< Automatic update location dialog - QString m_backupMessage; ///< Backup of users message - FriendListPanel *m_friendsListPanel; ///< Instance of friends list panel FullScreenButton *m_fullScreenButton; ///< Instance of the fullscreen toggle button IndicatorButtonPanel *m_indicatorButtonPanel; ///< Instance of direction indicator button @@ -668,7 +646,7 @@ private: MapView *m_mapView; ///< Instance of the map view RoutingPanel *m_routingPanel; ///< Instance of routing panel TabbedPanel *m_tabbedPanel; ///< Widget for tabbed panels - UpdateLocationDialog *m_updateLocation; ///< Update location dialog + UpdateLocation *m_updateLocationController; ///< Controller for update location dialog UserInfoPanel *m_userInfoPanel; ///< Instance of the user information panel ZoomButtonPanel *m_zoomButtonPanel; ///< Instance of zoom button panel }; diff --git a/src/ui/updatelocation/updatelocationdialog.cpp b/src/ui/updatelocation/updatelocationdialog.cpp index 166e4bf..034e9bd 100644 --- a/src/ui/updatelocation/updatelocationdialog.cpp +++ b/src/ui/updatelocation/updatelocationdialog.cpp @@ -31,16 +31,19 @@ #include #include +#include "engine/updatelocation.h" + #include "updatelocationdialog.h" const int MESSAGE_MAX_LENGTH = 255; -UpdateLocationDialog::UpdateLocationDialog(const QString &userMessage, bool publishOnFacebook, - QWidget *parent) +UpdateLocationDialog::UpdateLocationDialog(UpdateLocation *controller, QWidget *parent) : QDialog(parent) { qDebug() << __PRETTY_FUNCTION__; + m_controller = controller; + setWindowTitle(tr("Update Location")); QGridLayout *gridLayout = new QGridLayout(); @@ -49,7 +52,7 @@ UpdateLocationDialog::UpdateLocationDialog(const QString &userMessage, bool publ m_textEdit->setAcceptRichText(false); m_charCountLabel = new QLabel(); - if (userMessage.isEmpty()) + if (controller->message().isEmpty()) { m_textEdit->setText(tr("Message:")); m_textEdit->selectAll(); @@ -60,7 +63,7 @@ UpdateLocationDialog::UpdateLocationDialog(const QString &userMessage, bool publ } else { - m_textEdit->setText(userMessage); + m_textEdit->setText(controller->message()); m_textEdit->document()->setModified(true); textChanged(); } @@ -83,7 +86,7 @@ UpdateLocationDialog::UpdateLocationDialog(const QString &userMessage, bool publ m_locationLabel = new QLabel(); m_locationLabel->setWordWrap(true); m_checkBox = new QCheckBox(tr("Publish on Facebook")); - m_checkBox->setChecked(publishOnFacebook); + m_checkBox->setChecked(controller->publish()); QDialogButtonBox *buttonBox = new QDialogButtonBox(Qt::Vertical); QPushButton *sendButton = buttonBox->addButton(QDialogButtonBox::Ok); @@ -116,6 +119,8 @@ UpdateLocationDialog::UpdateLocationDialog(const QString &userMessage, bool publ connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject())); + connect(this, SIGNAL(rejected()), controller, SLOT(clear())); + connect(m_textEdit, SIGNAL(textChanged()), this, SLOT(textChanged())); @@ -131,6 +136,8 @@ UpdateLocationDialog::UpdateLocationDialog(const QString &userMessage, bool publ #endif m_textEdit->setFocus(Qt::OtherFocusReason); + + setAttribute(Qt::WA_DeleteOnClose); } UpdateLocationDialog::~UpdateLocationDialog() @@ -149,11 +156,11 @@ void UpdateLocationDialog::sendUpdate() { qDebug() << __PRETTY_FUNCTION__; - // coordinates for this call will be get from somewhere, map etc... - emit statusUpdate(m_textEdit->document()->isModified() ? m_textEdit->toPlainText() : QString(), - m_checkBox->isChecked()); + m_controller->setMessage(m_textEdit->toPlainText()); + m_controller->setPublish(m_checkBox->isChecked()); + m_controller->send(); - close(); + accept(); } void UpdateLocationDialog::textChanged() diff --git a/src/ui/updatelocation/updatelocationdialog.h b/src/ui/updatelocation/updatelocationdialog.h index 2731061..4bb2987 100644 --- a/src/ui/updatelocation/updatelocationdialog.h +++ b/src/ui/updatelocation/updatelocationdialog.h @@ -29,6 +29,8 @@ #include #endif // Q_WS_MAEMO_5 +class UpdateLocation; + #include "texteditautoresizer.h" class QCheckBox; @@ -53,13 +55,18 @@ public: /** * @brief Default constructor * - * @param userMessage update location dialog message - * @param publishOnFacebook update location dialog Facebook publish policity + * Is deleted automatically when closed. + * + * @param controller Controller for location update * @param parent */ - UpdateLocationDialog(const QString &userMessage = "", bool publishOnFacebook = false, - QWidget *parent = 0); + UpdateLocationDialog(UpdateLocation *controller, QWidget *parent = 0); + /** + * @brief Destructor + * + * Does nothing. + */ ~UpdateLocationDialog(); /******************************************************************************* @@ -76,35 +83,20 @@ public slots: private slots: /** * @brief Used to connect send button - * */ void sendUpdate(); /** * @brief Used to get changes in messagetext - * */ void textChanged(); /** * @brief Used to clear default messagetext - * */ void textSelectionChanged(); /******************************************************************************* - * SIGNALS - ******************************************************************************/ -signals: - /** - * @brief Routing signal for requestLocationUpdate to SituareEngine via MainWindow class - * - * @param status Status message - * @param publish Publish on Facebook - */ - void statusUpdate(const QString &status, const bool &publish); - -/******************************************************************************* * DATA MEMBERS ******************************************************************************/ private: @@ -112,6 +104,8 @@ private: QLabel *m_charCountLabel; ///< Pointer to character counter label QLabel *m_locationLabel; ///< Pointer to locationLabel QTextEdit *m_textEdit; ///< Pointer to TextEdit + + UpdateLocation *m_controller; ///< Controller for location update dialog }; #endif // UPDATELOCATIONDIALOG_H diff --git a/src/ui/userinfo.cpp b/src/ui/userinfo.cpp index 83663a9..9301e6c 100644 --- a/src/ui/userinfo.cpp +++ b/src/ui/userinfo.cpp @@ -112,8 +112,6 @@ UserInfo::UserInfo(QWidget *parent) m_backgroundTopImage.load(":/res/images/list_item_top.png"); m_backgroundMiddleImage.load(":/res/images/list_item_middle.png"); m_backgroundBottomImage.load(":/res/images/list_item_bottom.png"); - -// restoreUnsendMessage(); } UserInfo::~UserInfo()