summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-12-04 18:21:47 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-12-07 11:37:35 +0100
commitcb064dee3a42463da5b61f91fa9e4cf00d6b3453 (patch)
tree2081d4a4fbd8f1da56ad718b9e7e07470491258b /tests/auto/tools
parent5634bdf9ce1f3b30637f59f398e6134f75616c5f (diff)
uic/rcc: Use QT_VERSION_MAJOR for major version
Amends 539a16a69fa1ef302cf4eb97ff5a7f8afb606d15. Task-number: QTBUG-89124 Change-Id: I68c9ab2179d464d83c3fd9eefc5609b7a5a58e27 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'tests/auto/tools')
-rw-r--r--tests/auto/tools/uic/tst_uic.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/tools/uic/tst_uic.cpp b/tests/auto/tools/uic/tst_uic.cpp
index 0a07948dc2..b9ab71736e 100644
--- a/tests/auto/tools/uic/tst_uic.cpp
+++ b/tests/auto/tools/uic/tst_uic.cpp
@@ -117,7 +117,7 @@ static QByteArray msgProcessStartFailed(const QString &command, const QString &w
return result.toLocal8Bit();
}
-// Locate Python and check whether PySide6 is installed
+// Locate Python and check whether Qt for Python is installed
static QString locatePython(QTemporaryDir &generatedDir)
{
QString python = QStandardPaths::findExecutable(QLatin1String("python"));
@@ -128,7 +128,9 @@ static QString locatePython(QTemporaryDir &generatedDir)
QFile importTestFile(generatedDir.filePath(QLatin1String("import_test.py")));
if (!importTestFile.open(QIODevice::WriteOnly| QIODevice::Text))
return QString();
- importTestFile.write("import PySide6.QtCore\n");
+ importTestFile.write("import PySide");
+ importTestFile.write(QByteArray::number(QT_VERSION_MAJOR));
+ importTestFile.write(".QtCore\n");
importTestFile.close();
QProcess process;
process.start(python, {importTestFile.fileName()});