Commit eeb1bedb authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Show userfeedback info

parent 63dd8d59
......@@ -110,6 +110,7 @@ target_link_libraries(sieveeditor
KF5::XmlGui
KF5::I18n
KF5::DBusAddons
${libsieveeditor_userfeedback_LIB}
)
install(TARGETS sieveeditor ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
......
......@@ -26,6 +26,13 @@
#include <KDBusService>
#include <QCommandLineParser>
#include <KCrash>
#ifdef WITH_KUSERFEEDBACK
#include "userfeedback/userfeedbackmanager.h"
#include <KUserFeedback/Provider>
#include <KUserFeedback/FeedbackConfigWidget>
#include <QTextStream>
#endif
int main(int argc, char **argv)
{
......@@ -54,9 +61,20 @@ int main(int argc, char **argv)
QCommandLineParser parser;
aboutData.setupCommandLine(&parser);
#ifdef WITH_KUSERFEEDBACK
parser.addOption(QCommandLineOption(QStringLiteral("feedback"), i18n("Lists the available options for user feedback")));
#endif
parser.process(app);
aboutData.processCommandLine(&parser);
#ifdef WITH_KUSERFEEDBACK
if(parser.isSet(QStringLiteral("feedback"))) {
QTextStream(stdout) << UserFeedBackManager::self()->userFeedbackProvider()->describeDataSources() << '\n';
return 0;
}
#endif
KDBusService service(KDBusService::Unique);
SieveEditorMainWindow *mw = new SieveEditorMainWindow();
......
......@@ -22,10 +22,11 @@
#define USERFEEDBACKMANAGER_H
#include <QObject>
#include "libsieveeditor_export.h"
namespace KUserFeedback {
class Provider;
}
class UserFeedBackManager : public QObject
class LIBSIEVEEDITOR_EXPORT UserFeedBackManager : public QObject
{
Q_OBJECT
public:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment