Subversion Repositories Projects

Rev

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>
-
 
22
#include <QDir>
20
#include <QtGui/QApplication>
23
 
Line 21... Line 24...
21
#include "Dialogs/dlg_Main.h"
24
#include "Dialogs/dlg_Main.h"
22
 
25
 
23
int main(int argc, char *argv[])
26
int main(int argc, char *argv[])
Line -... Line 27...
-
 
27
{
-
 
28
    QApplication App(argc, argv);
-
 
29
 
-
 
30
    QString locale = QLocale::system().name();
-
 
31
    qDebug() << "QMK-Scope_" << locale;
-
 
32
 
-
 
33
    // Enable translation service
-
 
34
    QTranslator translator;
-
 
35
 
-
 
36
    QDir dir(argv[0]);
-
 
37
    QString appPath = dir.canonicalPath().toAscii().append("_");
-
 
38
 
-
 
39
     if (!translator.load(QString(appPath).append(locale))) {
-
 
40
         qDebug() << "Error loading translation file: " << appPath << locale;
24
{
41
     }
Line 25... Line 42...
25
    QApplication App(argc, argv);
42
 
26
 
-
 
27
    dlg_Main *MainApp = new dlg_Main();
43
    App.installTranslator(&translator);
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();