From 570ae40f57f048d53ed32d035804746a11489f48 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Tue, 18 Sep 2012 13:55:45 +0200 Subject: Remove CDE and Motif styles from qtbase It is time to clean up some of our legacy code. These styles have not been actively maintained for a long time and I think it is safe to say that they should no longer belong as part of the default distribution of Qt. We dont support any platforms based on CDE with our source packages. Note that even if we are removing these styles from the default distribution of Qt, applications that depend on them will still be able to bundle the existing (and unmodified) styles along with their own source code as we are not breaking compatibility. Change-Id: I1709630c20ba8e8088cd01628628d86856db57a4 Reviewed-by: J-P Nurmi Reviewed-by: Jens Bache-Wiig --- examples/widgets/widgets/styles/norwegianwoodstyle.cpp | 12 ++++++------ examples/widgets/widgets/styles/norwegianwoodstyle.h | 4 ++-- examples/widgets/widgets/styles/styles.pro | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'examples/widgets/widgets/styles') diff --git a/examples/widgets/widgets/styles/norwegianwoodstyle.cpp b/examples/widgets/widgets/styles/norwegianwoodstyle.cpp index 143732952c..b8a677b9fa 100644 --- a/examples/widgets/widgets/styles/norwegianwoodstyle.cpp +++ b/examples/widgets/widgets/styles/norwegianwoodstyle.cpp @@ -112,9 +112,9 @@ int NorwegianWoodStyle::pixelMetric(PixelMetric metric, case PM_ComboBoxFrameWidth: return 8; case PM_ScrollBarExtent: - return QMotifStyle::pixelMetric(metric, option, widget) + 4; + return QWindowsStyle::pixelMetric(metric, option, widget) + 4; default: - return QMotifStyle::pixelMetric(metric, option, widget); + return QWindowsStyle::pixelMetric(metric, option, widget); } } //! [8] @@ -131,7 +131,7 @@ int NorwegianWoodStyle::styleHint(StyleHint hint, const QStyleOption *option, case SH_EtchDisabledText: return int(true); default: - return QMotifStyle::styleHint(hint, option, widget, returnData); + return QWindowsStyle::styleHint(hint, option, widget, returnData); } } //! [10] @@ -256,7 +256,7 @@ void NorwegianWoodStyle::drawPrimitive(PrimitiveElement element, //! [32] //! [33] default: //! [33] //! [34] - QMotifStyle::drawPrimitive(element, option, painter, widget); + QWindowsStyle::drawPrimitive(element, option, painter, widget); } } //! [34] @@ -284,11 +284,11 @@ void NorwegianWoodStyle::drawControl(ControlElement element, } } } - QMotifStyle::drawControl(element, &myButtonOption, painter, widget); + QWindowsStyle::drawControl(element, &myButtonOption, painter, widget); } break; default: - QMotifStyle::drawControl(element, option, painter, widget); + QWindowsStyle::drawControl(element, option, painter, widget); } } //! [36] diff --git a/examples/widgets/widgets/styles/norwegianwoodstyle.h b/examples/widgets/widgets/styles/norwegianwoodstyle.h index 1f1e38cfcb..84ace3b7a8 100644 --- a/examples/widgets/widgets/styles/norwegianwoodstyle.h +++ b/examples/widgets/widgets/styles/norwegianwoodstyle.h @@ -41,7 +41,7 @@ #ifndef NORWEGIANWOODSTYLE_H #define NORWEGIANWOODSTYLE_H -#include +#include #include QT_BEGIN_NAMESPACE @@ -49,7 +49,7 @@ class QPainterPath; QT_END_NAMESPACE //! [0] -class NorwegianWoodStyle : public QMotifStyle +class NorwegianWoodStyle : public QWindowsStyle { Q_OBJECT diff --git a/examples/widgets/widgets/styles/styles.pro b/examples/widgets/widgets/styles/styles.pro index fef1dc6084..0be4f1ef3c 100644 --- a/examples/widgets/widgets/styles/styles.pro +++ b/examples/widgets/widgets/styles/styles.pro @@ -5,7 +5,7 @@ SOURCES = main.cpp \ widgetgallery.cpp RESOURCES = styles.qrc -REQUIRES += "contains(styles, motif)" +REQUIRES += "contains(styles, windows)" # install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/styles -- cgit v1.2.3