From 3ecfc2f343b9c87413146e6a11bc6a15e0c34be8 Mon Sep 17 00:00:00 2001
From: Jens Bache-Wiig <jbache@trolltech.com>
Date: Mon, 22 Mar 2010 13:20:31 +0100
Subject: [PATCH] Fix white text in tool tips and dock widget decorations

This was a regression in the custom styling. We no longer set
the panel property on the mainwindow but rely on qobject_cast
to style custom mainwindows.

Reviewed-by: thorbjorn
---
 src/libs/utils/fancymainwindow.cpp        | 1 -
 src/plugins/coreplugin/manhattanstyle.cpp | 5 +++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/libs/utils/fancymainwindow.cpp b/src/libs/utils/fancymainwindow.cpp
index 0331313e2b9..cf845989a16 100644
--- a/src/libs/utils/fancymainwindow.cpp
+++ b/src/libs/utils/fancymainwindow.cpp
@@ -55,7 +55,6 @@ FancyMainWindowPrivate::FancyMainWindowPrivate() :
 FancyMainWindow::FancyMainWindow(QWidget *parent) :
     QMainWindow(parent), d(new FancyMainWindowPrivate)
 {
-    setProperty("panelwidget", true);
 }
 
 FancyMainWindow::~FancyMainWindow()
diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp
index c9fb0a9cd92..4dd4ac6afae 100644
--- a/src/plugins/coreplugin/manhattanstyle.cpp
+++ b/src/plugins/coreplugin/manhattanstyle.cpp
@@ -36,6 +36,8 @@
 #include <utils/qtcassert.h>
 #include <utils/stylehelper.h>
 
+#include <utils/fancymainwindow.h>
+
 #include <QtGui/QApplication>
 #include <QtGui/QComboBox>
 #include <QtGui/QDialog>
@@ -85,6 +87,9 @@ bool panelWidget(const QWidget *widget)
     if (qobject_cast<const QDialog *>(widget->window()))
         return false;
 
+    if (qobject_cast<const Utils::FancyMainWindow *>(widget))
+        return true;
+
     const QWidget *p = widget;
     while (p) {
         if (qobject_cast<const QToolBar *>(p) ||
-- 
GitLab