summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2014-09-26 16:53:29 +0200
committerFriedemann Kleint <Friedemann.Kleint@digia.com>2014-09-26 18:20:29 +0200
commit9c4cb4bd2d49a2429b71b2eea1522efcf41f1ded (patch)
tree63b96f1d54a9fe88384648fe084779e44abd314a
parent35231e9d2f06d098047dff1bb28b6a38fbb9343f (diff)
downloadqtactiveqt-9c4cb4bd2d49a2429b71b2eea1522efcf41f1ded.tar.gz
Use case insensitive comparison instead of toLower().
Change-Id: I73907afab82cdef8e717def6095cd7d03236fadf Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
-rw-r--r--src/activeqt/container/qaxbase.cpp4
-rw-r--r--src/activeqt/control/qaxfactory.cpp2
-rw-r--r--src/activeqt/control/qaxserver.cpp2
-rw-r--r--tools/testcon/changeproperties.cpp4
4 files changed, 6 insertions, 6 deletions
diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp
index 58d59f2..f88172c 100644
--- a/src/activeqt/container/qaxbase.cpp
+++ b/src/activeqt/container/qaxbase.cpp
@@ -990,7 +990,7 @@ QAxMetaObject *QAxBase::internalMetaObject() const
*/
bool QAxBase::setControl(const QString &c)
{
- if (c.toLower() == d->ctrl.toLower())
+ if (!c.compare(d->ctrl, Qt::CaseInsensitive))
return !d->ctrl.isEmpty();
QString search = c;
@@ -1025,7 +1025,7 @@ bool QAxBase::setControl(const QString &c)
search = c;
}
- if (search.toLower() == d->ctrl.toLower())
+ if (!search.compare(d->ctrl, Qt::CaseInsensitive))
return !d->ctrl.isEmpty();
clear();
diff --git a/src/activeqt/control/qaxfactory.cpp b/src/activeqt/control/qaxfactory.cpp
index b510f18..bee8c16 100644
--- a/src/activeqt/control/qaxfactory.cpp
+++ b/src/activeqt/control/qaxfactory.cpp
@@ -492,7 +492,7 @@ bool QAxFactory::registerActiveObject(QObject *object)
if (qstricmp(object->metaObject()->classInfo(object->metaObject()->indexOfClassInfo("RegisterObject")).value(), "yes"))
return false;
- if (!QString::fromWCharArray(qAxModuleFilename).toLower().endsWith(QLatin1String(".exe")))
+ if (!QString::fromWCharArray(qAxModuleFilename).endsWith(QLatin1String(".exe"), Qt::CaseInsensitive))
return false;
ActiveObject *active = new ActiveObject(object, qAxFactory());
diff --git a/src/activeqt/control/qaxserver.cpp b/src/activeqt/control/qaxserver.cpp
index 58b3faf..0f2e0ff 100644
--- a/src/activeqt/control/qaxserver.cpp
+++ b/src/activeqt/control/qaxserver.cpp
@@ -303,7 +303,7 @@ HRESULT UpdateRegistry(BOOL bRegister)
settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/Control/."), QVariant(QLatin1String("")));
if (insertable)
settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/Insertable/."), QVariant(QLatin1String("")));
- if (file.right(3).toLower() == QLatin1String("dll"))
+ if (file.endsWith(QLatin1String("dll"), Qt::CaseInsensitive))
settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/InProcServer32/."), file);
else
settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/LocalServer32/."),
diff --git a/tools/testcon/changeproperties.cpp b/tools/testcon/changeproperties.cpp
index 3a7fb68..df8000d 100644
--- a/tools/testcon/changeproperties.cpp
+++ b/tools/testcon/changeproperties.cpp
@@ -141,8 +141,8 @@ void ChangeProperties::on_buttonSet_clicked()
break;
case QVariant::Bool:
{
- QString txt = editValue->text().toLower();
- value = QVariant(txt != QLatin1String("0") && txt != QLatin1String("false"));
+ const QString txt = editValue->text();
+ value = QVariant(txt != QLatin1String("0") && txt.compare(QLatin1String("false"), Qt::CaseInsensitive));
}
break;
case QVariant::List: