32 lines
852 B
C++
32 lines
852 B
C++
#include "mainwindow.h"
|
|
|
|
#include <QTranslator>
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QApplication a(argc, argv);
|
|
QTranslator myappTranslator;
|
|
|
|
QCoreApplication::setOrganizationName("RsyncUI");
|
|
QCoreApplication::setApplicationName("RsyncUI");
|
|
|
|
// Initialization of localization
|
|
QLocale localeName = QLocale::system();
|
|
QString localeDir = "/usr/share/locale/" + localeName.name() + "/LC_MESSAGES/"; //RsyncUI_" + localeName.name() + ".qm";
|
|
QString localeFilename = QCoreApplication::applicationName() + "_" + localeName.name();
|
|
QLocale locale = QLocale();
|
|
|
|
if (myappTranslator.load(localeFilename, localeDir))
|
|
{
|
|
a.installTranslator(&myappTranslator);
|
|
}
|
|
|
|
static const QString appName = "RsyncUI";
|
|
|
|
//Password passwdJob;
|
|
MainWindow w;
|
|
w.show();
|
|
w.init();
|
|
return a.exec();
|
|
}
|