Commit 827e3792 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Show userfeedback module list

parent 7d1c4a70
......@@ -40,6 +40,10 @@ static void kaddressbook_options(QCommandLineParser *parser)
QStringLiteral("urls"),
i18n("Files or URLs. The user will be asked whether to import."),
QStringLiteral("[urls...]"));
#ifdef WITH_KUSERFEEDBACK
parser->addOption(QCommandLineOption(QStringLiteral("feedback"), i18n("Lists the available options for user feedback")));
#endif
}
#endif // KADDRESSBOOK_OPTIONS_H
......@@ -29,6 +29,9 @@
#include "kaddressbook_debug.h"
#include <kontactinterface/pimuniqueapplication.h>
#ifdef WITH_KUSERFEEDBACK
#include "userfeedback/kaddressbookuserfeedbackprovider.h"
#endif
//-----------------------------------------------------------------------------
......@@ -77,6 +80,15 @@ int main(int argc, char **argv)
cmdArgs->process(args);
about.processCommandLine(cmdArgs);
#ifdef WITH_KUSERFEEDBACK
if(cmdArgs->isSet(QStringLiteral("feedback"))) {
KAddressBookUserFeedbackProvider *userFeedBack = new KAddressBookUserFeedbackProvider(nullptr);
QTextStream(stdout) << userFeedBack->describeDataSources() << '\n';
delete userFeedBack;
return 0;
}
#endif
if (!KAddressBookApplication::start(args)) {
qCWarning(KADDRESSBOOK_LOG) << "kaddressbook is already running, exiting.";
return 0;
......
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