From 2a536d57ed59d38fd1d1bf3c461978bc4b4c49fa Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 13 Jun 2020 14:19:30 +0200 Subject: [PATCH] Check system compatibility --- main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.cpp b/main.cpp index de533fc..8b67766 100644 --- a/main.cpp +++ b/main.cpp @@ -1,4 +1,6 @@ #include +#include +#include #include "loginwindow.h" #include "refreshservice.h" @@ -12,6 +14,13 @@ int main(int argc, char *argv[]) QCoreApplication::setOrganizationDomain("communiquons.org"); QCoreApplication::setApplicationName("ComunicWatcher"); + // Check if the system is compatible + if(!QSystemTrayIcon::isSystemTrayAvailable()) { + QMessageBox::warning(nullptr, QObject::tr("Unsupported system"), QObject::tr("Unfortunately, your system is not supported by this application...")); + return -1; + } + + if(!AccountHelper::SignedIn()) { (new LoginWindow())->show(); }