diff -r f54ebcfc1b80 -r afea38384506 radioapp/radioapplication/src/main.cpp --- a/radioapp/radioapplication/src/main.cpp Mon May 03 12:31:41 2010 +0300 +++ b/radioapp/radioapplication/src/main.cpp Fri May 14 15:52:32 2010 +0300 @@ -16,15 +16,18 @@ */ // System includes -#include -#include -#include +#include // User includes #include "radioapplication.h" #include "radiologger.h" -static const QString TRANSLATIONS_PATH_FORMAT = "%1:/resource/qt/translations/"; +// Constants +#ifdef BUILD_WIN32 + const char* TRANSLATIONS_FOLDER = ""; +#else + const char* TRANSLATIONS_FOLDER = "/resource/qt/translations/"; +#endif // BUILD_WIN32 /*! * Runs the application @@ -35,23 +38,11 @@ LOG_TIMESTAMP( "Tesla started" ); -#ifdef BUILD_WIN32 - QString path = "."; - QString localizedRadio = "fmradio_en_US.qm"; -#else - const QString localizedRadio = "fmradio_" + QLocale::system().name(); - QString path = QString( TRANSLATIONS_PATH_FORMAT ).arg( "C" ); - if ( !QFile::exists( path + localizedRadio ) ) { - path = QString( TRANSLATIONS_PATH_FORMAT ).arg( "Z" ); - } -#endif // BUILD_WIN32 - - QTranslator translator; - translator.load( localizedRadio, path ); - RadioApplication app( argc, argv ); - app.installTranslator( &translator ); - int returnValue = app.exec(); + + HbTranslator translator( TRANSLATIONS_FOLDER, "fmradio" ); // TODO: Rename exe to fmradio.exe to get rid of this + + const int returnValue = app.exec(); UNINSTALL_MESSAGE_HANDLER // Uninstalls the file tracer