1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0"" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <cpsettingformentryitemdataimpl.h> |
|
19 |
|
20 #include "cpcertpluginloader.h" |
|
21 #include "cpsecurityview.h" |
|
22 #include <hbapplication.h> |
|
23 #include <../../inc/cpsecplugins.h> |
|
24 |
|
25 CpCertPluginLoader::CpCertPluginLoader() |
|
26 { |
|
27 RDEBUG("0", 0); |
|
28 mTranslator = q_check_ptr( new QTranslator()); |
|
29 QString path = "z:/resource/qt/translations/"; |
|
30 QString appName = "certificate_manager_"; |
|
31 QString lang = QLocale::system().name(); |
|
32 mTranslator->load(path + appName + lang); |
|
33 qApp->installTranslator(mTranslator); |
|
34 } |
|
35 |
|
36 CpCertPluginLoader::~CpCertPluginLoader() |
|
37 { |
|
38 if (mTranslator) |
|
39 { |
|
40 if (mTranslator->isEmpty() == false) |
|
41 qApp->removeTranslator(mTranslator); |
|
42 delete mTranslator; |
|
43 } |
|
44 } |
|
45 |
|
46 QList<CpSettingFormItemData*> CpCertPluginLoader::createSettingFormItemData(CpItemDataHelper &itemDataHelper) const |
|
47 { |
|
48 RDEBUG("0", 0); |
|
49 return QList<CpSettingFormItemData*>() |
|
50 << new CpSettingFormEntryItemDataImpl<CpSecurityView>(itemDataHelper,tr("Advanced Security"), QString()); |
|
51 } |
|
52 |
|
53 Q_EXPORT_PLUGIN2(cpcertpluginloader, CpCertPluginLoader); |
|