mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
added for plugins own dir
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1850 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
97d8640f3a
commit
87344de7d4
809 changed files with 790 additions and 722 deletions
49
plugins/qcheckers_plugin/main.cc
Normal file
49
plugins/qcheckers_plugin/main.cc
Normal file
|
@ -0,0 +1,49 @@
|
|||
#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;
|
||||
}
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue