forked from MrBesen/lolautoaccept
use new logger version with qt support
This commit is contained in:
parent
49bdc60071
commit
3f1c264818
|
@ -1,3 +1,3 @@
|
|||
[submodule "thirdparty/Log"]
|
||||
path = thirdparty/Log
|
||||
url = https://git.okaestne.de/okaestne/Log.git
|
||||
url = https://git.mrbesen.de/MrBesen/Log.git
|
||||
|
|
|
@ -14,6 +14,7 @@ unix:LIBS += -lcurl -pthread -lrt
|
|||
# depend on your compiler). Please consult the documentation of the
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
DEFINES += LOG_ENABLEQT=1
|
||||
|
||||
# You can also make your code fail to compile if it uses deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <QTranslator>
|
||||
|
||||
#include <Log.h>
|
||||
#include <QDebug>
|
||||
|
||||
#include "arg.h"
|
||||
#include "mainwindow.h"
|
||||
|
@ -25,18 +26,18 @@ int main(int argc, char** argv) {
|
|||
if(args.debugLog) {
|
||||
Log::setConsoleLogLevel(Log::Level::trace);
|
||||
Log::addLogfile("log.txt", Log::Level::trace);
|
||||
Log::debug << "debug Log enabled";
|
||||
qDebug() << "debug Log enabled";
|
||||
}
|
||||
|
||||
Log::info << "Hello, World!";
|
||||
Log::note << "Using Locale: " << QLocale().name().toStdString();
|
||||
qInfo() << "Hello, World!";
|
||||
qInfo() << "Using Locale: " << QLocale().name().toStdString();
|
||||
|
||||
QApplication app(argc, argv);
|
||||
QTranslator translator;
|
||||
if(translator.load(QLocale().name(), ":/ts")) {
|
||||
app.installTranslator(&translator);
|
||||
} else {
|
||||
Log::warn << "translation not found";
|
||||
qWarning() << "translation not found";
|
||||
}
|
||||
MainWindow win;
|
||||
QIcon icon(":/lolautoaccept.png");
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit e1475e798e2429d171b8f58fc3c96c81db25639c
|
||||
Subproject commit 9a43d50969ecc34d9a3bc8944bc2182e55f7a712
|
Loading…
Reference in New Issue