diff options
Diffstat (limited to 'demo/main.cpp')
| -rw-r--r-- | demo/main.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/demo/main.cpp b/demo/main.cpp index 64c4f22..3100254 100644 --- a/demo/main.cpp +++ b/demo/main.cpp @@ -2,6 +2,9 @@ * @file main.cpp * @brief Entry point for the QtXpl2 demo application. */ +#include "Xpl2Client.h" + +#include <QCommandLineParser> #include <QGuiApplication> #include <QQmlApplicationEngine> @@ -11,8 +14,18 @@ Q_IMPORT_QML_PLUGIN (Xpl2Plugin) int main (int argc, char *argv[]) { + qSetMessagePattern ("Demo [%{time HH:mm:ss.zzz}] %{message}"); + QGuiApplication app (argc, argv); + QCommandLineParser parser; + parser.addOption ({ "wire-debug", "Log raw wire TX/RX to dev log" }); + parser.addHelpOption (); + parser.process (app); + + if (parser.isSet ("wire-debug")) + Xpl2Client::enableWireDebug (); + QQmlApplicationEngine engine; QObject::connect ( &engine, &QQmlApplicationEngine::objectCreationFailed, &app, |
