Revamp configure system for widget styles

Add [-no]-style-foo command line options for all widget styles, bringing
this closer in line with configure.exe. Add proper platform dependencies
and a configure test for the required uxtheme.h header on Windows. Clean
up and simplify styles.pri. Don't let configure.exe define QT_NO_STYLE_*
any more, as styles.pri does that locally anyway.

Change-Id: I81341f887a65b4e45e77380974eb79743acfad77
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
Lars Knoll 2016-06-27 16:45:03 +02:00 committed by Oswald Buddenhagen
parent 27b03be893
commit 98ddf9262e
4 changed files with 23 additions and 31 deletions

View File

@ -169,6 +169,12 @@
"ssse3": "boolean",
"static": { "type": "enum", "name": "shared", "values": { "yes": "no", "no": "yes" } },
"strip": "boolean",
"style-windows": "boolean",
"style-windowsxp": "boolean",
"style-windowsvista": "boolean",
"style-fusion": "boolean",
"style-mac": "boolean",
"style-android": "boolean",
"syslog": "boolean",
"sysroot": "string",
"system-proxies": "boolean",
@ -1170,6 +1176,11 @@
"test": "win/directwrite2",
"use": "directwrite"
},
"uxtheme": {
"description": "uxtheme.h",
"type": "files",
"files": [ "uxtheme.h" ]
},
"qpa_default_platform": {
"description": "default QPA platform",
"type": "qpaDefaultPlatform",
@ -2287,36 +2298,37 @@
"condition": "libs.tds",
"output": [ "sqldriver" ]
},
"fusion-style": {
"style-fusion": {
"description": "Fusion Style",
"output": [ "styles" ]
},
"mac-style": {
"style-mac": {
"description": "Mac Style",
"condition": "config.osx",
"output": [ "styles" ]
},
"windows-style": {
"style-windows": {
"description": "Windows Style",
"output": [ "styles" ]
},
"windowsxp-style": {
"style-windowsxp": {
"description": "Windows XP Style",
"condition": "config.win32",
"condition": "features.style-windows && config.win32 && !config.winrt && tests.uxtheme",
"output": [ "styles" ]
},
"windowsvista-style": {
"style-windowsvista": {
"description": "Windows Vista Style",
"condition": "config.win32",
"condition": "features.style-windowsxp",
"output": [ "styles" ]
},
"android-style": {
"style-android": {
"description": "Android Style",
"condition": "config.android",
"autoDetect": "config.android",
"output": [ "styles" ]
},
"android-style-assets": {
"description": "Android Style Assets",
"condition": "features.android-style",
"condition": "features.style-android",
"output": [ "privateConfig" ]
},
"audio-backend": {

View File

@ -449,7 +449,7 @@ defineTest(qtConfOutput_architecture) {
defineTest(qtConfOutput_styles) {
!$${2}: return()
style = $$replace($${1}.feature, "-style", "")
style = $$replace($${1}.feature, "style-", "")
qtConfOutputVar(append, "privatePro", "styles", $$style)
}

View File

@ -35,12 +35,6 @@ SOURCES += \
RESOURCES += styles/qstyle.qrc
contains( styles, all ) {
styles = fusion mac windows windowsxp windowsvista
}
!macx:styles -= mac
contains( styles, mac ) {
HEADERS += \
styles/qmacstyle_mac_p.h \
@ -55,10 +49,6 @@ contains( styles, windowsvista ) {
HEADERS += styles/qwindowsvistastyle_p.h
HEADERS += styles/qwindowsvistastyle_p_p.h
SOURCES += styles/qwindowsvistastyle.cpp
!contains( styles, windowsxp ) {
message( windowsvista requires windowsxp )
styles += windowsxp
}
} else {
DEFINES += QT_NO_STYLE_WINDOWSVISTA
}
@ -67,10 +57,6 @@ contains( styles, windowsxp ) {
HEADERS += styles/qwindowsxpstyle_p.h
HEADERS += styles/qwindowsxpstyle_p_p.h
SOURCES += styles/qwindowsxpstyle.cpp
!contains( styles, windows ) {
message( windowsxp requires windows )
styles += windows
}
} else {
DEFINES += QT_NO_STYLE_WINDOWSXP
}

View File

@ -3277,12 +3277,6 @@ void Configure::generateConfigfiles()
tmpStream << endl << "// Compile time features" << endl;
QStringList qconfigList;
if (dictionary["STYLE_WINDOWS"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWS";
if (dictionary["STYLE_FUSION"] != "yes") qconfigList += "QT_NO_STYLE_FUSION";
if (dictionary["STYLE_WINDOWSXP"] != "yes" && dictionary["STYLE_WINDOWSVISTA"] != "yes")
qconfigList += "QT_NO_STYLE_WINDOWSXP";
if (dictionary["STYLE_WINDOWSVISTA"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWSVISTA";
if (dictionary["PNG"] != "yes") qconfigList += "QT_NO_IMAGEFORMAT_PNG";
if (dictionary["ACCESSIBILITY"] == "no") qconfigList += "QT_NO_ACCESSIBILITY";