diff options
author | Alessandro Portale <alessandro.portale@theqtcompany.com> | 2016-01-08 12:37:27 +0100 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@theqtcompany.com> | 2016-01-14 08:40:40 +0000 |
commit | cacd014dc2f7ae72c9751e0b7b5f7a6064737493 (patch) | |
tree | a08dc8eb13a47b75bcb1dd255cee16a6f433894b /src/plugins/welcome/welcomeplugin.cpp | |
parent | 9573ead443c8da39c7336043990084fd8784dd6a (diff) |
Theme: Force new start of Creator when changing the theme
Let's face it. "Live" theme change doesn't work reliably and
there is currently no effort to make this work. This change
removes the theme change during a Qt Creator run and shows "Restart
required" message dialog which we know from the language settings.
Change-Id: Ic9d300c5378841905260ff725aa3011717191de7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/welcome/welcomeplugin.cpp')
-rw-r--r-- | src/plugins/welcome/welcomeplugin.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp index 26b0aed55d..af8560a04b 100644 --- a/src/plugins/welcome/welcomeplugin.cpp +++ b/src/plugins/welcome/welcomeplugin.cpp @@ -100,8 +100,6 @@ public: int activePlugin() const { return m_activePlugin; } public slots: - void onThemeChanged(); - void setActivePlugin(int pos) { if (m_activePlugin != pos) { @@ -118,6 +116,7 @@ private: void sceneGraphError(QQuickWindow::SceneGraphError, const QString &message); void facilitateQml(QQmlEngine *engine); void addPages(const QList<IWelcomePage *> &pages); + void applyTheme(); QWidget *m_modeWidget; QuickContainer *m_welcomePage; @@ -153,7 +152,7 @@ WelcomeMode::WelcomeMode() layout->setSpacing(0); m_welcomePage = new QuickContainer(); - onThemeChanged(); // initialize background color and theme properties + applyTheme(); // initialize background color and theme properties m_welcomePage->setResizeMode(QuickContainer::SizeRootObjectToView); m_welcomePage->setObjectName(QLatin1String("WelcomePage")); @@ -175,12 +174,10 @@ WelcomeMode::WelcomeMode() layout->addWidget(container); #endif // USE_QUICK_WIDGET - connect(ICore::instance(), &ICore::themeChanged, this, &WelcomeMode::onThemeChanged); - setWidget(m_modeWidget); } -void WelcomeMode::onThemeChanged() +void WelcomeMode::applyTheme() { const QVariantHash creatorTheme = Utils::creatorTheme()->values(); for (auto it = creatorTheme.constBegin(); it != creatorTheme.constEnd(); ++it) |