mirror of
https://gitlab.com/comunic/comunicwatcher
synced 2024-10-22 22:53:24 +00:00
33 lines
845 B
C++
33 lines
845 B
C++
#include <QApplication>
|
|
#include <QMessageBox>
|
|
#include <QSystemTrayIcon>
|
|
|
|
#include "loginwindow.h"
|
|
#include "refreshservice.h"
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QApplication a(argc, argv);
|
|
|
|
// Initialize configuration
|
|
QCoreApplication::setOrganizationName("Communiquons");
|
|
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();
|
|
}
|
|
|
|
else
|
|
RefreshService::startService();
|
|
|
|
return a.exec();
|
|
}
|