mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
Add singleapplication
This commit is contained in:
Binary file not shown.
@@ -4,6 +4,9 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
CONFIG += c++11
|
||||
|
||||
include(../singleapplication/singleapplication.pri)
|
||||
DEFINES += QAPPLICATION_CLASS=QApplication
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any Qt feature that has been marked deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
|
@@ -1,11 +1,13 @@
|
||||
#include "singleapplication.h"
|
||||
#include "gpclient.h"
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
SingleApplication app(argc, argv);
|
||||
GPClient w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
|
||||
QObject::connect(&app, &SingleApplication::instanceStarted, &w, &GPClient::raise);
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
Reference in New Issue
Block a user