devicemgmtdialogsplugin/src/syncmlconnectnotifier.cpp
changeset 42 aa33c2cb9a50
parent 30 d3981f4fe6a4
equal deleted inserted replaced
41:c742e1129640 42:aa33c2cb9a50
    23     iPtr = ptr;
    23     iPtr = ptr;
    24     qDebug("devicemanagementnotifierutils syncmlConnectNotifier");
    24     qDebug("devicemanagementnotifierutils syncmlConnectNotifier");
    25     QTranslator *translator = new QTranslator();
    25     QTranslator *translator = new QTranslator();
    26     QString lang = QLocale::system().name();
    26     QString lang = QLocale::system().name();
    27     QString path = "Z:/resource/qt/translations/";
    27     QString path = "Z:/resource/qt/translations/";
    28     bool fine = translator->load("deviceupdates_en.qm", path);
    28     bool fine = translator->load("deviceupdates_" + lang, path);
    29     if (fine)
    29     if (fine)
    30         qApp->installTranslator(translator);
    30         qApp->installTranslator(translator);
    31 
       
    32     QTranslator *commontranslator = new QTranslator();
    31     QTranslator *commontranslator = new QTranslator();
    33 
       
    34     fine = commontranslator->load("common_" + lang, path);
    32     fine = commontranslator->load("common_" + lang, path);
    35     if (fine)
    33     if (fine)
    36         qApp->installTranslator(commontranslator);   
    34         qApp->installTranslator(commontranslator);
    37     pDialog = NULL;
    35     pDialog = NULL;
    38     }
    36     }
    39 
    37 
    40 void syncmlConnectNotifier::launchDialog(const QVariantMap &parameters)
    38 void syncmlConnectNotifier::launchDialog(const QVariantMap &parameters)
    41     {    
    39     {    
    42     qDebug("devicemanagementnotifierutils syncmlConnectNotifier launchDialog");        
    40     qDebug("devicemanagementnotifierutils syncmlConnectNotifier launchDialog");        
    43     pDialog = new HbProgressDialog(HbProgressDialog::ProgressDialog);
    41     pDialog = new HbProgressDialog(HbProgressDialog::ProgressDialog);
    44        HbAction *action = new HbAction(pDialog->tr("Cancel"), pDialog);
    42        HbAction *action = new HbAction(hbTrId("txt_common_button_cancel"),
    45        pDialog->setText("Connecting");
    43        												 pDialog);
    46        pDialog->actions().at(0)->setText(pDialog->tr("Hide"));
    44        pDialog->setText(hbTrId("txt_device_update_info_connecting"));
       
    45        pDialog->actions().at(0)->setText(hbTrId("txt_common_button_hide"));
    47        pDialog->setMaximum(0);
    46        pDialog->setMaximum(0);
    48        pDialog->setMinimum(0);    
    47        pDialog->setMinimum(0);    
    49        pDialog->addAction(action);
    48        pDialog->addAction(action);
    50        pDialog->open(this, SLOT(buttonClicked(HbAction*)));
    49        pDialog->open(this, SLOT(buttonClicked(HbAction*)));
    51     qDebug("devicemanagementnotifierutils syncmlConnectNotifier launchDialog end");
    50     qDebug("devicemanagementnotifierutils syncmlConnectNotifier launchDialog end");