mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
e7cd1785c4
commit
0ea6f13891
5 changed files with 101 additions and 7 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue