diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2017-06-05 18:16:12 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-06-11 13:55:41 -0700 |
commit | 0ea6f13891cff45d1da7cb23a5e07a2080827b78 (patch) | |
tree | befb85625f000382fa5263b1cc04911c775cd326 /subsurface-mobile-helper.cpp | |
parent | e7cd1785c420ba797477c8bd272ee02547731048 (diff) | |
download | subsurface-0ea6f13891cff45d1da7cb23a5e07a2080827b78.tar.gz |
Add a messageHandler to take care of qDebug & friends on QML
all qDebug / qCDebug and friends now will be properly
logged into developer -> log, on QML.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-mobile-helper.cpp')
-rw-r--r-- | subsurface-mobile-helper.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/subsurface-mobile-helper.cpp b/subsurface-mobile-helper.cpp index 7d9037775..00c0e2c08 100644 --- a/subsurface-mobile-helper.cpp +++ b/subsurface-mobile-helper.cpp @@ -23,6 +23,7 @@ #include "mobile-widgets/qmlprofile.h" #include "core/downloadfromdcthread.h" #include "qt-models/diveimportedmodel.h" +#include "qt-models/messagehandlermodel.h" #include "mobile-widgets/qml/kirigami/src/kirigamiplugin.h" @@ -74,6 +75,7 @@ void run_ui() ctxt->setContextProperty("diveModel", sortModel); ctxt->setContextProperty("gpsModel", gpsSortModel); ctxt->setContextProperty("vendorList", vendorList); + ctxt->setContextProperty("logModel", MessageHandlerModel::self()); engine.load(QUrl(QStringLiteral("qrc:///qml/main.qml"))); qqWindowObject = engine.rootObjects().value(0); |