Aufgrund einer Wartung wird GitLab am 28.09. zwischen 10:00 und 11:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 28.09. between 10:00 and 11:00 am.

Commit ae4b456c authored by Leander Schulten's avatar Leander Schulten

UX: You can start the Lichtsteuerung only once per computer. On windows you...

UX: You can start the Lichtsteuerung only once per computer. On windows you will see a MessageBox with a error message if the Lichtsteuerung is already running.
parent ac289cd4
Pipeline #191853 passed with stage
in 4 minutes and 45 seconds
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include <QQmlApplicationEngine> #include <QQmlApplicationEngine>
#include <QQmlContext> #include <QQmlContext>
#include <QQuickView> #include <QQuickView>
#include <QSharedMemory>
#include <QSslSocket> #include <QSslSocket>
#include <QTimer> #include <QTimer>
#include <chrono> #include <chrono>
...@@ -51,12 +52,23 @@ ...@@ -51,12 +52,23 @@
#include <id.h> #include <id.h>
#include <limits> #include <limits>
#ifdef Q_OS_WIN
#include <winuser.h>
#endif
#ifdef DrMinGW #ifdef DrMinGW
#include "exchndl.h" #include "exchndl.h"
#include <QNetworkReply> #include <QNetworkReply>
#endif #endif
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
QSharedMemory mem(QStringLiteral("Lichteuerung Leander Schulten"));
if (!mem.create(1)) {
#ifdef Q_OS_WIN
MessageBoxA(nullptr, "The Lichtsteuerung is already running on this computer.", nullptr, MB_OK);
#endif
return 0;
}
error::initErrorHandler(); error::initErrorHandler();
#ifdef DrMinGW #ifdef DrMinGW
ExcHndlInit(); ExcHndlInit();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment