diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2009-07-28 12:49:37 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2009-07-28 12:49:37 (GMT) |
commit | 93ad359f93de72ef8c4d5f0073dc20ba22b9023c (patch) | |
tree | 2463602896f5d671d62a16c3338a9b7ba8492db1 /tools/qmlviewer/qmlviewer.cpp | |
parent | f95cecebddb8ce0ef40bd691bbe574db1a570b8c (diff) | |
download | Qt-93ad359f93de72ef8c4d5f0073dc20ba22b9023c.zip Qt-93ad359f93de72ef8c4d5f0073dc20ba22b9023c.tar.gz Qt-93ad359f93de72ef8c4d5f0073dc20ba22b9023c.tar.bz2 |
Fix for QmlPalette
Add a colorGroup property and remove palette properties from the
root context.
Diffstat (limited to 'tools/qmlviewer/qmlviewer.cpp')
-rw-r--r-- | tools/qmlviewer/qmlviewer.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/tools/qmlviewer/qmlviewer.cpp b/tools/qmlviewer/qmlviewer.cpp index 95cd24b..4f35fe8 100644 --- a/tools/qmlviewer/qmlviewer.cpp +++ b/tools/qmlviewer/qmlviewer.cpp @@ -16,7 +16,6 @@ #include "qmlviewer.h" #include <QtDeclarative/qmlcontext.h> #include <QtDeclarative/qmlengine.h> -#include "qmlpalette.h" #include "qml.h" #include <private/qperformancelog_p.h> #include <QAbstractAnimation> @@ -134,8 +133,6 @@ QmlViewer::QmlViewer(QWidget *parent, Qt::WindowFlags flags) devicemode = false; skin = 0; canvas = 0; - palette = 0; - disabledPalette = 0; record_autotime = 0; record_period = 20; @@ -392,7 +389,6 @@ void QmlViewer::openQml(const QString& fileName) } } - setupPalettes(); canvas->setUrl(url); QTime t; @@ -417,19 +413,6 @@ void QmlViewer::openQml(const QString& fileName) #endif } -void QmlViewer:: setupPalettes() -{ - delete palette; - palette = new QmlPalette; - QmlContext *ctxt = canvas->rootContext(); - ctxt->setContextProperty("activePalette", palette); - - delete disabledPalette; - disabledPalette = new QmlPalette; - disabledPalette->setColorGroup(QPalette::Disabled); - ctxt->setContextProperty("disabledPalette", disabledPalette); -} - void QmlViewer::setSkin(const QString& skinDirectory) { // XXX QWidget::setMask does not handle changes well, and we may |