Commit 08d0ad5f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Implement userfeedback commandline

parent 72713b78
......@@ -26,9 +26,8 @@
#include <Kdelibs4ConfigMigrator>
#include <KCrash>
#ifdef WITH_KUSERFEEDBACK
#include "userfeedback/userfeedbackmanager.h"
#include "userfeedback/pimdataexporteduserfeedbackprovider.h"
#include <KUserFeedback/Provider>
#include <KUserFeedback/FeedbackConfigWidget>
#endif
int main(int argc, char *argv[])
......@@ -50,12 +49,14 @@ int main(int argc, char *argv[])
PimDataCommandLineOption parser;
parser.createParser(app);
//#ifdef WITH_KUSERFEEDBACK
// if(parser.isSet(QStringLiteral("feedback"))) {
//// QTextStream(stdout) << UserFeedBackManager::self()->userFeedbackProvider()->describeDataSources() << '\n';
// return 0;
// }
//#endif
#ifdef WITH_KUSERFEEDBACK
if(parser.parseUserFeedback()) {
PimDataExportedUserFeedbackProvider *provider = new PimDataExportedUserFeedbackProvider;
QTextStream(stdout) << provider->describeDataSources() << '\n';
delete provider;
return 0;
}
#endif
KDBusService service(KDBusService::Unique);
PimDataExporterWindow *backupMailWin = new PimDataExporterWindow();
......
......@@ -76,3 +76,8 @@ void PimDataCommandLineOption::handleCommandLine()
mExporterWindow->handleCommandLine(mParser);
}
}
bool PimDataCommandLineOption::parseUserFeedback() const
{
return mParser.isSet(QStringLiteral("feedback"));
}
......@@ -36,6 +36,8 @@ public:
void setExportWindow(PimDataExporterWindow *exporterWindow);
void handleCommandLine();
Q_REQUIRED_RESULT bool parseUserFeedback() const;
public Q_SLOTS:
void slotActivateRequested(const QStringList &arguments, const QString &workingDirectory);
......
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