-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
52 lines (45 loc) · 1.25 KB
/
Copy pathmain.cpp
File metadata and controls
52 lines (45 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/***************************************************************************************************
*
* FILE: main.cpp
*
* CREATED: 10-05-2010
*
* AUTHOR: Benjamin Caspari (becaspari@googlemail.com)
*
* PURPOSE: the program entry point
*
* This program is licensed under the terms of the GPL Version 2
*
* Copyright 2010 by Benjamin Caspari
*
***************************************************************************************************/
#include <QApplication>
#include <QTranslator>
#include <QLibraryInfo>
#include <QLocale>
#include <QDebug>
#include "mainwindow.h"
#include "appsettings.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QTranslator qtTranslator;
qtTranslator.load("qt_" + QLocale::system().name(),
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
a.installTranslator(&qtTranslator);
QTranslator myappTranslator;
myappTranslator.load(a.applicationDirPath() + "/mosaicit_" + QLocale::system().name());
a.installTranslator(&myappTranslator);
if (!AppSettings::init())
{
return 2;
}
/*if (!Debug::init())
{
return 3;
}*/
qDebug() << "Starting up.";
MainWindow w;
w.show();
return a.exec();
}