summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-09-16 23:20:02 +0200
committerLiang Qi <liang.qi@qt.io>2016-09-16 23:20:11 +0200
commit4329879b4d73936fe757591f19cb2a86cae1d6b7 (patch)
tree07d5ef295ba3ebba78f264447811d2fca316249e
parente8e7a209824d6fb08411981d56ec16cc70af32e2 (diff)
parentc3b34277bc7b602185b2f4eccd19af270aa6b09d (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
-rw-r--r--dist/changes-5.6.226
-rw-r--r--src/tools/idc/main.cpp17
2 files changed, 38 insertions, 5 deletions
diff --git a/dist/changes-5.6.2 b/dist/changes-5.6.2
new file mode 100644
index 0000000..7d6ba5f
--- /dev/null
+++ b/dist/changes-5.6.2
@@ -0,0 +1,26 @@
+Qt 5.6.2 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.6.0.
+
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+ http://doc.qt.io/qt-5/index.html
+
+The Qt version 5.6 series is binary compatible with the 5.5.x series.
+Applications compiled for 5.5 will continue to run with 5.6.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+ https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+ - idc:
+ * [QTBUG-55332] idc can now handle library path names with space
+ characters.
diff --git a/src/tools/idc/main.cpp b/src/tools/idc/main.cpp
index 60ec1e4..7d0c888 100644
--- a/src/tools/idc/main.cpp
+++ b/src/tools/idc/main.cpp
@@ -176,12 +176,17 @@ static bool attachTypeLibrary(const QString &applicationName, int resource, cons
static HMODULE loadLibraryQt(const QString &input)
{
+ const wchar_t *inputC = reinterpret_cast<const wchar_t *>(input.utf16());
if (QSysInfo::windowsVersion() < QSysInfo::WV_VISTA)
- return LoadLibrary(reinterpret_cast<const wchar_t *>(input.utf16())); // fallback for Windows XP and older
+ return LoadLibrary(inputC); // fallback for Windows XP and older
// Load DLL with the folder containing the DLL temporarily added to the search path when loading dependencies
- return LoadLibraryEx(reinterpret_cast<const wchar_t *>(input.utf16()), NULL,
- LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR | LOAD_LIBRARY_SEARCH_DEFAULT_DIRS);
+ HMODULE result =
+ LoadLibraryEx(inputC, NULL, LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR | LOAD_LIBRARY_SEARCH_DEFAULT_DIRS);
+ // If that fails, call with flags=0 to get LoadLibrary() behavior (search %PATH%).
+ if (!result)
+ result = LoadLibraryEx(inputC, NULL, 0);
+ return result;
}
static bool registerServer(const QString &input)
@@ -233,7 +238,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);
@@ -376,7 +383,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);