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-Communicator_" << 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; |
|
24 | { |
40 | } |
Line 25... | Line 41... | ||
25 | QApplication App(argc, argv); |
41 | |
26 | 42 | App.installTranslator(&translator); |
|
Line 27... | Line 43... | ||
27 | dlg_Main *MainApp = new dlg_Main(); |
43 | dlg_Main *MainApp = new dlg_Main(); |
Line 28... | Line 44... | ||
28 | 44 | ||
29 | MainApp->set_ARGV(argv[0]); |
- | |
30 | MainApp->show(); |
45 | MainApp->set_ARGV(argv[0]); |
31 | 46 | MainApp->show(); |