comunicmessages/main.cpp
2018-11-29 15:53:54 +01:00

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();
}