summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2017-04-10 10:32:14 -0700
committerJake Petroules <jake.petroules@qt.io>2017-04-13 21:39:09 +0000
commit401d9b527823ffc8691e8a624ee3d40495622359 (patch)
treeae10e7d53bc810f9a3402cd9f34f480d0d0d3e67 /src/widgets/styles
parent4b0d6704d9e44b19c14958c031186ea17370755d (diff)
Remove the Windows XP style from public accessibility
Later, the Windows XP style will be removed entirely by means of being merged with the Windows Vista style (which inherits from the XP style). There was actually no reason for these styles being separate classes in the first place, because both result in the same appearance for controls on the running version of Windows. Therefore, the windowsxp style merely appears as a "broken" version of the windowsvista style, with only minor differences based on the additional metrics that the vista style provides. The windowsxp style does NOT, and never did, allow users to get a Windows XP style appearance on Windows 7 and above (which is currently Qt's minimum supported platform). Therefore, now that Qt no longer supports Windows XP, the windowsxp style is unusable. [ChangeLog][QtWidgets] The windowsxp style is no longer available as a separate style, because it did not (and cannot) actually provide an XP-style appearance on currently supported Qt platforms. Change-Id: I513d9bce3f247f97cfb28dfee88fe888469e0a6f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Diffstat (limited to 'src/widgets/styles')
-rw-r--r--src/widgets/styles/qmacstyle.qdoc2
-rw-r--r--src/widgets/styles/qstyle.cpp4
-rw-r--r--src/widgets/styles/qstylefactory.cpp15
-rw-r--r--src/widgets/styles/qstylesheetstyle_default.cpp4
-rw-r--r--src/widgets/styles/qwindowsxpstyle.cpp2
-rw-r--r--src/widgets/styles/qwindowsxpstyle_p.h4
-rw-r--r--src/widgets/styles/qwindowsxpstyle_p_p.h2
-rw-r--r--src/widgets/styles/styles.pri2
8 files changed, 10 insertions, 25 deletions
diff --git a/src/widgets/styles/qmacstyle.qdoc b/src/widgets/styles/qmacstyle.qdoc
index a77843a4dd..fcbc813844 100644
--- a/src/widgets/styles/qmacstyle.qdoc
+++ b/src/widgets/styles/qmacstyle.qdoc
@@ -82,7 +82,7 @@
documentation.
\image qmacstyle.png
- \sa QWindowsXPStyle, QWindowsStyle, QFusionStyle
+ \sa QWindowsVistaStyle, QWindowsStyle, QFusionStyle
*/
diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp
index 7b2ac49fa4..7e37d10cb5 100644
--- a/src/widgets/styles/qstyle.cpp
+++ b/src/widgets/styles/qstyle.cpp
@@ -2291,8 +2291,8 @@ int QStyle::sliderValueFromPosition(int min, int max, int pos, int span, bool up
Returns the style's standard palette.
Note that on systems that support system colors, the style's
- standard palette is not used. In particular, the Windows XP,
- Vista, and Mac styles do not use the standard palette, but make
+ standard palette is not used. In particular, the Windows
+ Vista and Mac styles do not use the standard palette, but make
use of native theme engines. With these styles, you should not set
the palette with QApplication::setPalette().
diff --git a/src/widgets/styles/qstylefactory.cpp b/src/widgets/styles/qstylefactory.cpp
index 8dc603f8e6..e29794aeb1 100644
--- a/src/widgets/styles/qstylefactory.cpp
+++ b/src/widgets/styles/qstylefactory.cpp
@@ -50,9 +50,6 @@
#include "qandroidstyle_p.h"
#endif
#endif
-#if QT_CONFIG(style_windowsxp)
-#include "qwindowsxpstyle_p.h"
-#endif
#if QT_CONFIG(style_windowsvista)
#include "qwindowsvistastyle_p.h"
#endif
@@ -81,7 +78,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
The valid keys can be retrieved using the keys()
function. Typically they include "windows" and "fusion".
- Depending on the platform, "windowsxp", "windowsvista"
+ Depending on the platform, "windowsvista"
and "macintosh" may be available.
Note that keys are case insensitive.
@@ -108,11 +105,6 @@ QStyle *QStyleFactory::create(const QString& key)
ret = new QWindowsStyle;
else
#endif
-#if QT_CONFIG(style_windowsxp)
- if (style == QLatin1String("windowsxp"))
- ret = new QWindowsXPStyle;
- else
-#endif
#if QT_CONFIG(style_windowsvista)
if (style == QLatin1String("windowsvista"))
ret = new QWindowsVistaStyle;
@@ -164,11 +156,6 @@ QStringList QStyleFactory::keys()
if (!list.contains(QLatin1String("Windows")))
list << QLatin1String("Windows");
#endif
-#if QT_CONFIG(style_windowsxp)
- if (!list.contains(QLatin1String("WindowsXP")) &&
- (QSysInfo::WindowsVersion >= QSysInfo::WV_XP && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)))
- list << QLatin1String("WindowsXP");
-#endif
#if QT_CONFIG(style_windowsvista)
if (!list.contains(QLatin1String("WindowsVista")) &&
(QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)))
diff --git a/src/widgets/styles/qstylesheetstyle_default.cpp b/src/widgets/styles/qstylesheetstyle_default.cpp
index 168251b0f3..1cb1adb2db 100644
--- a/src/widgets/styles/qstylesheetstyle_default.cpp
+++ b/src/widgets/styles/qstylesheetstyle_default.cpp
@@ -78,7 +78,7 @@ using namespace QCss;
bSelector.pseudos << pseudo
// This is attributes. The third parameter is AttributeSelector::*
-// Ex. QComboBox[style="QWindowsXPStyle"]
+// Ex. QComboBox[style="QWindowsVistaStyle"]
// ^ ^
#define ADD_ATTRIBUTE_SELECTOR(x, y, z) \
@@ -155,7 +155,7 @@ StyleSheet QStyleSheetStyle::getDefaultStyleSheet() const
// pixmap based style doesn't support any features
bool styleIsPixmapBased = baseStyle()->inherits("QMacStyle")
- || baseStyle()->inherits("QWindowsXPStyle");
+ || baseStyle()->inherits("QWindowsVistaStyle");
/*QLineEdit {
diff --git a/src/widgets/styles/qwindowsxpstyle.cpp b/src/widgets/styles/qwindowsxpstyle.cpp
index b50c4b6be4..2fd40a57af 100644
--- a/src/widgets/styles/qwindowsxpstyle.cpp
+++ b/src/widgets/styles/qwindowsxpstyle.cpp
@@ -39,7 +39,7 @@
#include "qwindowsxpstyle_p.h"
#include "qwindowsxpstyle_p_p.h"
-#if QT_CONFIG(style_windowsxp) || defined(QT_PLUGIN)
+#if QT_CONFIG(style_windowsvista) || defined(QT_PLUGIN)
#include <private/qobject_p.h>
#include <private/qpaintengine_raster_p.h>
diff --git a/src/widgets/styles/qwindowsxpstyle_p.h b/src/widgets/styles/qwindowsxpstyle_p.h
index 62e3af927c..83c96abb7d 100644
--- a/src/widgets/styles/qwindowsxpstyle_p.h
+++ b/src/widgets/styles/qwindowsxpstyle_p.h
@@ -57,7 +57,7 @@
QT_BEGIN_NAMESPACE
-#if QT_CONFIG(style_windowsxp)
+#if QT_CONFIG(style_windowsvista)
class QWindowsXPStylePrivate;
class QWindowsXPStyle : public QWindowsStyle
@@ -102,7 +102,7 @@ private:
friend class QStyleFactory;
};
-#endif // style_windowsxp
+#endif // style_windowsvista
QT_END_NAMESPACE
diff --git a/src/widgets/styles/qwindowsxpstyle_p_p.h b/src/widgets/styles/qwindowsxpstyle_p_p.h
index fb5210cb07..8cac01950c 100644
--- a/src/widgets/styles/qwindowsxpstyle_p_p.h
+++ b/src/widgets/styles/qwindowsxpstyle_p_p.h
@@ -94,7 +94,7 @@ QT_BEGIN_NAMESPACE
// Uncomment define below to build debug assisting code, and output
// #define DEBUG_XP_STYLE
-#if QT_CONFIG(style_windowsxp)
+#if QT_CONFIG(style_windowsvista)
// Declarations -----------------------------------------------------------------------------------
class XPThemeData
diff --git a/src/widgets/styles/styles.pri b/src/widgets/styles/styles.pri
index 481123f0d4..4c13311ebc 100644
--- a/src/widgets/styles/styles.pri
+++ b/src/widgets/styles/styles.pri
@@ -48,9 +48,7 @@ qtConfig(style-mac) {
qtConfig(style-windowsvista) {
HEADERS += styles/qwindowsvistastyle_p.h styles/qwindowsvistastyle_p_p.h
SOURCES += styles/qwindowsvistastyle.cpp
-}
-qtConfig(style-windowsxp) {
HEADERS += styles/qwindowsxpstyle_p.h styles/qwindowsxpstyle_p_p.h
SOURCES += styles/qwindowsxpstyle.cpp
}