summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-08-28 16:18:56 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-08-28 16:18:56 +0200
commit881915309098e6bfe0f2577a72eaf9b7f3fdfa8e (patch)
tree26e615d44f40fc5d87b9525be62189dbb530d7e9 /src
parentcea9f48beb46b530fd669f8686ee4a77bfb1738e (diff)
parentf33363d292484f0fe62b177df0fd8080910d01f9 (diff)
Merge remote-tracking branch 'origin/5.3' into 5.4v5.4.0-alpha1
Diffstat (limited to 'src')
-rw-r--r--src/sensors/gestures/qsensorgesturemanagerprivate_p.h11
-rw-r--r--src/sensors/qsensormanager.cpp8
2 files changed, 15 insertions, 4 deletions
diff --git a/src/sensors/gestures/qsensorgesturemanagerprivate_p.h b/src/sensors/gestures/qsensorgesturemanagerprivate_p.h
index fefabd59..abcadd36 100644
--- a/src/sensors/gestures/qsensorgesturemanagerprivate_p.h
+++ b/src/sensors/gestures/qsensorgesturemanagerprivate_p.h
@@ -34,6 +34,17 @@
#ifndef QSENSORGESTUREMANAGERPRIVATE_P_H
#define QSENSORGESTUREMANAGERPRIVATE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QObject>
#include <QMap>
#include <QStringList>
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) {