aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qmidiplayer-desktop/main.cpp')
-rw-r--r--qmidiplayer-desktop/main.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/qmidiplayer-desktop/main.cpp b/qmidiplayer-desktop/main.cpp
index b1c9149..9f1d593 100644
--- a/qmidiplayer-desktop/main.cpp
+++ b/qmidiplayer-desktop/main.cpp
@@ -44,11 +44,19 @@ int main(int argc,char **argv)
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
a.installTranslator(&qtTranslator);
QTranslator qmpTranslator;
- qmpTranslator.load("qmp_"+QLocale::system().name());
+#ifndef NON_PORTABLE
+ qmpTranslator.load("qmp_"+QLocale::system().name(),
+ QCoreApplication::applicationDirPath()+"/translations/");
+#else
+#define strify(s) #s
+ qmpTranslator.load("qmp_"+QLocale::system().name(),
+ QString(strify(INSTALL_PREFIX))+"/share/qmidiplayer/translations");
+#undef strify
+#endif
a.installTranslator(&qmpTranslator);
QCommandLineParser clp;
- clp.setApplicationDescription("A cross-platform MIDI player.");
+ clp.setApplicationDescription(QCoreApplication::translate("main","A cross-platform MIDI player."));
clp.addHelpOption();
clp.addVersionOption();
clp.addPositionalArgument("file",QCoreApplication::translate("main","midi files to play (optional)."),"[files...]");