mirror of
https://gitlab.com/comunic/comunicmessages
synced 2024-12-04 19:24:11 +00:00
32 lines
752 B
C++
32 lines
752 B
C++
/**
|
|
* @author Pierre HUBERT
|
|
*/
|
|
|
|
#include <QApplication>
|
|
|
|
#include "helpers/accounthelper.h"
|
|
#include "widgets/loginwidget.h"
|
|
#include "widgets/mainwindow.h"
|
|
#include "config.h"
|
|
|
|
int main(int argc, char** argv){
|
|
QApplication app(argc, argv);
|
|
|
|
//Define some basic values
|
|
QCoreApplication::setOrganizationName(ORGANIZATION_NAME);
|
|
QCoreApplication::setOrganizationDomain(ORGANIZATION_DOMAIN);
|
|
QCoreApplication::setApplicationName(APPLICATION_NAME);
|
|
|
|
//Determine whether user is signed in or not
|
|
if(AccountHelper().signedIn()){
|
|
MainWindow *mainWindow = new MainWindow;
|
|
mainWindow->show();
|
|
}
|
|
else {
|
|
LoginWidget *widget = new LoginWidget();
|
|
widget->show();
|
|
}
|
|
|
|
return app.exec();
|
|
}
|