From 196e0d76e638699efc20dc43f0827d8f0da173ba Mon Sep 17 00:00:00 2001
From: Eike Ziller <eike.ziller@theqtcompany.com>
Date: Wed, 17 Dec 2014 17:04:43 +0100
Subject: [PATCH] Welcome: Fix compilation with QQuickWidget

Use the background color property in the QML code instead of relying on
QQuickView::setColor

Change-Id: I556515a42d9483f88500fa5a5c56ea21f48fa685
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
---
 share/qtcreator/welcomescreen/welcomescreen.qml      | 4 +++-
 share/qtcreator/welcomescreen/widgets/PageLoader.qml | 2 +-
 src/plugins/welcome/welcomeplugin.cpp                | 3 +--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/share/qtcreator/welcomescreen/welcomescreen.qml b/share/qtcreator/welcomescreen/welcomescreen.qml
index 4d91375ed55..c6aab715d1e 100644
--- a/share/qtcreator/welcomescreen/welcomescreen.qml
+++ b/share/qtcreator/welcomescreen/welcomescreen.qml
@@ -47,7 +47,7 @@ Item  {
 
     Rectangle {
         id: splitter
-        color: creatorTheme.Welcome_DividerColor; // divider between left and right pane
+        color: creatorTheme.Welcome_DividerColor // divider between left and right pane
         width: 1
         anchors.top: parent.top
         anchors.bottom: parent.bottom
@@ -66,5 +66,7 @@ Item  {
         anchors.left: splitter.right
         anchors.right: parent.right
         anchors.bottom: parent.bottom
+
+        color: creatorTheme.BackgroundColorNormal
     }
 }
diff --git a/share/qtcreator/welcomescreen/widgets/PageLoader.qml b/share/qtcreator/welcomescreen/widgets/PageLoader.qml
index 127c604da6d..aea16aa45b0 100644
--- a/share/qtcreator/welcomescreen/widgets/PageLoader.qml
+++ b/share/qtcreator/welcomescreen/widgets/PageLoader.qml
@@ -30,7 +30,7 @@
 
 import QtQuick 2.1
 
-Item {
+Rectangle {
     id: pageLoader
 
     property alias model: repeater.model
diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp
index 4e20e7440c0..2d26a2393aa 100644
--- a/src/plugins/welcome/welcomeplugin.cpp
+++ b/src/plugins/welcome/welcomeplugin.cpp
@@ -132,7 +132,7 @@ WelcomeMode::WelcomeMode()
     layout->setSpacing(0);
 
     m_welcomePage = new QuickContainer();
-    onThemeChanged(); //initialize background color
+    onThemeChanged(); // initialize background color and theme properties
     m_welcomePage->setResizeMode(QuickContainer::SizeRootObjectToView);
 
     m_welcomePage->setObjectName(QLatin1String("WelcomePage"));
@@ -161,7 +161,6 @@ WelcomeMode::WelcomeMode()
 
 void WelcomeMode::onThemeChanged()
 {
-    m_welcomePage->setColor(creatorTheme()->color(Theme::BackgroundColorNormal));
     const QVariantHash creatorTheme = Utils::creatorTheme()->values();
     QVariantHash::const_iterator it;
     for (it = creatorTheme.constBegin(); it != creatorTheme.constEnd(); ++it)
-- 
GitLab