Merge branch '0316-log' into 'dbus-interface'
使用统一日志库输出 See merge request kylin-desktop/kylin-nm!562
This commit is contained in:
commit
2d25456149
|
@ -21,7 +21,8 @@ Build-Depends: debhelper (>=9),
|
|||
libnma-dev,
|
||||
libsecret-1-dev,
|
||||
libgtk-3-dev,
|
||||
libukcc-dev (>= 3.1.1+1217),
|
||||
libukcc-dev (>= 3.1.1+1217),
|
||||
libukui-log4qt-dev,
|
||||
Standards-Version: 4.5.0
|
||||
Rules-Requires-Root: no
|
||||
Homepage: https://github.com/ukui/kylin-nm
|
||||
|
@ -31,7 +32,7 @@ Vcs-Browser: https://github.com/ukui/kylin-nm
|
|||
Package: kylin-nm
|
||||
Architecture: any
|
||||
Depends: network-manager (>=1.2.6),
|
||||
ukui-control-center (>= 3.1.1+1217),
|
||||
ukui-control-center (>= 3.1.1+1217),
|
||||
${shlibs:Depends},
|
||||
${misc:Depends}
|
||||
Description: Gui Applet tool for display and edit network simply
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <QDebug>
|
||||
#include <QDesktopWidget>
|
||||
#include <QFile>
|
||||
#include <ukui-log4qt.h>
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
||||
#include "xatom-helper.h"
|
||||
#endif
|
||||
|
@ -79,13 +80,15 @@ void messageOutput(QtMsgType type, const QMessageLogContext &context, const QStr
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
initUkuiLog4qt("kylin-nm");
|
||||
|
||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
|
||||
// QApplication a(argc, argv);
|
||||
QString id = QString("kylin-nm"+ QLatin1String(getenv("DISPLAY")));
|
||||
QtSingleApplication a(id, argc, argv);
|
||||
qInstallMessageHandler(messageOutput);
|
||||
// qInstallMessageHandler(messageOutput);
|
||||
if (a.isRunning()) {
|
||||
a.sendMessage("raise_window_noop");
|
||||
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
|
||||
|
||||
LIBS += -L/usr/lib/ -lgsettings-qt -lX11 -lKF5NetworkManagerQt
|
||||
LIBS += -L/usr/lib/ -lgsettings-qt -lX11 -lKF5NetworkManagerQt -lukui-log4qt
|
||||
#LIBS += -lkysec
|
||||
target.path = /usr/bin
|
||||
target.source += $$TARGET
|
||||
|
|
Loading…
Reference in New Issue