mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-24 05:45:27 +00:00
Fix of commit dd4a566408
(#901)
Problem was that QSetting were initialized before application/organization name is set
This commit is contained in:
parent
84b70215ce
commit
313e8b17cd
@ -24,6 +24,14 @@
|
||||
|
||||
CutterApplication::CutterApplication(int &argc, char **argv) : QApplication(argc, argv)
|
||||
{
|
||||
// Setup application information
|
||||
setOrganizationName("Cutter");
|
||||
setApplicationName("Cutter");
|
||||
setApplicationVersion(CUTTER_VERSION_FULL);
|
||||
setWindowIcon(QIcon(":/img/cutter.svg"));
|
||||
setAttribute(Qt::AA_DontShowIconsInMenus);
|
||||
|
||||
// WARN!!! Put initialization code below this line. Code above this line is mandatory to be run First
|
||||
// Load translations
|
||||
QTranslator *t = new QTranslator;
|
||||
QTranslator *qtBaseTranslator = new QTranslator;
|
||||
@ -37,10 +45,12 @@ CutterApplication::CutterApplication(int &argc, char **argv) : QApplication(argc
|
||||
for (auto &it : allLocales) {
|
||||
langPrefix = it.bcp47Name();
|
||||
if (langPrefix == language) {
|
||||
t->load(QString(QCoreApplication::applicationDirPath() + QDir::separator() +
|
||||
"translations" + QDir::separator() +
|
||||
"cutter_%1.qm").arg(langPrefix));
|
||||
const QString &cutterTranslationPath = QCoreApplication::applicationDirPath() + QDir::separator()
|
||||
+ "translations" + QDir::separator() + QString("cutter_%1.qm").arg(langPrefix);
|
||||
|
||||
if (t->load(cutterTranslationPath)) {
|
||||
installTranslator(t);
|
||||
}
|
||||
QApplication::setLayoutDirection(it.textDirection());
|
||||
QLocale::setDefault(it);
|
||||
|
||||
@ -62,13 +72,6 @@ CutterApplication::CutterApplication(int &argc, char **argv) : QApplication(argc
|
||||
}
|
||||
}
|
||||
|
||||
// Setup application information
|
||||
setOrganizationName("Cutter");
|
||||
setApplicationName("Cutter");
|
||||
setApplicationVersion(CUTTER_VERSION_FULL);
|
||||
setWindowIcon(QIcon(":/img/cutter.svg"));
|
||||
setAttribute(Qt::AA_DontShowIconsInMenus);
|
||||
|
||||
// Load fonts
|
||||
int ret = QFontDatabase::addApplicationFont(":/fonts/Anonymous Pro.ttf");
|
||||
if (ret == -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user