[trojita] src/Gui: GUI: Settings: simplify stylesheet manipulation
Jan Kundrát
null at kde.org
Sun Mar 24 21:49:56 GMT 2019
Git commit 87d0f1b14017d2caed3ef03dfffc9ffe65a0a809 by Jan Kundrát.
Committed on 10/03/2019 at 13:01.
Pushed by gerrit into branch 'master'.
GUI: Settings: simplify stylesheet manipulation
The IMAP page also sets this stylesheet just once.
Change-Id: Iffb4d32314ce246b69d0b18aaa736692749873be
M +2 -2 src/Gui/SettingsDialog.cpp
https://commits.kde.org/trojita/87d0f1b14017d2caed3ef03dfffc9ffe65a0a809
diff --git a/src/Gui/SettingsDialog.cpp b/src/Gui/SettingsDialog.cpp
index af6af74d..f24b5af2 100644
--- a/src/Gui/SettingsDialog.cpp
+++ b/src/Gui/SettingsDialog.cpp
@@ -1044,6 +1044,8 @@ OutgoingPage::OutgoingPage(SettingsDialog *parent, QSettings &s): QScrollArea(pa
QString profileName = QString::fromUtf8(qgetenv("TROJITA_PROFILE"));
m_smtpAccountSettings = new MSA::Account(this, &s, profileName);
+ portWarningLabel->setStyleSheet(SettingsDialog::warningStyleSheet);
+
method->insertItem(NETWORK, tr("Network"));
method->insertItem(SENDMAIL, tr("Local sendmail-compatible"));
method->insertItem(IMAP_SENDMAIL, tr("IMAP SENDMAIL Extension"));;
@@ -1271,11 +1273,9 @@ void OutgoingPage::save(QSettings &s)
void OutgoingPage::showPortWarning(const QString &warning)
{
if (!warning.isEmpty()) {
- portWarningLabel->setStyleSheet(SettingsDialog::warningStyleSheet);
portWarningLabel->setVisible(true);
portWarningLabel->setText(warning);
} else {
- portWarningLabel->setStyleSheet(QString());
portWarningLabel->setVisible(false);
}
More information about the kde-doc-english
mailing list