Changeset 846 for trunk/tools/qtconfig/main.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/tools/qtconfig/main.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 43 43 #include "mainwindow.h" 44 44 #include <QApplication> 45 #include <QLibraryInfo> 46 #include <QLocale> 47 #include <QTranslator> 45 48 46 49 QT_USE_NAMESPACE … … 51 54 52 55 QApplication app(argc, argv); 56 57 QTranslator translator; 58 QTranslator qtTranslator; 59 QString sysLocale = QLocale::system().name(); 60 QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath); 61 if (translator.load(QLatin1String("qtconfig_") + sysLocale, resourceDir) 62 && qtTranslator.load(QLatin1String("qt_") + sysLocale, resourceDir)) { 63 app.installTranslator(&translator); 64 app.installTranslator(&qtTranslator); 65 } 66 53 67 MainWindow mw; 54 68 mw.show();
Note:
See TracChangeset
for help on using the changeset viewer.