Check system compatibility

This commit is contained in:
Pierre HUBERT 2020-06-13 14:19:30 +02:00
parent 38284bb2af
commit 2a536d57ed

View File

@ -1,4 +1,6 @@
#include <QApplication>
#include <QMessageBox>
#include <QSystemTrayIcon>
#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();
}