diff options
author | Liang Qi <liang.qi@qt.io> | 2017-08-15 12:21:21 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-08-15 12:44:40 +0200 |
commit | 580f3366a74e95369a151ed6108c9f94a5cef303 (patch) | |
tree | e8ea7cbb553d9686b0f974f813634e937396ada3 | |
parent | 706c07ffb3f9ba473c71f4c8b66be94b810500c8 (diff) | |
parent | 9a6d57385c49fa702319139ae1f2e471520963ee (diff) |
Merge remote-tracking branch 'origin/5.9' into devv5.10.0-alpha1
Conflicts:
.qmake.conf
Change-Id: I4d94e662fb8608a90cb548b5c79f82482d5d819b
-rw-r--r-- | dist/changes-5.9.1 | 24 | ||||
-rw-r--r-- | src/activeqt/container/qaxbase.cpp | 2 | ||||
-rw-r--r-- | src/activeqt/control/qaxserver.cpp | 32 | ||||
-rw-r--r-- | src/activeqt/control/qaxserverbase.cpp | 2 | ||||
-rw-r--r-- | tools/dumpcpp/main.cpp | 6 |
5 files changed, 53 insertions, 13 deletions
diff --git a/dist/changes-5.9.1 b/dist/changes-5.9.1 new file mode 100644 index 0000000..e0a6a4b --- /dev/null +++ b/dist/changes-5.9.1 @@ -0,0 +1,24 @@ +Qt 5.9.1 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.9.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.9 series is binary compatible with the 5.8.x series. +Applications compiled for 5.8 will continue to run with 5.9. + +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 * +**************************************************************************** + + - This release contains only minor code improvements. diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp index 22aec57..cd564d3 100644 --- a/src/activeqt/container/qaxbase.cpp +++ b/src/activeqt/container/qaxbase.cpp @@ -2555,7 +2555,7 @@ void MetaObjectGenerator::readFuncsInfo(ITypeInfo *typeinfo, ushort nFuncs) prototype = set + prototype; } - // FALL THROUGH to support multi-variat properties + Q_FALLTHROUGH(); // Fall through to support multi-variate properties case INVOKE_FUNC: // method { bool cloned = false; diff --git a/src/activeqt/control/qaxserver.cpp b/src/activeqt/control/qaxserver.cpp index b3c11db..45f6940 100644 --- a/src/activeqt/control/qaxserver.cpp +++ b/src/activeqt/control/qaxserver.cpp @@ -231,19 +231,35 @@ HRESULT UpdateRegistry(BOOL bRegister) qAxTypeLibrary->GetLibAttr(&libAttr); if (!libAttr) return SELFREG_E_TYPELIB; - - if (bRegister) - RegisterTypeLib(qAxTypeLibrary, reinterpret_cast<wchar_t *>(const_cast<ushort *>(libFile.utf16())), 0); - else - UnRegisterTypeLib(libAttr->guid, libAttr->wMajorVerNum, libAttr->wMinorVerNum, libAttr->lcid, libAttr->syskind); - + bool userFallback = false; + if (bRegister) { + if (RegisterTypeLib(qAxTypeLibrary, + reinterpret_cast<wchar_t *>(const_cast<ushort *>(libFile.utf16())), 0) == TYPE_E_REGISTRYACCESS) { +#ifndef Q_CC_MINGW + // MinGW does not have RegisterTypeLibForUser() implemented so we cannot fallback in this case + RegisterTypeLibForUser(qAxTypeLibrary, reinterpret_cast<wchar_t *>(const_cast<ushort *>(libFile.utf16())), 0); + userFallback = true; +#endif + } + } else { + if (UnRegisterTypeLib(libAttr->guid, libAttr->wMajorVerNum, libAttr->wMinorVerNum, libAttr->lcid, + libAttr->syskind) == TYPE_E_REGISTRYACCESS) { +#ifndef Q_CC_MINGW + // MinGW does not have RegisterTypeLibForUser() implemented so we cannot fallback in this case + UnRegisterTypeLibForUser(libAttr->guid, libAttr->wMajorVerNum, libAttr->wMinorVerNum, libAttr->lcid, libAttr->syskind); + userFallback = true; +#endif + } + } + if (userFallback) + qWarning("QAxServer: Falling back to registering as user for %s due to insufficient permission.", qPrintable(module)); qAxTypeLibrary->ReleaseTLibAttr(libAttr); // check whether the user has permission to write to HKLM\Software\Classes // if not, use HKCU\Software\Classes QString keyPath(QLatin1String("HKEY_LOCAL_MACHINE\\Software\\Classes")); QScopedPointer<QSettings> settings(new QSettings(keyPath, QSettings::NativeFormat)); - if (!settings->isWritable()) { + if (userFallback || !settings->isWritable()) { keyPath = QLatin1String("HKEY_CURRENT_USER\\Software\\Classes"); settings.reset(new QSettings(keyPath, QSettings::NativeFormat)); } @@ -420,7 +436,7 @@ HRESULT UpdateRegistry(BOOL bRegister) QString extension; while (mime.contains(QLatin1Char(':'))) { extension = mime.mid(mime.lastIndexOf(QLatin1Char(':')) + 1); - mime.chop(extension.length() - 1); + mime.chop(extension.length() + 1); // Prepend '.' before extension, if required. extension = extension.trimmed(); if (extension[0] != dot) diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp index 9efded2..779f015 100644 --- a/src/activeqt/control/qaxserverbase.cpp +++ b/src/activeqt/control/qaxserverbase.cpp @@ -2342,7 +2342,7 @@ HRESULT WINAPI QAxServerBase::Invoke(DISPID dispidMember, REFIID riid, break; } } - // FALLTHROUGH if wFlags == DISPATCH_PROPERTYGET|DISPATCH_METHOD AND not a property. + Q_FALLTHROUGH(); // Fall through if wFlags == DISPATCH_PROPERTYGET|DISPATCH_METHOD AND not a property. case DISPATCH_METHOD: { int nameLength = 0; diff --git a/tools/dumpcpp/main.cpp b/tools/dumpcpp/main.cpp index 97915c1..1f0cca8 100644 --- a/tools/dumpcpp/main.cpp +++ b/tools/dumpcpp/main.cpp @@ -196,11 +196,11 @@ void generateClassDecl(QTextStream &out, const QString &controlID, const QMetaOb out << " internalRelease();" << endl; else if (category & Licensed) { out << " if (licenseKey.isEmpty())" << endl; - out << " setControl(\"" << controlID << "\");" << endl; + out << " setControl(QStringLiteral(\"" << controlID << "\"));" << endl; out << " else" << endl; - out << " setControl(\"" << controlID << ":\" + licenseKey);" << endl; + out << " setControl(QStringLiteral(\"" << controlID << ":\" + licenseKey));" << endl; } else { - out << " setControl(\"" << controlID << "\");" << endl; + out << " setControl(QStringLiteral(\"" << controlID << "\"));" << endl; } out << " }" << endl; out << endl; |