summaryrefslogtreecommitdiffstats
path: root/src/sensors/qsensormanager.cpp
diff options
context:
space:
mode:
authorJuha Vuolle <juha.vuolle@insta.fi>2022-09-30 10:23:45 +0300
committerJuha Vuolle <juha.vuolle@insta.fi>2022-10-04 08:11:52 +0300
commitc3a265592d7d4709998e5bf12d14a143aa0bf14f (patch)
treedf3fb44a6049105f1e062d62d0b52f6e407c0180 /src/sensors/qsensormanager.cpp
parenta83541566473ce7f362eced21d12ac245a28f431 (diff)
Change from count() to size() with Qt containers
As the preferred method. Potentially may be deprecated similar to QString/QByteArray Fixes: QTBUG-107068 Change-Id: I0cfc9d7f8e2e450849f1d22c5b98aa353748ecf6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'src/sensors/qsensormanager.cpp')
-rw-r--r--src/sensors/qsensormanager.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sensors/qsensormanager.cpp b/src/sensors/qsensormanager.cpp
index 7cdc1b24..b246aadf 100644
--- a/src/sensors/qsensormanager.cpp
+++ b/src/sensors/qsensormanager.cpp
@@ -89,7 +89,7 @@ public:
//read out setting line
line.remove(QLatin1String(" "));
QStringList pair = line.split(QStringLiteral("="));
- if (pair.count() == 2)
+ if (pair.size() == 2)
defaultIdentifierForType.insert(pair[0].toLatin1(), pair[1].toLatin1());
}
}
@@ -183,7 +183,7 @@ void QSensorManagerPrivate::loadPlugins()
if (d->loadExternalPlugins) {
SENSORLOG() << "initializing plugins";
QList<QPluginParsedMetaData> meta = d->loader->metaData();
- for (int i = 0; i < meta.count(); i++) {
+ for (int i = 0; i < meta.size(); i++) {
QObject *plugin = d->loader->instance(i);
initPlugin(plugin);
}
@@ -271,7 +271,7 @@ void QSensorManager::unregisterBackend(const QByteArray &type, const QByteArray
(void)factoryByIdentifier.take(identifier); // we don't own this pointer anyway
if (d->firstIdentifierForType[type] == identifier) {
- if (factoryByIdentifier.count()) {
+ if (factoryByIdentifier.size()) {
d->firstIdentifierForType[type] = factoryByIdentifier.begin().key();
if (d->firstIdentifierForType[type].startsWith("generic.")) {
// Don't let a generic backend be the default when some other backend exists!
@@ -287,7 +287,7 @@ void QSensorManager::unregisterBackend(const QByteArray &type, const QByteArray
(void)d->firstIdentifierForType.take(type);
}
}
- if (!factoryByIdentifier.count())
+ if (!factoryByIdentifier.size())
(void)d->backendsByType.take(type);
// Notify the app that the available sensor list has changed.