Merge branch '0316-log' into 'dbus-interface'
使用统一日志库输出 See merge request kylin-desktop/kylin-nm!562
This commit is contained in:
commit
2d25456149
|
@ -22,6 +22,7 @@ Build-Depends: debhelper (>=9),
|
||||||
libsecret-1-dev,
|
libsecret-1-dev,
|
||||||
libgtk-3-dev,
|
libgtk-3-dev,
|
||||||
libukcc-dev (>= 3.1.1+1217),
|
libukcc-dev (>= 3.1.1+1217),
|
||||||
|
libukui-log4qt-dev,
|
||||||
Standards-Version: 4.5.0
|
Standards-Version: 4.5.0
|
||||||
Rules-Requires-Root: no
|
Rules-Requires-Root: no
|
||||||
Homepage: https://github.com/ukui/kylin-nm
|
Homepage: https://github.com/ukui/kylin-nm
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
#include <ukui-log4qt.h>
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
||||||
#include "xatom-helper.h"
|
#include "xatom-helper.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -79,13 +80,15 @@ void messageOutput(QtMsgType type, const QMessageLogContext &context, const QStr
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
initUkuiLog4qt("kylin-nm");
|
||||||
|
|
||||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||||
|
|
||||||
// QApplication a(argc, argv);
|
// QApplication a(argc, argv);
|
||||||
QString id = QString("kylin-nm"+ QLatin1String(getenv("DISPLAY")));
|
QString id = QString("kylin-nm"+ QLatin1String(getenv("DISPLAY")));
|
||||||
QtSingleApplication a(id, argc, argv);
|
QtSingleApplication a(id, argc, argv);
|
||||||
qInstallMessageHandler(messageOutput);
|
// qInstallMessageHandler(messageOutput);
|
||||||
if (a.isRunning()) {
|
if (a.isRunning()) {
|
||||||
a.sendMessage("raise_window_noop");
|
a.sendMessage("raise_window_noop");
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
|
|
|
@ -18,7 +18,7 @@ PKGCONFIG +=gio-2.0 glib-2.0 gio-unix-2.0 libnm libnma libsecret-1 gtk+-3.0 gset
|
||||||
|
|
||||||
INCLUDEPATH += /usr/include/KF5/NetworkManagerQt
|
INCLUDEPATH += /usr/include/KF5/NetworkManagerQt
|
||||||
|
|
||||||
LIBS += -L/usr/lib/ -lgsettings-qt -lX11 -lKF5NetworkManagerQt
|
LIBS += -L/usr/lib/ -lgsettings-qt -lX11 -lKF5NetworkManagerQt -lukui-log4qt
|
||||||
#LIBS += -lkysec
|
#LIBS += -lkysec
|
||||||
target.path = /usr/bin
|
target.path = /usr/bin
|
||||||
target.source += $$TARGET
|
target.source += $$TARGET
|
||||||
|
|
Loading…
Reference in New Issue