Rev 674 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 674 | Rev 908 | ||
---|---|---|---|
Line 16... | Line 16... | ||
16 | * Free Software Foundation, Inc., * |
16 | * Free Software Foundation, Inc., * |
17 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
17 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
18 | ***************************************************************************/ |
18 | ***************************************************************************/ |
Line 19... | Line 19... | ||
19 | 19 | ||
- | 20 | #include <QtGui/QApplication> |
|
- | 21 | #include <QTranslator> |
|
20 | #include <QtGui/QApplication> |
22 | |
Line 21... | Line 23... | ||
21 | #include "Dialogs/dlg_Main.h" |
23 | #include "Dialogs/dlg_Main.h" |
22 | 24 | ||
23 | int main(int argc, char *argv[]) |
25 | int main(int argc, char *argv[]) |
Line -... | Line 26... | ||
- | 26 | { |
|
- | 27 | QApplication App(argc, argv); |
|
- | 28 | ||
- | 29 | QString locale = QLocale::system().name(); |
|
- | 30 | qDebug() << "QMK-Setting_" << locale; |
|
- | 31 | ||
- | 32 | // Enable translation service |
|
- | 33 | QTranslator translator; |
|
- | 34 | ||
- | 35 | QDir dir(argv[0]); |
|
- | 36 | QString appPath = dir.canonicalPath().toAscii().append("_"); |
|
- | 37 | ||
- | 38 | if (!translator.load(QString(appPath).append(locale))) { |
|
- | 39 | qDebug() << "Error loading translation file: " << appPath << locale; |
|
- | 40 | } |
|
24 | { |
41 | |
Line 25... | Line 42... | ||
25 | QApplication App(argc, argv); |
42 | App.installTranslator(&translator); |
26 | - | ||
27 | dlg_Main *MainApp = new dlg_Main(); |
43 | |
Line 28... | Line 44... | ||
28 | 44 | dlg_Main *MainApp = new dlg_Main(); |
|
29 | MainApp->show(); |
- | |
30 | 45 | ||
31 | int iReturn = App.exec(); |
46 | MainApp->show(); |