File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 2121
2222#include " mainwindow.h"
2323#include " sonicpilog.h"
24+ #include < iostream>
25+
2426int main (int argc, char *argv[])
2527{
2628#ifndef Q_OS_MAC
2729 Q_INIT_RESOURCE (SonicPi);
2830#endif
2931
3032 QApplication app (argc, argv);
31- qRegisterMetaType<SonicPiLog::MultiMessage>(" SonicPiLog::MultiMessage" );
3233
34+ QCommandLineParser parser;
35+ parser.setApplicationDescription (" Sonic-Pi" );
36+ parser.addHelpOption ();
37+ parser.addVersionOption ();
38+ QCommandLineOption lang_opt = {{" l" ," lang" },QObject::tr (" Override language to <locale>" )," locale" };
39+ parser.addOption (lang_opt);
40+ parser.process (app);
41+
42+ qRegisterMetaType<SonicPiLog::MultiMessage>(" SonicPiLog::MultiMessage" );
43+
3344 QString systemLocale = QLocale::system ().name ();
45+ if ( parser.isSet (lang_opt) ) systemLocale = parser.value (lang_opt);
3446
3547 QTranslator qtTranslator;
3648 qtTranslator.load (" qt_" + systemLocale, QLibraryInfo::location (QLibraryInfo::TranslationsPath));
You can’t perform that action at this time.
0 commit comments