mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
merge master
This commit is contained in:
@@ -1,23 +1,23 @@
|
||||
//#include "gpservice.h"
|
||||
#include <iostream>
|
||||
#include <QtDBus/QtDBus>
|
||||
#include <QtCore/QProcessEnvironment>
|
||||
|
||||
#include "gpservice.h"
|
||||
#include "singleapplication.h"
|
||||
#include "sigwatch.h"
|
||||
#include "iostream"
|
||||
|
||||
//#include <QtDBus>
|
||||
#include <QProcessEnvironment>
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
SingleApplication app(argc, argv);
|
||||
|
||||
// if (!QDBusConnection::systemBus().isConnected()) {
|
||||
// qWarning("Cannot connect to the D-Bus session bus.\n"
|
||||
// "Please check your system settings and try again.\n");
|
||||
// return 1;
|
||||
// }
|
||||
if (!QDBusConnection::systemBus().isConnected())
|
||||
{
|
||||
qWarning("Cannot connect to the D-Bus session bus.\n"
|
||||
"Please check your system settings and try again.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// GPService service;
|
||||
GPService service;
|
||||
|
||||
QString env = "ENV: " + QProcessEnvironment::systemEnvironment().toStringList().join("\n");
|
||||
std::cout << env.toStdString();
|
||||
@@ -27,7 +27,7 @@ int main(int argc, char *argv[])
|
||||
sigwatch.watchForSignal(SIGTERM);
|
||||
sigwatch.watchForSignal(SIGQUIT);
|
||||
sigwatch.watchForSignal(SIGHUP);
|
||||
// QObject::connect(&sigwatch, &UnixSignalWatcher::unixSignal, &service, &GPService::quit);
|
||||
QObject::connect(&sigwatch, &UnixSignalWatcher::unixSignal, &service, &GPService::quit);
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user