diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-03-16 09:44:30 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-03-16 11:07:18 +0100 |
commit | 1e79cd43393c230d9e137d7773e0d32f6be66da6 (patch) | |
tree | 92e5dc0d9fc564d6debe1bddee0812b372bf84c9 /src | |
parent | 432d7f423f0c01e2ff8e7d3d0a2b512be91e3abb (diff) |
Replace container.count() with !isEmpty()
Pick-to: 6.3
Change-Id: Ie4c28aae4d706db1e6170acaec6d1702cb69d1c5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/activeqt/container/qaxbase.cpp | 6 | ||||
-rw-r--r-- | src/activeqt/container/qaxdump.cpp | 6 | ||||
-rw-r--r-- | src/activeqt/control/qaxserverbase.cpp | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp index 4944c3b..a2c6ffd 100644 --- a/src/activeqt/container/qaxbase.cpp +++ b/src/activeqt/container/qaxbase.cpp @@ -2421,7 +2421,7 @@ void MetaObjectGenerator::readFuncsInfo(ITypeInfo *typeinfo, ushort nFuncs) if (funcdesc->cParams - funcdesc->cParamsOpt <= 1) { bool dontBreak = false; // getter with non-default-parameters -> fall through to function handling - if (funcdesc->invkind == INVOKE_PROPERTYGET && parameters.count() && funcdesc->cParams - funcdesc->cParamsOpt) { + if (funcdesc->invkind == INVOKE_PROPERTYGET && !parameters.isEmpty() && funcdesc->cParams - funcdesc->cParamsOpt) { dontBreak = true; } else { uint flags = Readable; @@ -3071,7 +3071,7 @@ const QMetaObject *QAxBase::axBaseMetaObject() const */ void QAxBase::connectNotify() { - if (d->eventSink.count()) // already listening + if (!d->eventSink.isEmpty()) // already listening return; IEnumConnectionPoints *epoints = nullptr; @@ -3168,7 +3168,7 @@ void QAxBase::connectNotify() typelib->Release(); // make sure we don't try again - if (!d->eventSink.count()) + if (d->eventSink.isEmpty()) d->eventSink.insert(QUuid{}, nullptr); } diff --git a/src/activeqt/container/qaxdump.cpp b/src/activeqt/container/qaxdump.cpp index 5ae4f79..fba3f1a 100644 --- a/src/activeqt/container/qaxdump.cpp +++ b/src/activeqt/container/qaxdump.cpp @@ -223,7 +223,7 @@ QString qax_generateDocumentation(QAxBase *that) detail += QLatin1String("<p>Or call the function directly:<pre>\n"); - bool hasParams = slot.parameterTypes().count() != 0; + const bool hasParams = !slot.parameterTypes().isEmpty(); if (hasParams) detail += QLatin1String("\tQVariantList params = ...\n"); detail += QLatin1String("\t"); @@ -392,12 +392,12 @@ QString qax_generateDocumentation(QAxBase *that) stream << "</ul>" << Qt::endl; } } - if (methodDetails.count()) { + if (!methodDetails.isEmpty()) { stream << "<hr><h2>Member Function Documentation</h2>" << Qt::endl; for (int i = 0; i < methodDetails.count(); ++i) stream << methodDetails.at(i) << Qt::endl; } - if (propDetails.count()) { + if (!propDetails.isEmpty()) { stream << "<hr><h2>Property Documentation</h2>" << Qt::endl; for (int i = 0; i < propDetails.count(); ++i) stream << propDetails.at(i) << Qt::endl; diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp index b08b484..3d10886 100644 --- a/src/activeqt/control/qaxserverbase.cpp +++ b/src/activeqt/control/qaxserverbase.cpp @@ -2616,7 +2616,7 @@ HRESULT WINAPI QAxServerBase::Invoke(DISPID dispidMember, REFIID riid, case DISPATCH_METHOD: case DISPATCH_PROPERTYPUT: case DISPATCH_PROPERTYPUT|DISPATCH_PROPERTYPUTREF: - if (m_spAdviseSink || adviseSinks.count()) { + if (m_spAdviseSink || !adviseSinks.isEmpty()) { FORMATETC fmt; fmt.cfFormat = 0; fmt.ptd = nullptr; |