diff -r a5fecba4b1e4 -r 7464c1e21dae deviceupdatesui/deviceupdates/src/main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/deviceupdatesui/deviceupdates/src/main.cpp Fri Mar 19 04:28:07 2010 +0530 @@ -0,0 +1,81 @@ +/* +* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Application entry. +* +*/ + +#include +#include +#include +#include +#include "nsmldmsyncprivatecrkeys.h" + +int main(int argc, char *argv[]) +{ + + HbApplication app(argc, argv); + //HbView* newview= new HbView(); + + QTranslator *translator = new QTranslator(); + QString lang = QLocale::system().name(); + qDebug("OMADM Loading qm file"); + qDebug()<load("deviceupdates_" + lang, path);/*finally required once localisation available*/ + bool fine = translator->load("deviceupdates_en.qm", path); + if(fine) + qApp->installTranslator(translator); + else + qDebug("omadm translator loading failed"); + + QTranslator *commontranslator = new QTranslator(); + + fine = commontranslator->load("common_" + lang + ".qm", path);/*finally required once localisation available*/ + //fine = commontranslator->load("common_en" , path); + if(fine) + qApp->installTranslator(translator); + else + qDebug("omadm common translator loading failed"); + + app.setApplicationName(hbTrId("txt_device_update_subhead_device_updates")); + + CRepository *cenrep = CRepository::NewL(KUidSmlSyncApp); + TInt val(0); + if(cenrep) + { + cenrep->Get(KNsmlDmUILaunch, val); + { + if(val==1) + { + QTranslator *tempTranslator = new QTranslator(); + QString lang = QLocale::system().name(); + tempTranslator->load("control_panel_" + lang, path); + qApp->installTranslator(tempTranslator); + app.setApplicationName(hbTrId("txt_applib_list_control_panel")); + val=0; + cenrep->Set(KNsmlDmUILaunch, val); + delete cenrep; + cenrep = NULL; + } + } + } + HbMainWindow window; + + DMFotaView* view = new DMFotaView(&window); + bool loadingok = view->addFotaView(); + + window.show(); + return app.exec(); +} +