mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-15 02:44:20 -05:00
87344de7d4
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1850 b45a01b8-16f6-495d-af2f-9b41ad6348cc
50 lines
985 B
C++
50 lines
985 B
C++
#include <QApplication>
|
|
#include <QTranslator>
|
|
#include <QLocale>
|
|
#include <QDebug>
|
|
//#include <QPlastiqueStyle>
|
|
|
|
|
|
#include "toplevel.h"
|
|
#include "common.h"
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QApplication app(argc,argv);
|
|
// app.setStyle(new QPlastiqueStyle);
|
|
|
|
qDebug()
|
|
<< "Your Locale:" << QLocale::system().name() << endl
|
|
<< "Prefix path:" << PREFIX;
|
|
|
|
// Qt translations
|
|
QTranslator qt_tr;
|
|
if(qt_tr.load("qt_" + QLocale::system().name()))
|
|
app.installTranslator(&qt_tr);
|
|
else
|
|
qDebug() << "Loading Qt translations failed.";
|
|
|
|
// App translations
|
|
QTranslator app_tr;
|
|
if(app_tr.load("kcheckers_" + QLocale::system().name(),
|
|
PREFIX"/share/kcheckers"))
|
|
app.installTranslator(&app_tr);
|
|
else
|
|
qDebug() << "Loading KCheckers translations failed.";
|
|
|
|
myTopLevel* top = new myTopLevel();
|
|
top->show();
|
|
|
|
// command line
|
|
if(app.argc()==2)
|
|
top->open(app.argv()[1]);
|
|
|
|
int exit = app.exec();
|
|
|
|
delete top;
|
|
return exit;
|
|
}
|
|
|
|
|