summaryrefslogtreecommitdiffstats
path: root/src/activeqt/control
diff options
context:
space:
mode:
Diffstat (limited to 'src/activeqt/control')
-rw-r--r--src/activeqt/control/qaxfactory.cpp6
-rw-r--r--src/activeqt/control/qaxfactory.h8
-rw-r--r--src/activeqt/control/qaxserverbase.cpp13
3 files changed, 11 insertions, 16 deletions
diff --git a/src/activeqt/control/qaxfactory.cpp b/src/activeqt/control/qaxfactory.cpp
index 1a999aa..2a0ed4f 100644
--- a/src/activeqt/control/qaxfactory.cpp
+++ b/src/activeqt/control/qaxfactory.cpp
@@ -288,9 +288,7 @@ bool QAxFactory::validateLicenseKey(const QString &key, const QString &licenseKe
int lastDot = licFile.lastIndexOf(QLatin1Char('.'));
licFile.truncate(lastDot);
licFile += QLatin1String(".lic");
- if (QFile::exists(licFile))
- return true;
- return false;
+ return QFile::exists(licFile);
}
return licenseKey == classKey;
}
@@ -369,8 +367,6 @@ bool QAxFactory::isServer()
return qAxIsServer;
}
-extern wchar_t qAxModuleFilename[MAX_PATH];
-
/*!
Returns the directory that contains the server binary.
diff --git a/src/activeqt/control/qaxfactory.h b/src/activeqt/control/qaxfactory.h
index 342017e..05df3c9 100644
--- a/src/activeqt/control/qaxfactory.h
+++ b/src/activeqt/control/qaxfactory.h
@@ -220,9 +220,9 @@ public:
{
const QStringList categories = getImplementedCategories();
- for (QStringList::const_iterator it = categories.begin(), end = categories.end(); it != end; ++it) {
+ for (const auto &cat : categories) {
settings->setValue(QLatin1String("/CLSID/") + classID(key).toString()
- + QLatin1String("/Implemented Categories/") + *it + QLatin1String("/."),
+ + QLatin1String("/Implemented Categories/") + cat + QLatin1String("/."),
QString());
}
}
@@ -231,9 +231,9 @@ public:
{
const QStringList categories = getImplementedCategories();
- for (QStringList::const_iterator it = categories.begin(), end = categories.end(); it != end; ++it) {
+ for (const auto &cat : categories) {
settings->remove(QLatin1String("/CLSID/") + classID(key).toString()
- + QLatin1String("/Implemented Categories/") + *it + QLatin1String("/."));
+ + QLatin1String("/Implemented Categories/") + cat + QLatin1String("/."));
}
}
diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp
index 30ea1dc..d11fbeb 100644
--- a/src/activeqt/control/qaxserverbase.cpp
+++ b/src/activeqt/control/qaxserverbase.cpp
@@ -229,8 +229,7 @@ public:
void reportError(int code, const QString &src, const QString &desc,
const QString &context) override
{
- if (exception)
- delete exception;
+ delete exception;
exception = new QAxExceptInfo(code, src, desc, context);
}
@@ -2380,9 +2379,9 @@ HRESULT WINAPI QAxServerBase::Invoke(DISPID dispidMember, REFIID riid,
else
res = S_OK;
break;
- } else if (wFlags == DISPATCH_PROPERTYGET) {
- break;
}
+ if (wFlags == DISPATCH_PROPERTYGET)
+ break;
}
Q_FALLTHROUGH(); // Fall through if wFlags == DISPATCH_PROPERTYGET|DISPATCH_METHOD AND not a property.
case DISPATCH_METHOD:
@@ -3078,7 +3077,7 @@ HRESULT WINAPI QAxServerBase::Load(LPCOLESTR fileName, DWORD /* mode */)
QString mimeType = QLatin1String(mo->classInfo(mimeIndex).value());
QStringList mimeTypes = mimeType.split(QLatin1Char(';'));
for (int m = 0; m < mimeTypes.count(); ++m) {
- QString mime = mimeTypes.at(m);
+ const QString &mime = mimeTypes.at(m);
if (mime.count(QLatin1Char(':')) != 2) {
qWarning() << class_name << ": Invalid syntax in Q_CLASSINFO for MIME";
continue;
@@ -3123,7 +3122,7 @@ HRESULT WINAPI QAxServerBase::Save(LPCOLESTR fileName, BOOL fRemember)
QString mimeType = QLatin1String(mo->classInfo(mimeIndex).value());
QStringList mimeTypes = mimeType.split(QLatin1Char(';'));
for (int m = 0; m < mimeTypes.count(); ++m) {
- QString mime = mimeTypes.at(m);
+ const QString &mime = mimeTypes.at(m);
if (mime.count(QLatin1Char(':')) != 2) {
qWarning() << class_name << ": Invalid syntax in Q_CLASSINFO for MIME";
continue;
@@ -3576,7 +3575,7 @@ HRESULT WINAPI QAxServerBase::TranslateAcceleratorW(MSG *pMsg)
}
} else {
QWidget *nextFocus = curFocus;
- while (1) {
+ while (true) {
nextFocus = nextFocus->nextInFocusChain();
if (nextFocus->isWindow())
break;