OSDN Git Service

QmlDesigner.propertyEditor: fix for Mac
authorThomas Hartmann <Thomas.Hartmann@nokia.com>
Thu, 7 Apr 2011 14:36:51 +0000 (16:36 +0200)
committerThomas Hartmann <Thomas.Hartmann@nokia.com>
Thu, 7 Apr 2011 14:45:33 +0000 (16:45 +0200)
The Cleanlooks style is broken on the Mac atm.

Task-number: QTCREATORBUG-4296
Reviewed-by: Kai Koehne
src/plugins/qmldesigner/components/propertyeditor/basicwidgets.cpp

index 1fbd624..927dbbf 100644 (file)
@@ -48,6 +48,8 @@
 #include <QApplication>
 #include <QGraphicsOpacityEffect>
 #include <QCleanlooksStyle>
+#include <QPlastiqueStyle>
+
 #include <QTextEdit>
 
 
@@ -57,11 +59,16 @@ class CleanLooksSingleton
 {
    public:
      static CleanLooksSingleton* instance();
-     QCleanlooksStyle* style() {return &m_style; };
+     QStyle* style() {return &m_style; };
 
    private:
      static CleanLooksSingleton *m_instance;
+
+#ifdef Q_OS_MAC
+     QPlastiqueStyle m_style;
+#else
      QCleanlooksStyle m_style;
+#endif //Q_OS_MAC
 
      CleanLooksSingleton() {}
      CleanLooksSingleton( const CleanLooksSingleton& );