summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleix Pol <[email protected]>2017-01-11 13:22:07 +0100
committerAleix Pol <[email protected]>2017-01-11 13:22:07 +0100
commite3a9f30b5405c196c23e8a0adf92244d2b35d009 (patch)
treef9a4d0fe6fe9aef39c2c5f11584be0d376788660
parent3becf3b1992cb987a19ce00c25d6f06b79acbae0 (diff)
Introduce a dummy question manager
Will print the questions and answer them as invalid
-rw-r--r--libdiscover/backends/KNSBackend/KNSBackend.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libdiscover/backends/KNSBackend/KNSBackend.cpp b/libdiscover/backends/KNSBackend/KNSBackend.cpp
index 41691d5..026e356 100644
--- a/libdiscover/backends/KNSBackend/KNSBackend.cpp
+++ b/libdiscover/backends/KNSBackend/KNSBackend.cpp
@@ -32,6 +32,7 @@
// KDE includes
#include <KNSCore/Engine>
+#include <KNSCore/QuestionManager>
#include <KConfigGroup>
#include <KDesktopFile>
#include <KLocalizedString>
@@ -52,6 +53,13 @@ class KNSBackendFactory : public AbstractResourcesBackendFactory {
Q_PLUGIN_METADATA(IID "org.kde.muon.AbstractResourcesBackendFactory")
Q_INTERFACES(AbstractResourcesBackendFactory)
public:
+ KNSBackendFactory() {
+ connect(KNSCore::QuestionManager::instance(), &KNSCore::QuestionManager::askQuestion, this, [](KNSCore::Question* q) {
+ qWarning() << q->question() << q->questionType();
+ q->setResponse(KNSCore::Question::InvalidResponse);
+ });
+ }
+
QVector<AbstractResourcesBackend*> newInstance(QObject* parent, const QString &/*name*/) const override
{
QVector<AbstractResourcesBackend*> ret;