diff --git a/src/libs/vmisc/vabstractapplication.cpp b/src/libs/vmisc/vabstractapplication.cpp index e60731ce0..71ed41b99 100644 --- a/src/libs/vmisc/vabstractapplication.cpp +++ b/src/libs/vmisc/vabstractapplication.cpp @@ -217,6 +217,18 @@ auto VAbstractApplication::translationsPath(const QString &locale) -> QString return dir.absolutePath(); } +#ifdef QBS_BUILD +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + dir.setPath(QCoreApplication::applicationDirPath() + "/../../.." + PKGDATADIR + trPath); +#else + dir = QDir(QCoreApplication::applicationDirPath() + "/../../.." + PKGDATADIR + trPath); +#endif + if (dir.exists()) + { + return dir.absolutePath(); + } +#endif // QBS_BUILD + #if defined(APPIMAGE) && defined(Q_OS_LINUX) /* Fix path to trasnaltions when run inside AppImage. */ return AppImageRoot() + PKGDATADIR + trPath;