Git commit 0a57436f2933dbbb8e1509b8c1d130f461c794ea by Jan Kundr?t. Committed on 04/06/2014 at 12:35. Pushed by jkt into branch 'master'.
GUI: Prevent a blank line in the Outgoing settings page It's better to sync the port warning state with whatever is initially in the settings. REVIEW: 118523 M +4 -0 src/MSA/Account.cpp M +3 -2 src/MSA/Account.h http://commits.kde.org/trojita/0a57436f2933dbbb8e1509b8c1d130f461c794ea diff --git a/src/MSA/Account.cpp b/src/MSA/Account.cpp index cb77364..334e35b 100644 --- a/src/MSA/Account.cpp +++ b/src/MSA/Account.cpp @@ -23,6 +23,7 @@ #include <QDebug> #include <QObject> #include <QSettings> +#include "Common/InvokeMethod.h" #include "Common/PortNumbers.h" #include "Common/SettingsNames.h" #include "MSA/Account.h" @@ -294,6 +295,9 @@ void Account::restoreSettings() m_saveToImap = m_settings->value(Common::SettingsNames::composerSaveToImapKey, true).toBool(); m_sentMailboxName = m_settings->value(Common::SettingsNames::composerImapSentKey, QLatin1String("Sent")).toString(); m_useBurl = m_settings->value(Common::SettingsNames::smtpUseBurlKey, false).toBool(); + + // Be sure the GUI has time to react to the port warning status + EMIT_LATER_NOARG(this, maybeShowPortWarning); } } diff --git a/src/MSA/Account.h b/src/MSA/Account.h index e9ee8be..56a3c44 100644 --- a/src/MSA/Account.h +++ b/src/MSA/Account.h @@ -67,8 +67,6 @@ public: static quint16 defaultPort(const Method method); - void maybeShowPortWarning(); - Q_INVOKABLE void saveSettings(); Q_INVOKABLE void restoreSettings(); @@ -97,6 +95,9 @@ public slots: void setSentMailboxName(const QString &location); void setUseBurl(const bool selected); +private slots: + void maybeShowPortWarning(); + private: QSettings *m_settings; QString m_accountName;
