summaryrefslogtreecommitdiffstats
path: root/src/sensors/qsensormanager.cpp
diff options
context:
space:
mode:
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 b646d619..b896359a 100644
--- a/src/sensors/qsensormanager.cpp
+++ b/src/sensors/qsensormanager.cpp
@@ -97,7 +97,7 @@ public:
#endif
qCDebug(sensorsCategory) << "Loading config from" << config;
if (!QFile::exists(config)) {
- qCWarning(sensorsCategory) << "There is no config file" << config;
+ qCDebug(sensorsCategory) << "There is no config file" << config;
return;
}
QFile cfgfile(config);
@@ -168,7 +168,7 @@ public Q_SLOTS:
Q_GLOBAL_STATIC(QSensorManagerPrivate, sensorManagerPrivate)
-static void initPlugin(QObject *o)
+static void initPlugin(QObject *o, bool warnOnFail = true)
{
qCDebug(sensorsCategory) << "Init plugin" << o;
if (!o) {
@@ -194,7 +194,7 @@ static void initPlugin(QObject *o)
qCDebug(sensorsCategory) << "Register sensors for " << plugin;
d->seenPlugins.insert(o);
plugin->registerSensors();
- } else {
+ } else if (warnOnFail) {
qCWarning(sensorsCategory) << "Can't cast to plugin" << o;
}
}
@@ -208,7 +208,7 @@ void QSensorManagerPrivate::loadPlugins()
SENSORLOG() << "initializing static plugins";
// Qt-style static plugins
Q_FOREACH (QObject *plugin, QPluginLoader::staticInstances()) {
- initPlugin(plugin);
+ initPlugin(plugin, false/*do not warn on fail*/);
}
if (d->loadExternalPlugins) {