summaryrefslogtreecommitdiffstats
path: root/src/tools/rcc/main.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-12-07 12:58:58 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-12-07 17:09:07 +0100
commit3fb039ca233f4d82e9c22aa01aecc1201a08a88f (patch)
tree0f35114f4007fd641e834f955e47a8a35881db0a /src/tools/rcc/main.cpp
parent0e96e1fb752e0b7c99927e77e7ac3244b2e0c118 (diff)
rcc: Remove support for Python2
Qt for Python only supports Python3. Change-Id: I7b13b1f9482579b1e1128d15ee5734d063a7c4b8 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'src/tools/rcc/main.cpp')
-rw-r--r--src/tools/rcc/main.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/tools/rcc/main.cpp b/src/tools/rcc/main.cpp
index 0f84593552..287be43f97 100644
--- a/src/tools/rcc/main.cpp
+++ b/src/tools/rcc/main.cpp
@@ -267,14 +267,16 @@ int runRcc(int argc, char *argv[])
library.setFormat(RCCResourceLibrary::Binary);
if (parser.isSet(generatorOption)) {
auto value = parser.value(generatorOption);
- if (value == QLatin1String("cpp"))
+ if (value == QLatin1String("cpp")) {
library.setFormat(RCCResourceLibrary::C_Code);
- else if (value == QLatin1String("python"))
- library.setFormat(RCCResourceLibrary::Python3_Code);
- else if (value == QLatin1String("python2"))
- library.setFormat(RCCResourceLibrary::Python2_Code);
- else
+ } else if (value == QLatin1String("python")) {
+ library.setFormat(RCCResourceLibrary::Python_Code);
+ } else if (value == QLatin1String("python2")) { // ### fixme Qt 7: remove
+ qWarning("Format python2 is no longer supported, defaulting to python.");
+ library.setFormat(RCCResourceLibrary::Python_Code);
+ } else {
errorMsg = QLatin1String("Invalid generator: ") + value;
+ }
}
if (parser.isSet(passOption)) {
@@ -338,8 +340,7 @@ int runRcc(int argc, char *argv[])
switch (library.format()) {
case RCCResourceLibrary::C_Code:
case RCCResourceLibrary::Pass1:
- case RCCResourceLibrary::Python3_Code:
- case RCCResourceLibrary::Python2_Code:
+ case RCCResourceLibrary::Python_Code:
mode = QIODevice::WriteOnly | QIODevice::Text;
break;
case RCCResourceLibrary::Pass2: