From: Daniel Molkentin Date: Wed, 9 Sep 2015 23:25:16 +0000 (+0200) Subject: Allow (partial) translations even when run from build dir X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~1408^2~105 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b83c723e3ff36a1390c1bd5b5ecfe26262ebdda1;p=nextcloud-desktop.git Allow (partial) translations even when run from build dir Makes it easier to catch translation issues earlier --- diff --git a/src/gui/application.cpp b/src/gui/application.cpp index 2bcafee6e..b8839d691 100644 --- a/src/gui/application.cpp +++ b/src/gui/application.cpp @@ -71,6 +71,12 @@ static const char optionsC[] = QString applicationTrPath() { + QString devTrPath = qApp->applicationDirPath() + QString::fromLatin1("/../src/gui/"); + if (QDir(devTrPath).exists()) { + // might miss Qt, QtKeyChain, etc. + qDebug() << "Running from build location! Translations may be incomplete!"; + return devTrPath; + } #if defined(Q_OS_WIN) return QApplication::applicationDirPath(); #elif defined(Q_OS_MAC)