summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorSami Merila <sami.merila@nokia.com>2009-12-23 11:25:51 (GMT)
committerSami Merila <sami.merila@nokia.com>2009-12-23 11:25:51 (GMT)
commit6928ffb7533d23f0be220116a7b11d90bee72fb5 (patch)
tree4d421db2c8890177b3aafbe369912f6be9bca81b /src/gui
parent09cd5f7324b8346f1df43a3dff61d337073a6358 (diff)
downloadQt-6928ffb7533d23f0be220116a7b11d90bee72fb5.zip
Qt-6928ffb7533d23f0be220116a7b11d90bee72fb5.tar.gz
Qt-6928ffb7533d23f0be220116a7b11d90bee72fb5.tar.bz2
QWidget with the window flag Qt::Dialog is not decorated as a dialog
Previously style casted widgets to QDialog to see if it is able to draw dialog background theme graphic. As a fix, we now query window flag from the widget and if it is equivalent of Qt::Dialog, draw dialog background. Task-number: QTBUG-5930 Reviewed-by: Janne Koskinen
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/styles/qs60style.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 01b9fa4..b386c28 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -339,7 +339,7 @@ QColor QS60StylePrivate::lighterColor(const QColor &baseColor)
bool QS60StylePrivate::drawsOwnThemeBackground(const QWidget *widget)
{
- return qobject_cast<const QDialog *> (widget);
+ return (widget ? (widget->windowType() == Qt::Dialog) : false);
}
QFont QS60StylePrivate::s60Font(