controlpanelui/src/cpserviceprovider/src/main.cpp
changeset 17 4a9568303383
parent 14 23411a3be0db
child 22 a5692c68d772
equal deleted inserted replaced
15:cc79acdc26cb 17:4a9568303383
    15 *
    15 *
    16 */
    16 */
    17 #include <hbapplication.h>
    17 #include <hbapplication.h>
    18 #include <hbstyleloader.h>
    18 #include <hbstyleloader.h>
    19 #include <QDir>
    19 #include <QDir>
       
    20 #include <QTranslator>
       
    21 #include <QLocale>
    20 #include <cpbasepath.h>
    22 #include <cpbasepath.h>
    21 #include "cpservicemainwindow.h"
    23 #include "cpservicemainwindow.h"
    22 #include "cpsplogger.h"
    24 #include "cpsplogger.h"
    23 
    25 
    24 int main(int argc, char **argv)
    26 int main(int argc, char **argv)
    26     HbApplication app(argc,argv ); 
    28     HbApplication app(argc,argv ); 
    27     
    29     
    28     Logger::instance(CPSP_LOGGER_NAME)->configure(
    30     Logger::instance(CPSP_LOGGER_NAME)->configure(
    29             CPSP_LOGGER_CONFIG_PATH,QSettings::IniFormat);
    31             CPSP_LOGGER_CONFIG_PATH,QSettings::IniFormat);
    30     CPSP_LOG("Entering CpServiceProvider.exe...");
    32     CPSP_LOG("Entering CpServiceProvider.exe...");
       
    33     
       
    34     QTranslator translator;
       
    35     if (translator.load("control_panel_" + QLocale::system().name(),"Z:/resource/qt/translations"))
       
    36     {
       
    37         qApp->installTranslator(&translator);
       
    38     }
    31     
    39     
    32     HbStyleLoader::registerFilePath(CP_RESOURCE_PATH + QDir::separator() + WIDGETML_SUB_PATH);
    40     HbStyleLoader::registerFilePath(CP_RESOURCE_PATH + QDir::separator() + WIDGETML_SUB_PATH);
    33     
    41     
    34     CpServiceMainWindow wnd;
    42     CpServiceMainWindow wnd;
    35     wnd.show();
    43     wnd.show();