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