comunicmessages/main.cpp

32 lines
752 B
C++
Raw Normal View History

2018-11-27 18:15:54 +00:00
/**
* @author Pierre HUBERT
*/
#include <QApplication>
#include "helpers/accounthelper.h"
#include "widgets/loginwidget.h"
2018-11-29 14:53:54 +00:00
#include "widgets/mainwindow.h"
#include "config.h"
2018-11-27 18:15:54 +00:00
int main(int argc, char** argv){
QApplication app(argc, argv);
2018-11-29 14:53:54 +00:00
//Define some basic values
QCoreApplication::setOrganizationName(ORGANIZATION_NAME);
QCoreApplication::setOrganizationDomain(ORGANIZATION_DOMAIN);
QCoreApplication::setApplicationName(APPLICATION_NAME);
2018-11-27 18:15:54 +00:00
//Determine whether user is signed in or not
2018-11-29 14:53:54 +00:00
if(AccountHelper().signedIn()){
MainWindow *mainWindow = new MainWindow;
mainWindow->show();
}
2018-11-27 18:15:54 +00:00
else {
LoginWidget *widget = new LoginWidget();
widget->show();
}
return app.exec();
}