summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-09-21 13:49:32 +0200
committerMontel Laurent <[email protected]>2015-09-21 14:02:12 +0200
commite12b63062ce82cccc6c516f36e7bac9466c91e50 (patch)
tree5ab1cddd25e1ba9cf9992a9627477e0369a69b32
parent47f0ddf2eb611324902fac64182a43ea4bc6e76d (diff)
Emit grantleetheme change
-rw-r--r--messageviewer/src/header/grantleeheaderstyleplugin/grantleeheaderstyleinterface.cpp7
-rw-r--r--messageviewer/src/header/grantleeheaderstyleplugin/grantleeheaderstyleinterface.h2
-rw-r--r--messageviewer/src/header/headerstylemenumanager.cpp3
3 files changed, 8 insertions, 4 deletions
diff --git a/messageviewer/src/header/grantleeheaderstyleplugin/grantleeheaderstyleinterface.cpp b/messageviewer/src/header/grantleeheaderstyleplugin/grantleeheaderstyleinterface.cpp
index a58fbd2..ccee584 100644
--- a/messageviewer/src/header/grantleeheaderstyleplugin/grantleeheaderstyleinterface.cpp
+++ b/messageviewer/src/header/grantleeheaderstyleplugin/grantleeheaderstyleinterface.cpp
@@ -37,8 +37,7 @@ void GrantleeHeaderStyleInterface::createAction(KActionMenu *menu, QActionGroup
{
mThemeManager = new GrantleeTheme::GrantleeThemeManager(GrantleeTheme::GrantleeThemeManager::Mail, QStringLiteral("header.desktop"), ac, QStringLiteral("messageviewer/themes/"));
mThemeManager->setDownloadNewStuffConfigFile(QStringLiteral("messageviewer_header_themes.knsrc"));
- //TODO
- //connect(mThemeManager, SIGNAL(grantleeThemeSelected()), this, SLOT(slotGrantleeHeaders()));
+ connect(mThemeManager, &GrantleeTheme::GrantleeThemeManager::grantleeThemeSelected, this, &GrantleeHeaderStyleInterface::slotGrantleeHeaders);
connect(mThemeManager, &GrantleeTheme::GrantleeThemeManager::updateThemes, this, &HeaderStyleInterface::styleUpdated);
mThemeManager->setActionGroup(actionGroup);
@@ -52,3 +51,7 @@ void GrantleeHeaderStyleInterface::activateAction()
}
+void GrantleeHeaderStyleInterface::slotGrantleeHeaders()
+{
+ slotStyleChanged();
+}
diff --git a/messageviewer/src/header/grantleeheaderstyleplugin/grantleeheaderstyleinterface.h b/messageviewer/src/header/grantleeheaderstyleplugin/grantleeheaderstyleinterface.h
index 42a88e6..1fdf939 100644
--- a/messageviewer/src/header/grantleeheaderstyleplugin/grantleeheaderstyleinterface.h
+++ b/messageviewer/src/header/grantleeheaderstyleplugin/grantleeheaderstyleinterface.h
@@ -37,6 +37,8 @@ public:
void createAction(KActionMenu *menu, QActionGroup *actionGroup, KActionCollection *ac) Q_DECL_OVERRIDE;
void activateAction() Q_DECL_OVERRIDE;
+private Q_SLOTS:
+ void slotGrantleeHeaders();
private:
GrantleeTheme::GrantleeThemeManager *mThemeManager;
};
diff --git a/messageviewer/src/header/headerstylemenumanager.cpp b/messageviewer/src/header/headerstylemenumanager.cpp
index d3ca7b7..338b6ad 100644
--- a/messageviewer/src/header/headerstylemenumanager.cpp
+++ b/messageviewer/src/header/headerstylemenumanager.cpp
@@ -81,8 +81,7 @@ void HeaderStyleMenuManagerPrivate::initialize(KActionCollection *ac)
Q_FOREACH (MessageViewer::HeaderStylePlugin *plugin, lstPlugin) {
MessageViewer::HeaderStyleInterface *interface = plugin->createView(headerMenu, group, ac, q);
lstInterface.insert(plugin->name(), interface);
- q->connect(interface, &HeaderStyleInterface::styleChanged, q,
- &HeaderStyleMenuManager::styleChanged);
+ q->connect(interface, &HeaderStyleInterface::styleChanged, q, &HeaderStyleMenuManager::styleChanged);
q->connect(interface, &HeaderStyleInterface::styleUpdated, q, &HeaderStyleMenuManager::styleUpdated);
}
}