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:
parent
27b03be893
commit
98ddf9262e
@ -169,6 +169,12 @@
|
|||||||
"ssse3": "boolean",
|
"ssse3": "boolean",
|
||||||
"static": { "type": "enum", "name": "shared", "values": { "yes": "no", "no": "yes" } },
|
"static": { "type": "enum", "name": "shared", "values": { "yes": "no", "no": "yes" } },
|
||||||
"strip": "boolean",
|
"strip": "boolean",
|
||||||
|
"style-windows": "boolean",
|
||||||
|
"style-windowsxp": "boolean",
|
||||||
|
"style-windowsvista": "boolean",
|
||||||
|
"style-fusion": "boolean",
|
||||||
|
"style-mac": "boolean",
|
||||||
|
"style-android": "boolean",
|
||||||
"syslog": "boolean",
|
"syslog": "boolean",
|
||||||
"sysroot": "string",
|
"sysroot": "string",
|
||||||
"system-proxies": "boolean",
|
"system-proxies": "boolean",
|
||||||
@ -1170,6 +1176,11 @@
|
|||||||
"test": "win/directwrite2",
|
"test": "win/directwrite2",
|
||||||
"use": "directwrite"
|
"use": "directwrite"
|
||||||
},
|
},
|
||||||
|
"uxtheme": {
|
||||||
|
"description": "uxtheme.h",
|
||||||
|
"type": "files",
|
||||||
|
"files": [ "uxtheme.h" ]
|
||||||
|
},
|
||||||
"qpa_default_platform": {
|
"qpa_default_platform": {
|
||||||
"description": "default QPA platform",
|
"description": "default QPA platform",
|
||||||
"type": "qpaDefaultPlatform",
|
"type": "qpaDefaultPlatform",
|
||||||
@ -2287,36 +2298,37 @@
|
|||||||
"condition": "libs.tds",
|
"condition": "libs.tds",
|
||||||
"output": [ "sqldriver" ]
|
"output": [ "sqldriver" ]
|
||||||
},
|
},
|
||||||
"fusion-style": {
|
"style-fusion": {
|
||||||
"description": "Fusion Style",
|
"description": "Fusion Style",
|
||||||
"output": [ "styles" ]
|
"output": [ "styles" ]
|
||||||
},
|
},
|
||||||
"mac-style": {
|
"style-mac": {
|
||||||
"description": "Mac Style",
|
"description": "Mac Style",
|
||||||
|
"condition": "config.osx",
|
||||||
"output": [ "styles" ]
|
"output": [ "styles" ]
|
||||||
},
|
},
|
||||||
"windows-style": {
|
"style-windows": {
|
||||||
"description": "Windows Style",
|
"description": "Windows Style",
|
||||||
"output": [ "styles" ]
|
"output": [ "styles" ]
|
||||||
},
|
},
|
||||||
"windowsxp-style": {
|
"style-windowsxp": {
|
||||||
"description": "Windows XP Style",
|
"description": "Windows XP Style",
|
||||||
"condition": "config.win32",
|
"condition": "features.style-windows && config.win32 && !config.winrt && tests.uxtheme",
|
||||||
"output": [ "styles" ]
|
"output": [ "styles" ]
|
||||||
},
|
},
|
||||||
"windowsvista-style": {
|
"style-windowsvista": {
|
||||||
"description": "Windows Vista Style",
|
"description": "Windows Vista Style",
|
||||||
"condition": "config.win32",
|
"condition": "features.style-windowsxp",
|
||||||
"output": [ "styles" ]
|
"output": [ "styles" ]
|
||||||
},
|
},
|
||||||
"android-style": {
|
"style-android": {
|
||||||
"description": "Android Style",
|
"description": "Android Style",
|
||||||
"condition": "config.android",
|
"autoDetect": "config.android",
|
||||||
"output": [ "styles" ]
|
"output": [ "styles" ]
|
||||||
},
|
},
|
||||||
"android-style-assets": {
|
"android-style-assets": {
|
||||||
"description": "Android Style Assets",
|
"description": "Android Style Assets",
|
||||||
"condition": "features.android-style",
|
"condition": "features.style-android",
|
||||||
"output": [ "privateConfig" ]
|
"output": [ "privateConfig" ]
|
||||||
},
|
},
|
||||||
"audio-backend": {
|
"audio-backend": {
|
||||||
|
@ -449,7 +449,7 @@ defineTest(qtConfOutput_architecture) {
|
|||||||
defineTest(qtConfOutput_styles) {
|
defineTest(qtConfOutput_styles) {
|
||||||
!$${2}: return()
|
!$${2}: return()
|
||||||
|
|
||||||
style = $$replace($${1}.feature, "-style", "")
|
style = $$replace($${1}.feature, "style-", "")
|
||||||
qtConfOutputVar(append, "privatePro", "styles", $$style)
|
qtConfOutputVar(append, "privatePro", "styles", $$style)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,12 +35,6 @@ SOURCES += \
|
|||||||
|
|
||||||
RESOURCES += styles/qstyle.qrc
|
RESOURCES += styles/qstyle.qrc
|
||||||
|
|
||||||
contains( styles, all ) {
|
|
||||||
styles = fusion mac windows windowsxp windowsvista
|
|
||||||
}
|
|
||||||
|
|
||||||
!macx:styles -= mac
|
|
||||||
|
|
||||||
contains( styles, mac ) {
|
contains( styles, mac ) {
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
styles/qmacstyle_mac_p.h \
|
styles/qmacstyle_mac_p.h \
|
||||||
@ -55,10 +49,6 @@ contains( styles, windowsvista ) {
|
|||||||
HEADERS += styles/qwindowsvistastyle_p.h
|
HEADERS += styles/qwindowsvistastyle_p.h
|
||||||
HEADERS += styles/qwindowsvistastyle_p_p.h
|
HEADERS += styles/qwindowsvistastyle_p_p.h
|
||||||
SOURCES += styles/qwindowsvistastyle.cpp
|
SOURCES += styles/qwindowsvistastyle.cpp
|
||||||
!contains( styles, windowsxp ) {
|
|
||||||
message( windowsvista requires windowsxp )
|
|
||||||
styles += windowsxp
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
DEFINES += QT_NO_STYLE_WINDOWSVISTA
|
DEFINES += QT_NO_STYLE_WINDOWSVISTA
|
||||||
}
|
}
|
||||||
@ -67,10 +57,6 @@ contains( styles, windowsxp ) {
|
|||||||
HEADERS += styles/qwindowsxpstyle_p.h
|
HEADERS += styles/qwindowsxpstyle_p.h
|
||||||
HEADERS += styles/qwindowsxpstyle_p_p.h
|
HEADERS += styles/qwindowsxpstyle_p_p.h
|
||||||
SOURCES += styles/qwindowsxpstyle.cpp
|
SOURCES += styles/qwindowsxpstyle.cpp
|
||||||
!contains( styles, windows ) {
|
|
||||||
message( windowsxp requires windows )
|
|
||||||
styles += windows
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
DEFINES += QT_NO_STYLE_WINDOWSXP
|
DEFINES += QT_NO_STYLE_WINDOWSXP
|
||||||
}
|
}
|
||||||
|
@ -3277,12 +3277,6 @@ void Configure::generateConfigfiles()
|
|||||||
tmpStream << endl << "// Compile time features" << endl;
|
tmpStream << endl << "// Compile time features" << endl;
|
||||||
|
|
||||||
QStringList qconfigList;
|
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["PNG"] != "yes") qconfigList += "QT_NO_IMAGEFORMAT_PNG";
|
||||||
|
|
||||||
if (dictionary["ACCESSIBILITY"] == "no") qconfigList += "QT_NO_ACCESSIBILITY";
|
if (dictionary["ACCESSIBILITY"] == "no") qconfigList += "QT_NO_ACCESSIBILITY";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user