1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
9 * Copyright (C) 2007 by Dominik Riebeling
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
26 Q_IMPORT_PLUGIN(qtaccessiblewidgets
)
29 int main( int argc
, char ** argv
) {
30 QApplication
app( argc
, argv
);
32 QString absolutePath
= qApp
->applicationDirPath();
33 // portable installation:
34 // check for a configuration file in the program folder.
36 if(QFileInfo(absolutePath
+ "/RockboxUtility.ini").isFile())
37 user
= new QSettings(absolutePath
+ "/RockboxUtility.ini", QSettings::IniFormat
, 0);
38 else user
= new QSettings(QSettings::IniFormat
, QSettings::UserScope
, "rockbox.org", "RockboxUtility");
40 QTranslator translator
;
42 if(!user
->value("lang", "").toString().isEmpty()) {
43 if(!translator
.load("rbutil_" + user
->value("lang").toString(), absolutePath
))
44 translator
.load("rbutil_" + user
->value("lang").toString(), ":/lang");
45 QLocale::setDefault(user
->value("lang").toString());
48 app
.installTranslator(&translator
);
53 // app.connect( &app, SIGNAL(lastWindowClosed()), &app, SLOT(quit()) );