Merge branch 'master' of ssh://git.rustysoft.de/martin/kima2

This commit is contained in:
Martin Brodbeck 2022-09-27 09:01:55 +02:00
commit 42bf036f85

View file

@ -21,21 +21,12 @@ int main(int argc, char *argv[])
QCoreApplication::setOrganizationDomain("rustysoft.de");
QCoreApplication::setApplicationName("kima2");
QTranslator qTranslator;
QLocale german(QLocale::German);
#ifdef __linux__
bool retVal =
qTranslator.load("qt_" + german.name(), QLibraryInfo::path(QLibraryInfo::TranslationsPath));
if (!retVal) {
throw std::runtime_error("Could not load translation.");
QTranslator qtTranslator;
if (qtTranslator.load(QLocale::system(), u"qtbase"_qs, u"_"_qs,
QLibraryInfo::path(QLibraryInfo::TranslationsPath))) {
kimaApp.installTranslator(&qtTranslator);
}
#endif
#ifdef _WIN32
QApplication::setStyle(QStyleFactory::create("Fusion"));
qTranslator.load("qt_" + german.name(),
QApplication::applicationDirPath() + QDir::separator() + "translations");
#endif
kimaApp.installTranslator(&qTranslator);
QSettings settings{};
while (!settings.contains("global/cashPointNo")) {