Allow (partial) translations even when run from build dir

Makes it easier to catch translation issues earlier
This commit is contained in:
Daniel Molkentin 2015-09-10 01:25:16 +02:00
parent 6b222c3db7
commit b83c723e3f

View file

@ -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)