diff options
Diffstat (limited to 'examples/client/main.cpp')
-rw-r--r-- | examples/client/main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/client/main.cpp b/examples/client/main.cpp index a0ca51b..ead9dd6 100644 --- a/examples/client/main.cpp +++ b/examples/client/main.cpp | |||
@@ -128,6 +128,7 @@ int main(int argc, char *argv[]) | |||
128 | cliOptions.addPositionalArgument(QObject::tr("[resource]"), | 128 | cliOptions.addPositionalArgument(QObject::tr("[resource]"), |
129 | QObject::tr("A resource to connect to")); | 129 | QObject::tr("A resource to connect to")); |
130 | cliOptions.addOption(QCommandLineOption("clear")); | 130 | cliOptions.addOption(QCommandLineOption("clear")); |
131 | cliOptions.addOption(QCommandLineOption("debuglevel")); | ||
131 | cliOptions.addHelpOption(); | 132 | cliOptions.addHelpOption(); |
132 | cliOptions.process(app); | 133 | cliOptions.process(app); |
133 | QStringList resources = cliOptions.positionalArguments(); | 134 | QStringList resources = cliOptions.positionalArguments(); |
@@ -143,6 +144,9 @@ int main(int argc, char *argv[]) | |||
143 | } | 144 | } |
144 | return 0; | 145 | return 0; |
145 | } | 146 | } |
147 | if (cliOptions.isSet("debuglevel")) { | ||
148 | Akonadi2::Log::setDebugOutputLevel(static_cast<Akonadi2::Log::DebugLevel>(cliOptions.value("debuglevel").toInt())); | ||
149 | } | ||
146 | 150 | ||
147 | //Ensure resource is ready | 151 | //Ensure resource is ready |
148 | for (const auto &resource : resources) { | 152 | for (const auto &resource : resources) { |