From a9711316ec94211a349e3deb326cea37aa14d5d8 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 21 May 2021 21:33:17 +0300 Subject: [PATCH] Refactoring. --- src/app/puzzle/vpmainwindow.cpp | 1 - src/libs/vmisc/vabstractapplication.cpp | 12 +++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/app/puzzle/vpmainwindow.cpp b/src/app/puzzle/vpmainwindow.cpp index 351c16465..6b6cb0ac6 100644 --- a/src/app/puzzle/vpmainwindow.cpp +++ b/src/app/puzzle/vpmainwindow.cpp @@ -1077,7 +1077,6 @@ void VPMainWindow::CreateWindowMenu(QMenu *menu) } } - //--------------------------------------------------------------------------------------------------------------------- void VPMainWindow::on_actionNew_triggered() { diff --git a/src/libs/vmisc/vabstractapplication.cpp b/src/libs/vmisc/vabstractapplication.cpp index b64817bab..74e436254 100644 --- a/src/libs/vmisc/vabstractapplication.cpp +++ b/src/libs/vmisc/vabstractapplication.cpp @@ -153,16 +153,14 @@ QString VAbstractApplication::translationsPath(const QString &locale) const { return dir.absolutePath(); } - else - { + #if defined(APPIMAGE) && defined(Q_OS_LINUX) - /* Fix path to trasnaltions when run inside AppImage. */ - return AppImageRoot() + PKGDATADIR + trPath; + /* Fix path to trasnaltions when run inside AppImage. */ + return AppImageRoot() + PKGDATADIR + trPath; #else - return PKGDATADIR + trPath; + return PKGDATADIR + trPath; #endif // defined(APPIMAGE) && defined(Q_OS_LINUX) - } -#endif +#endif // Unix } //---------------------------------------------------------------------------------------------------------------------