From 1de9d68b2631de9432ab9929bb4b917604cc7be7 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint <Friedemann.Kleint@qt.io> Date: Tue, 16 Aug 2016 15:35:12 +0200 Subject: [PATCH] idc: Fix quoting of .idl file Call quotePath() on the idlfile inside dumpIdl() when building the command to run for .exe files instead of quoting it before passing it to dumpIdl(). Task-number: QTBUG-55332 Change-Id: Iae934e960d94fe1f9b469ca57f9fba2c74ee108c Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io> --- src/tools/idc/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tools/idc/main.cpp b/src/tools/idc/main.cpp index 50610ac2..76c25e5b 100644 --- a/src/tools/idc/main.cpp +++ b/src/tools/idc/main.cpp @@ -243,7 +243,9 @@ static HRESULT dumpIdl(const QString &input, const QString &idlfile, const QStri HRESULT res = E_FAIL; if (hasExeExtension(input)) { - if (runWithQtInEnvironment(quotePath(input) + QLatin1String(" -dumpidl ") + idlfile + QLatin1String(" -version ") + version)) + const QString command = quotePath(input) + QLatin1String(" -dumpidl ") + + quotePath(idlfile) + QLatin1String(" -version ") + version; + if (runWithQtInEnvironment(command)) res = S_OK; } else { HMODULE hdll = loadLibraryQt(input); @@ -386,7 +388,7 @@ int runIdc(int argc, char **argv) fprintf(stderr, "%s\n", qPrintable(error)); return ok ? 0 : 4; } else if (!idlfile.isEmpty()) { - idlfile = quotePath(QDir::toNativeSeparators(idlfile)); + idlfile = QDir::toNativeSeparators(idlfile); fprintf(stderr, "\n\n%s\n\n", qPrintable(idlfile)); const HRESULT res = dumpIdl(input, idlfile, version); -- GitLab