Disable QML console.debug() with QT_NO_DEBUG_OUTPUT
This commit is contained in:
parent
366cafde42
commit
64cc9951db
2 changed files with 9 additions and 1 deletions
|
@ -14,7 +14,7 @@ TARGET = harbour-batterybuddy
|
|||
|
||||
CONFIG += sailfishapp sailfishapp_i18n
|
||||
|
||||
#DEFINES += QT_NO_DEBUG_OUTPUT
|
||||
DEFINES += QT_NO_DEBUG_OUTPUT
|
||||
|
||||
HEADERS += \
|
||||
src/battery.h \
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
#include <QQmlEngine>
|
||||
#include <QTimer>
|
||||
#include <QDebug>
|
||||
#ifdef QT_NO_DEBUG_OUTPUT
|
||||
#include <QLoggingCategory>
|
||||
#endif
|
||||
|
||||
#include "battery.h"
|
||||
#include "settings.h"
|
||||
|
@ -43,6 +46,11 @@ int main(int argc, char *argv[])
|
|||
//
|
||||
// To display the view, call "show()" (will show fullscreen on device).
|
||||
|
||||
#ifdef QT_NO_DEBUG_OUTPUT
|
||||
// Disable QML debug level logging
|
||||
QLoggingCategory::setFilterRules("*.debug=false");
|
||||
#endif
|
||||
|
||||
qInfo() << "Starting Battery Buddy...";
|
||||
|
||||
QGuiApplication* app = SailfishApp::application(argc, argv);
|
||||
|
|
Loading…
Reference in a new issue