summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/feedback/qfeedbackplugin.cpp12
-rw-r--r--src/feedback/qfeedbackpluginsearch.h5
2 files changed, 16 insertions, 1 deletions
diff --git a/src/feedback/qfeedbackplugin.cpp b/src/feedback/qfeedbackplugin.cpp
index 0c32b86..2616f35 100644
--- a/src/feedback/qfeedbackplugin.cpp
+++ b/src/feedback/qfeedbackplugin.cpp
@@ -120,13 +120,18 @@ class BackendLoader
{
public:
BackendLoader() : inst(0) { }
- ~BackendLoader() { pl.unload(); }
+ ~BackendLoader() {
+#if QT_CONFIG(library)
+ pl.unload();
+#endif
+ }
void setInstance(T *newInst) { inst = newInst; }
T * instance() { return inst; }
void tryLoad(QPluginLoader &loader)
{
+#if QT_CONFIG(library)
if (T *newInst = qobject_cast<T*>(loader.instance())) {
if (!inst || inst->pluginPriority() < newInst->pluginPriority()) {
inst = newInst;
@@ -135,6 +140,9 @@ public:
pl.load(); //Adds a ref to the library
}
}
+#else
+ Q_UNUSED(loader)
+#endif
}
@@ -252,6 +260,7 @@ class BackendManager
public:
BackendManager()
{
+#if QT_CONFIG(library)
QStringList pluginPaths = getPluginPaths(QLatin1String("feedback"));
foreach (const QString& pluginPath, pluginPaths) {
@@ -266,6 +275,7 @@ public:
loader.unload();
}
}
+#endif
if (!hapticsBackend.instance())
hapticsBackend.setInstance(new QDummyBackend);
diff --git a/src/feedback/qfeedbackpluginsearch.h b/src/feedback/qfeedbackpluginsearch.h
index c2699e2..2b946d0 100644
--- a/src/feedback/qfeedbackpluginsearch.h
+++ b/src/feedback/qfeedbackpluginsearch.h
@@ -47,6 +47,7 @@ QT_BEGIN_NAMESPACE
inline QStringList getPluginPaths(const QString& plugintype)
{
+#if QT_CONFIG(library)
#if !defined QT_NO_DEBUG
const bool showDebug = qgetenv("QT_DEBUG_PLUGINS").toInt() > 0;
#endif
@@ -106,6 +107,10 @@ inline QStringList getPluginPaths(const QString& plugintype)
}
return plugins;
+#else
+ Q_UNUSED(plugintype)
+ return QStringList();
+#endif
}
QT_END_NAMESPACE