source: src-qt4/pc-netmanager/src/NetworkManager/main.cpp @ 1620346

9.1-release9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3
Last change on this file since 1620346 was 1620346, checked in by Kris Moore <kris@…>, 17 months ago

Initial import of PC-BSD /current/ SVN repo

  • Property mode set to 100644
File size: 775 bytes
Line 
1#include <qtranslator.h>
2#include <qlocale.h>
3#include <QDebug>
4#include <QFile>
5#include <QApplication>
6#include "networkman.h"
7#include "../../../config.h"
8
9int main( int argc, char ** argv )
10{
11    QApplication a(argc, argv);
12
13    QTranslator translator;
14    QLocale mylocale;
15    QString langCode = mylocale.name();
16    if ( ! QFile::exists(PREFIX + "/share/pcbsd/i18n/NetworkManager_" + langCode + ".qm" ) )
17      langCode.truncate(langCode.indexOf("_"));
18    translator.load( QString("NetworkManager_") + langCode, PREFIX + "/share/pcbsd/i18n/" );
19    a.installTranslator( &translator );
20    qDebug() << "Locale:" << langCode;
21
22    NetworkMan w;
23
24    w.Init();
25
26    w.show();
27    a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
28    return a.exec();
29}
Note: See TracBrowser for help on using the repository browser.