rsyncui/main.cpp

34 lines
923 B
C++

#include "mainwindow.h"
#include "tools.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);
}
// Enable logging to journald
qputenv("QT_FORCE_STDERR_LOGGING", QByteArray("0"));
static const QString appName = "RsyncUI";
//Password passwdJob;
MainWindow w;
info(DEBUGMACRO, "RsyncUI begining");
w.show();
return a.exec();
}