windeployqt: Fix PATH manipulation code for non-Windows platforms

Use QDir::listSeparator() for additional entries in PATH instead of the
hard-coded semicolon.  This is a preparation for running windeployqt on
non-Windows platforms.

Change-Id: I84f1da130508da7a0f3190d811acf35477564bf7
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
bb10
Joerg Bornemann 2022-08-22 16:12:56 +02:00
parent ea92137e76
commit 38ca72ab5e
1 changed files with 1 additions and 1 deletions

View File

@ -1626,7 +1626,7 @@ int main(int argc, char **argv)
const QByteArray qtBinPath = QFile::encodeName(QDir::toNativeSeparators(QCoreApplication::applicationDirPath()));
QByteArray path = qgetenv("PATH");
if (!path.contains(qtBinPath)) { // QTBUG-39177, ensure Qt is in the path so that qt.conf is taken into account.
path += ';';
path += QDir::listSeparator().toLatin1();
path += qtBinPath;
qputenv("PATH", path);
}