summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-07-28 23:16:01 +0200
committerMontel Laurent <[email protected]>2015-07-28 23:16:23 +0200
commita502973b61ab931fe5ec1a2bd96134dcc1bb07b4 (patch)
tree01f11ca1a622d7266a37b20e29737e3cf0a8a2f1
parent7f3449d39fe5d24260f7bd378ba748f0d250b9d0 (diff)
Allow to use https
-rw-r--r--messageviewer/gravatar/autotests/gravatarconfiguresettingsdialogtest.cpp3
-rw-r--r--messageviewer/gravatar/gravatarconfiguresettingsdialog.cpp6
-rw-r--r--messageviewer/gravatar/gravatarconfiguresettingsdialog.h1
-rw-r--r--messageviewer/settings/messageviewer.kcfg.cmake3
4 files changed, 13 insertions, 0 deletions
diff --git a/messageviewer/gravatar/autotests/gravatarconfiguresettingsdialogtest.cpp b/messageviewer/gravatar/autotests/gravatarconfiguresettingsdialogtest.cpp
index 3938578..1c5575b 100644
--- a/messageviewer/gravatar/autotests/gravatarconfiguresettingsdialogtest.cpp
+++ b/messageviewer/gravatar/autotests/gravatarconfiguresettingsdialogtest.cpp
@@ -54,6 +54,9 @@ void GravatarConfigureSettingsDialogTest::shouldHaveDefaultValue()
QCheckBox *fallbackGravatar = dlg.findChild<QCheckBox *>(QStringLiteral("fallbackgravatar"));
QVERIFY(fallbackGravatar);
+
+ QCheckBox *useHttps = dlg.findChild<QCheckBox *>(QStringLiteral("usehttps"));
+ QVERIFY(useHttps);
}
QTEST_MAIN(GravatarConfigureSettingsDialogTest)
diff --git a/messageviewer/gravatar/gravatarconfiguresettingsdialog.cpp b/messageviewer/gravatar/gravatarconfiguresettingsdialog.cpp
index 0e9f977..fc37047 100644
--- a/messageviewer/gravatar/gravatarconfiguresettingsdialog.cpp
+++ b/messageviewer/gravatar/gravatarconfiguresettingsdialog.cpp
@@ -56,6 +56,10 @@ GravatarConfigureSettingsDialog::GravatarConfigureSettingsDialog(QWidget *parent
mUseDefaultPixmap->setObjectName(QStringLiteral("usedefaultimage"));
topLayout->addWidget(mUseDefaultPixmap);
+ mUseHttps = new QCheckBox(i18n("Use Https"));
+ mUseHttps->setObjectName(QStringLiteral("usehttps"));
+ topLayout->addWidget(mUseHttps);
+
QHBoxLayout *cacheSizeLayout = new QHBoxLayout;
topLayout->addLayout(cacheSizeLayout);
QLabel *lab = new QLabel(i18n("Gravatar Cache Size:"));
@@ -92,6 +96,7 @@ void GravatarConfigureSettingsDialog::save()
saveSpinBox(mGravatarCacheSize, MessageViewer::GlobalSettings::self()->gravatarCacheSizeItem());
saveCheckBox(mFallbackGravatar, MessageViewer::GlobalSettings::self()->fallbackToGravatarItem());
saveCheckBox(mUseLibravatar, MessageViewer::GlobalSettings::self()->libravatarSupportEnabledItem());
+ saveCheckBox(mUseHttps, MessageViewer::GlobalSettings::self()->gravatarHttpsSupportItem());
accept();
}
@@ -101,6 +106,7 @@ void GravatarConfigureSettingsDialog::load()
loadWidget(mGravatarCacheSize, MessageViewer::GlobalSettings::self()->gravatarCacheSizeItem());
loadWidget(mFallbackGravatar, MessageViewer::GlobalSettings::self()->fallbackToGravatarItem());
loadWidget(mUseLibravatar, MessageViewer::GlobalSettings::self()->libravatarSupportEnabledItem());
+ loadWidget(mUseHttps, MessageViewer::GlobalSettings::self()->gravatarHttpsSupportItem());
}
void GravatarConfigureSettingsDialog::slotClearGravatarCache()
diff --git a/messageviewer/gravatar/gravatarconfiguresettingsdialog.h b/messageviewer/gravatar/gravatarconfiguresettingsdialog.h
index d59ed06..ac5a5b6 100644
--- a/messageviewer/gravatar/gravatarconfiguresettingsdialog.h
+++ b/messageviewer/gravatar/gravatarconfiguresettingsdialog.h
@@ -41,6 +41,7 @@ private:
QCheckBox *mUseDefaultPixmap;
QCheckBox *mUseLibravatar;
QCheckBox *mFallbackGravatar;
+ QCheckBox *mUseHttps;
QPushButton *mClearGravatarCache;
QSpinBox *mGravatarCacheSize;
};
diff --git a/messageviewer/settings/messageviewer.kcfg.cmake b/messageviewer/settings/messageviewer.kcfg.cmake
index 3362b5b..1130ffa 100644
--- a/messageviewer/settings/messageviewer.kcfg.cmake
+++ b/messageviewer/settings/messageviewer.kcfg.cmake
@@ -205,6 +205,9 @@ xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0 http://www.kde.org/sta
<entry name="LibravatarSupportEnabled" type="Bool">
<default>false</default>
</entry>
+ <entry name="GravatarHttpsSupport" type="Bool">
+ <default>false</default>
+ </entry>
</group>