summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/activeqt/control/qaxserverbase.cpp3
-rw-r--r--src/tools/idc/main.cpp12
2 files changed, 9 insertions, 6 deletions
diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp
index efdefd3..13ab5ee 100644
--- a/src/activeqt/control/qaxserverbase.cpp
+++ b/src/activeqt/control/qaxserverbase.cpp
@@ -2399,8 +2399,7 @@ HRESULT WINAPI QAxServerBase::Invoke(DISPID dispidMember, REFIID riid,
if (index == -1) {
QRegularExpression regexp(QLatin1String("_([0-9])\\("));
QRegularExpressionMatch rmatch;
- QString::fromLatin1(name.constData()).lastIndexOf(regexp, -1, &rmatch);
- if (rmatch.hasMatch()) {
+ if (QString::fromLatin1(name.constData()).lastIndexOf(regexp, -1, &rmatch) != -1) {
name.chop(rmatch.capturedLength(0));
name += '(';
int overload = rmatch.capturedView(1).toInt() + 1;
diff --git a/src/tools/idc/main.cpp b/src/tools/idc/main.cpp
index 2a50e31..3a84cd7 100644
--- a/src/tools/idc/main.cpp
+++ b/src/tools/idc/main.cpp
@@ -194,7 +194,8 @@ static bool dllInstall(const QString &input, bool doRegister)
}
typedef HRESULT(__stdcall* DllInstallProc)(BOOL bInstall, PCWSTR pszCmdLine);
- DllInstallProc DllInstall = reinterpret_cast<DllInstallProc>(GetProcAddress(hdll, "DllInstall"));
+ DllInstallProc DllInstall = reinterpret_cast<DllInstallProc>
+ (reinterpret_cast<void *>(GetProcAddress(hdll, "DllInstall")));
if (!DllInstall) {
fprintf(stderr, "Library file %s doesn't appear to be a COM library supporting DllInstall\n", qPrintable(input));
return false;
@@ -219,7 +220,8 @@ static bool registerServer(const QString &input, bool perUser)
}
typedef HRESULT(__stdcall* RegServerProc)();
- RegServerProc DllRegisterServer = reinterpret_cast<RegServerProc>(GetProcAddress(hdll, "DllRegisterServer"));
+ RegServerProc DllRegisterServer = reinterpret_cast<RegServerProc>
+ (reinterpret_cast<void *>(GetProcAddress(hdll, "DllRegisterServer")));
if (!DllRegisterServer) {
fprintf(stderr, "Library file %s doesn't appear to be a COM library\n", qPrintable(input));
return false;
@@ -246,7 +248,8 @@ static bool unregisterServer(const QString &input, bool perUser)
}
typedef HRESULT(__stdcall* RegServerProc)();
- RegServerProc DllUnregisterServer = reinterpret_cast<RegServerProc>(GetProcAddress(hdll, "DllUnregisterServer"));
+ RegServerProc DllUnregisterServer = reinterpret_cast<RegServerProc>
+ (reinterpret_cast<void *>(GetProcAddress(hdll, "DllUnregisterServer")));
if (!DllUnregisterServer) {
fprintf(stderr, "Library file %s doesn't appear to be a COM library\n", qPrintable(input));
return false;
@@ -273,7 +276,8 @@ static HRESULT dumpIdl(const QString &input, const QString &idlfile, const QStri
return 3;
}
typedef HRESULT(__stdcall* DumpIDLProc)(const QString&, const QString&);
- DumpIDLProc DumpIDL = reinterpret_cast<DumpIDLProc>(GetProcAddress(hdll, "DumpIDL"));
+ DumpIDLProc DumpIDL = reinterpret_cast<DumpIDLProc>
+ (reinterpret_cast<void *>(GetProcAddress(hdll, "DumpIDL")));
if (!DumpIDL) {
fprintf(stderr, "Couldn't resolve 'DumpIDL' symbol in %s\n", qPrintable(input));
return 3;