author | hgs |
Thu, 08 Jul 2010 20:04:36 +0300 | |
changeset 35 | f1030a78d563 |
parent 30 | cc1cea6aabaf |
child 42 | 82671cd8994b |
permissions | -rw-r--r-- |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
14 |
* Description: SecUi notification plugin class. |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
* |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
|
30 | 18 |
#include "secuinotificationdebug.h" |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
#include "secuinotificationdialog.h" |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
#include "secuinotificationdialogpluginkeys.h" |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
#include "secuinotificationcontentwidget.h" |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
// #include <hbpopupbase.h> // HbPopupBase::NoTimeout |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
23 |
#include <hblabel.h> |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
24 |
#include <hbaction.h> |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
25 |
#include <QDebug> |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
26 |
#include <e32debug.h> |
35 | 27 |
#include <hbtranslator.h> |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
28 |
#include <cphcltemergencycall.h> |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
29 |
#include <SCPServerInterface.h> // for TARM error codes while validating new lock code |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
30 |
#include <QString> |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
31 |
#include <QDialogButtonBox> |
30 | 32 |
#include <HbEditorInterface> |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
33 |
#include <e32property.h> |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
34 |
|
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
35 |
QTM_USE_NAMESPACE |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
36 |
|
35 | 37 |
const QString KTranslationsPath = "/resource/qt/translations/"; |
38 |
const QString KSecUiNotificationTranslationsFile = "secui"; |
|
39 |
const QString KCommonTranslationsFile = "common"; |
|
40 |
||
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
41 |
#include <qvaluespacesubscriber.h> |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
42 |
#include <qvaluespacepublisher.h> |
30 | 43 |
#define ESecUiBasicTypeText 0x0000000 |
44 |
#define ESecUiBasicTypeCheck 0x0010000 |
|
45 |
#define ESecUiBasicTypeCheckMulti 0x0020000 |
|
46 |
#define ESecUiBasicTypeMask 0x00F0000 |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
47 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
48 |
#define ESecUiCancelSupported 0x1000000 |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
49 |
#define ESecUiCancelNotSupported 0x0000000 |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
50 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
51 |
#define ESecUiEmergencySupported 0x2000000 |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
52 |
#define ESecUiEmergencyNotSupported 0x0000000 |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
53 |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
54 |
#define ESecUiAlphaSupported 0x4000000 |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
55 |
#define ESecUiAlphaNotSupported 0x0000000 |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
56 |
|
19
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
57 |
#define ESecUiSecretSupported 0x8000000 |
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
58 |
#define ESecUiSecretNotSupported 0x0000000 |
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
59 |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
60 |
#define ESecUiMaskFlags 0xFF000000 |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
61 |
#define ESecUiMaskType 0x00FFFFFF |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
62 |
|
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
63 |
#define ESecUiTypeDeviceLock 0x00100000 |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
64 |
#define ESecUiTypeKeyguard 0x00200000 |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
65 |
#define ESecUiTypeClock 0x00300000 |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
66 |
#define ESecUiTypeScreensaver 0x00400000 |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
67 |
|
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
68 |
#define ESecUiTypeMaskLock 0x00F00000 |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
69 |
|
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
70 |
const TUid KPSUidSecurityUIs = { 0x100059b5 }; |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
71 |
const TUint32 KSecurityUIsDismissDialog = 0x00000309; |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
72 |
|
30 | 73 |
enum TSecurityUIsDismissDialogValues |
74 |
{ |
|
75 |
ESecurityUIsDismissDialogUninitialized = 0, |
|
76 |
ESecurityUIsDismissDialogOn, |
|
77 |
ESecurityUIsDismissDialogProcessing, |
|
78 |
ESecurityUIsDismissDialogDone, |
|
79 |
ESecurityUIsDismissDialogLastValue |
|
80 |
}; |
|
81 |
||
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
82 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
83 |
// SecUiNotificationDialog::SecUiNotificationDialog() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
84 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
85 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
86 |
SecUiNotificationDialog::SecUiNotificationDialog( |
35 | 87 |
const QVariantMap ¶meters) : HbDialog(), mCommonTranslator(0), mSecUiNotificationTranslator(0), mLastError(KNoError) |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
88 |
{ |
30 | 89 |
RDEBUG("0", 0); |
90 |
TTime myTime; |
|
91 |
myTime.HomeTime(); |
|
92 |
mMyId = I64LOW( myTime.Int64() ); |
|
35 | 93 |
mCommonTranslator = new HbTranslator(KTranslationsPath, KCommonTranslationsFile); |
94 |
mSecUiNotificationTranslator = new HbTranslator(KTranslationsPath, KSecUiNotificationTranslationsFile); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
95 |
constructDialog(parameters); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
96 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
97 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
98 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
99 |
// SecUiNotificationDialog::~SecUiNotificationDialog() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
100 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
101 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
102 |
SecUiNotificationDialog::~SecUiNotificationDialog() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
103 |
{ |
35 | 104 |
RDEBUG("0", 0); |
105 |
delete mSecUiNotificationTranslator; |
|
106 |
delete mCommonTranslator; |
|
107 |
RDEBUG("0", 0); |
|
108 |
// TODO what about subscriberKSecurityUIsDismissDialog |
|
109 |
// and codeTop |
|
110 |
RDEBUG("1", 1); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
111 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
112 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
113 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
114 |
// SecUiNotificationDialog::setDeviceDialogParameters() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
115 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
116 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
117 |
bool SecUiNotificationDialog::setDeviceDialogParameters(const QVariantMap ¶meters) |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
118 |
{ |
30 | 119 |
RDEBUG("0", 0); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
120 |
return constructDialog(parameters); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
121 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
122 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
123 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
124 |
// SecUiNotificationDialog::deviceDialogError() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
125 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
126 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
127 |
int SecUiNotificationDialog::deviceDialogError() const |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
128 |
{ |
30 | 129 |
RDEBUG("mLastError", mLastError); |
130 |
RDEBUG("mMyId", mMyId); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
131 |
return mLastError; |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
132 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
133 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
134 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
135 |
// SecUiNotificationDialog::closeDeviceDialog |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
136 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
137 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
138 |
void SecUiNotificationDialog::closeDeviceDialog(bool byClient) |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
139 |
{ |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
140 |
Q_UNUSED(byClient); |
30 | 141 |
RDEBUG("mMyId", mMyId); |
142 |
RDEBUG("calling close()", 0); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
143 |
close(); |
30 | 144 |
RDEBUG("mShowEventReceived", mShowEventReceived); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
145 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
146 |
// If show event has been received, close is signalled from hide event. |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
147 |
// If not, hide event does not come and close is signalled from here. |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
148 |
if (!mShowEventReceived) { |
30 | 149 |
RDEBUG("emitting deviceDialogClosed", 0); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
150 |
emit deviceDialogClosed(); |
30 | 151 |
if(1==0 && subscriberKSecurityUIsDismissDialog) |
152 |
{ |
|
153 |
RDEBUG("disconnect subscriberKSecurityUIsDismissDialog", 0); |
|
154 |
disconnect(subscriberKSecurityUIsDismissDialog, SIGNAL(contentsChanged()), this, SLOT(subscriberKSecurityUIsDismissDialogChanged())); |
|
155 |
RDEBUG("disconnected subscriberKSecurityUIsDismissDialog", 1); |
|
156 |
if(1==1) |
|
157 |
{ |
|
158 |
RDEBUG("deleting subscriberKSecurityUIsDismissDialog", 0); |
|
159 |
delete subscriberKSecurityUIsDismissDialog; |
|
160 |
subscriberKSecurityUIsDismissDialog = NULL; |
|
161 |
RDEBUG("deleted subscriberKSecurityUIsDismissDialog", 1); |
|
162 |
} |
|
163 |
} |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
164 |
} |
30 | 165 |
RDEBUG("0", 0); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
166 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
167 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
168 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
169 |
// SecUiNotificationDialog::deviceDialogWidget |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
170 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
171 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
172 |
HbDialog *SecUiNotificationDialog::deviceDialogWidget() const |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
173 |
{ |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
174 |
return const_cast<SecUiNotificationDialog*>(this); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
175 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
176 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
177 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
178 |
// SecUiNotificationDialog::hideEvent |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
179 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
180 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
181 |
void SecUiNotificationDialog::hideEvent(QHideEvent *event) |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
182 |
{ |
30 | 183 |
RDEBUG("0", 0); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
184 |
HbDialog::hideEvent(event); |
30 | 185 |
RDEBUG("mMyId", mMyId); |
186 |
RDEBUG("calling close()", 0); |
|
187 |
close(); |
|
188 |
RDEBUG("emitting deviceDialogClosed", 0); |
|
189 |
emit deviceDialogClosed(); |
|
190 |
RDEBUG("deviceDialogClosed", 1); |
|
191 |
if(1==0 && subscriberKSecurityUIsDismissDialog) |
|
192 |
{ |
|
193 |
RDEBUG("disconnect subscriberKSecurityUIsDismissDialog", 0); |
|
194 |
disconnect(subscriberKSecurityUIsDismissDialog, SIGNAL(contentsChanged()), this, SLOT(subscriberKSecurityUIsDismissDialogChanged())); |
|
195 |
RDEBUG("disconnected subscriberKSecurityUIsDismissDialog", 1); |
|
196 |
if(1==1) |
|
197 |
{ |
|
198 |
RDEBUG("deleting subscriberKSecurityUIsDismissDialog", 0); |
|
199 |
delete subscriberKSecurityUIsDismissDialog; |
|
200 |
subscriberKSecurityUIsDismissDialog = NULL; |
|
201 |
RDEBUG("deleted subscriberKSecurityUIsDismissDialog", 1); |
|
202 |
} |
|
203 |
} |
|
204 |
// old method was emit deviceDialogClosed(); |
|
205 |
RDEBUG("0", 0); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
206 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
207 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
208 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
209 |
// SecUiNotificationDialog::showEvent |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
210 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
211 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
212 |
void SecUiNotificationDialog::showEvent(QShowEvent *event) |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
213 |
{ |
30 | 214 |
RDEBUG("0", 0); |
215 |
RDEBUG("mMyId", mMyId); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
216 |
HbDialog::showEvent(event); |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
217 |
|
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
218 |
if(!(queryType & ESecUiTypeMaskLock)) |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
219 |
{ // not for the "lock icon" |
30 | 220 |
RDEBUG("check default.1", 0); |
221 |
if(codeTop!=NULL) |
|
222 |
{ |
|
223 |
RDEBUG("check default.2", 0); |
|
224 |
if(codeTop->text().length()>0) // there's a default value. Verify it and (might) enable OK |
|
225 |
{ |
|
226 |
RDEBUG("check default.3", 0); |
|
227 |
handleCodeTopChanged(codeTop->text()); |
|
228 |
} |
|
229 |
RDEBUG("setFocus", 0); |
|
230 |
codeTop->setFocus(); // this should open the VKB . Doesn't seem to work when it's done on the widget, so it's done here. |
|
231 |
} // codeTop!=NULL |
|
232 |
||
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
233 |
const TUint32 KSecurityUIsTestCode = 0x00000307; |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
234 |
TInt value = 0; |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
235 |
TInt err = RProperty::Get(KPSUidSecurityUIs, KSecurityUIsTestCode, value ); |
30 | 236 |
RDEBUG("KSecurityUIsTestCode err", err); |
237 |
RDEBUG("faking value", value); |
|
238 |
RDEBUG("mShowEventReceived", mShowEventReceived); |
|
35 | 239 |
if(value>0 && value<1000000 && mShowEventReceived==true) // show happens 2 times. Dialog can be closed only the second. |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
240 |
{ |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
241 |
QString myString = ""; |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
242 |
myString += QString("%1").arg(value); |
35 | 243 |
RDEBUGQT("myString", myString); |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
244 |
codeTop->setText( myString ); |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
245 |
TInt err = RProperty::Set(KPSUidSecurityUIs, KSecurityUIsTestCode, 0 ); // clear after using it |
35 | 246 |
RDEBUGQT("calling handleAccepted myString", myString); |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
247 |
emit handleAccepted(); |
30 | 248 |
// handleAccepted already emit closeDeviceDialog(false); // false means "not by client", although it's not really used |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
249 |
} |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
250 |
} |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
251 |
mShowEventReceived = true; |
30 | 252 |
RDEBUG("1", 1); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
253 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
254 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
255 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
256 |
// SecUiNotificationDialog::constructDialog() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
257 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
258 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
259 |
bool SecUiNotificationDialog::constructDialog(const QVariantMap ¶meters) |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
260 |
{ |
30 | 261 |
RDEBUG("0", 0); |
262 |
RDEBUG("mMyId", mMyId); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
263 |
setTimeout(HbPopup::NoTimeout); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
264 |
setDismissPolicy(HbPopup::NoDismiss); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
265 |
setModal(true); |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
266 |
mShowEventReceived = false; |
30 | 267 |
subscriberKSecurityUIsDismissDialog = NULL; |
268 |
titleWidget = NULL; |
|
269 |
RDEBUG("subscriberKSecurityUIsDismissDialog NULL", 0); |
|
270 |
||
271 |
subscriberKSecurityUIsDismissDialog = new QValueSpaceSubscriber("/KPSUidSecurityUIs/KSecurityUIsDismissDialog", this); |
|
272 |
if(subscriberKSecurityUIsDismissDialog) |
|
273 |
{ |
|
274 |
RDEBUG("subscriberKSecurityUIsDismissDialog created", 1); |
|
275 |
} |
|
276 |
else |
|
277 |
{ |
|
278 |
RDEBUG("subscriberKSecurityUIsDismissDialog not created", 0); |
|
279 |
} |
|
280 |
connect(subscriberKSecurityUIsDismissDialog, SIGNAL(contentsChanged()), this, SLOT(subscriberKSecurityUIsDismissDialogChanged())); |
|
281 |
RDEBUG("subscriberKSecurityUIsDismissDialog", 1); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
282 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
283 |
// Title |
30 | 284 |
// this is also done later in the widget |
285 |
// For now, it only says "Security" |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
286 |
if (parameters.contains(KDialogTitle)) { |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
287 |
QString titleText = parameters.value(KDialogTitle).toString(); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
288 |
QString titleAttempts = ""; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
289 |
if(titleText.indexOf('|')>0) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
290 |
{ // if separator, take only first part |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
291 |
titleText = titleText.left(titleText.indexOf('|')); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
292 |
} |
35 | 293 |
if(titleText.indexOf('$')>0) |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
294 |
{ // if separator, take only first part |
35 | 295 |
titleAttempts = titleText.right(titleText.length()-titleText.indexOf('$')-1); |
296 |
RDEBUGQT("titleAttempts", titleAttempts); |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
297 |
int nAttempts = titleAttempts.toInt(); |
30 | 298 |
RDEBUG("nAttempts", nAttempts); |
35 | 299 |
titleText = titleText.left(titleText.indexOf('$')); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
300 |
if(nAttempts>0) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
301 |
titleText = titleText + " attempts=" + QString::number(nAttempts); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
302 |
} |
35 | 303 |
titleText = hbTrId("Security Query"); // this is the header, for any potential later error which needs to be displayed |
30 | 304 |
// This is created only if needed (i.e. errors for NewLockCode) |
305 |
// titleWidget = new HbLabel(titleText); |
|
306 |
// setHeadingWidget(titleWidget); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
307 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
308 |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
309 |
if (parameters.contains(KEmergency)) { |
30 | 310 |
RDEBUG("KEmergency", 1); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
311 |
QString emergencyText = parameters.value(KEmergency).toString(); |
35 | 312 |
RDEBUGQT("emergencyText", emergencyText); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
313 |
if(!emergencyText.compare("emergencyYes")) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
314 |
{ |
30 | 315 |
RDEBUG("emergencyYes", 1); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
316 |
isEmergency = 1; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
317 |
okAction->setEnabled(true); |
35 | 318 |
okAction->setText(hbTrId("Call")); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
319 |
return true; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
320 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
321 |
if(!emergencyText.compare("emergencyNo")) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
322 |
{ |
30 | 323 |
RDEBUG("emergencyNo", 1); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
324 |
isEmergency = 0; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
325 |
okAction->setEnabled(false); // 112 -> 1122 (=password) . This is handled by < lMinLength |
35 | 326 |
okAction->setText(hbTrId("Ok")); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
327 |
return true; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
328 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
329 |
} |
26
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
330 |
// after TARM validation. |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
331 |
if (parameters.contains(KInvalidNewLockCode)) { |
30 | 332 |
RDEBUG("KInvalidNewLockCode", 0); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
333 |
QString invalidText = parameters.value(KInvalidNewLockCode).toString(); |
35 | 334 |
RDEBUGQT("invalidText", invalidText); |
30 | 335 |
QString newTitleText = "Lock Code"; // TODO take from the original one |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
336 |
|
35 | 337 |
QString invalidStr = invalidText.right(invalidText.length()-invalidText.indexOf('$')-1); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
338 |
int invalidNumber = invalidStr.toInt(); |
30 | 339 |
RDEBUG("invalidNumber", invalidNumber); |
35 | 340 |
if(invalidNumber<0) // that is, -1 |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
341 |
{ |
30 | 342 |
RDEBUG("invalidNumber<0", invalidNumber ); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
343 |
// nothing to do |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
344 |
} |
30 | 345 |
if(invalidNumber==EDeviceLockAutolockperiod) |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
346 |
{ |
30 | 347 |
RDEBUG("EDeviceLockAutolockperiod", invalidNumber ); |
35 | 348 |
newTitleText+=hbTrId("EDeviceLockAutolockperiod"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
349 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
350 |
if(invalidNumber==EDeviceLockMaxAutolockPeriod) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
351 |
{ |
30 | 352 |
RDEBUG("EDeviceLockAutolockperiod", invalidNumber ); |
35 | 353 |
newTitleText+=hbTrId("EDeviceLockMaxAutolockPeriod"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
354 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
355 |
if(invalidNumber==EDeviceLockMinlength) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
356 |
{ |
30 | 357 |
RDEBUG("EDeviceLockMinlength", invalidNumber ); |
35 | 358 |
newTitleText+=hbTrId("EDeviceLockMinlength"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
359 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
360 |
if(invalidNumber==EDeviceLockMaxlength) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
361 |
{ |
30 | 362 |
RDEBUG("EDeviceLockMaxlength", invalidNumber ); |
35 | 363 |
newTitleText+=hbTrId("EDeviceLockMaxlength"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
364 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
365 |
if(invalidNumber==EDeviceLockRequireUpperAndLower) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
366 |
{ |
30 | 367 |
RDEBUG("EDeviceLockRequireUpperAndLower", invalidNumber ); |
35 | 368 |
newTitleText+=hbTrId("EDeviceLockRequireUpperAndLower"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
369 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
370 |
if(invalidNumber==EDeviceLockRequireCharsAndNumbers) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
371 |
{ |
30 | 372 |
RDEBUG("EDeviceLockMaxlength", invalidNumber ); |
35 | 373 |
newTitleText+=hbTrId("EDeviceLockMaxlength"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
374 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
375 |
if(invalidNumber==EDeviceLockAllowedMaxRepeatedChars) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
376 |
{ |
30 | 377 |
RDEBUG("EDeviceLockAllowedMaxRepeatedChars", invalidNumber ); |
35 | 378 |
newTitleText+=hbTrId("EDeviceLockAllowedMaxRepeatedChars"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
379 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
380 |
if(invalidNumber==EDeviceLockHistoryBuffer) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
381 |
{ |
30 | 382 |
RDEBUG("EDeviceLockHistoryBuffer", invalidNumber ); |
35 | 383 |
newTitleText+=hbTrId("EDeviceLockHistoryBuffer"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
384 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
385 |
if(invalidNumber==EDeviceLockPasscodeExpiration) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
386 |
{ |
30 | 387 |
RDEBUG("EDeviceLockPasscodeExpiration", invalidNumber ); |
35 | 388 |
newTitleText+=hbTrId("EDeviceLockPasscodeExpiration"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
389 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
390 |
if(invalidNumber==EDeviceLockMinChangeTolerance) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
391 |
{ |
30 | 392 |
RDEBUG("EDeviceLockMinChangeTolerance", invalidNumber ); |
35 | 393 |
newTitleText+=hbTrId("EDeviceLockMinChangeTolerance"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
394 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
395 |
if(invalidNumber==EDeviceLockMinChangeInterval) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
396 |
{ |
30 | 397 |
RDEBUG("EDeviceLockMinChangeInterval", invalidNumber ); |
35 | 398 |
newTitleText+=hbTrId("EDeviceLockMinChangeInterval"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
399 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
400 |
if(invalidNumber==EDeviceLockDisallowSpecificStrings) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
401 |
{ |
30 | 402 |
RDEBUG("EDeviceLockDisallowSpecificStrings", invalidNumber ); |
35 | 403 |
newTitleText+=hbTrId("EDeviceLockDisallowSpecificStrings"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
404 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
405 |
if(invalidNumber==EDeviceLockAllowedMaxAtempts) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
406 |
{ |
30 | 407 |
RDEBUG("EDeviceLockAllowedMaxAtempts", invalidNumber ); |
35 | 408 |
newTitleText+=hbTrId("EDeviceLockAllowedMaxAtempts"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
409 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
410 |
if(invalidNumber==EDeviceLockConsecutiveNumbers) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
411 |
{ |
30 | 412 |
RDEBUG("EDeviceLockConsecutiveNumbers", invalidNumber ); |
35 | 413 |
newTitleText+=hbTrId("EDeviceLockConsecutiveNumbers"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
414 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
415 |
if(invalidNumber==EDeviceLockMinSpecialCharacters) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
416 |
{ |
30 | 417 |
RDEBUG("EDeviceLockMinSpecialCharacters", invalidNumber ); |
35 | 418 |
newTitleText+=hbTrId("EDeviceLockMinSpecialCharacters"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
419 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
420 |
if(invalidNumber==EDeviceLockSingleCharRepeatNotAllowed) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
421 |
{ |
30 | 422 |
RDEBUG("EDeviceLockSingleCharRepeatNotAllowed", invalidNumber ); |
35 | 423 |
newTitleText+=hbTrId("EDeviceLockSingleCharRepeatNotAllowed"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
424 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
425 |
if(invalidNumber==EDevicelockConsecutiveCharsNotAllowed) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
426 |
{ |
30 | 427 |
RDEBUG("EDevicelockConsecutiveCharsNotAllowed", invalidNumber ); |
35 | 428 |
newTitleText+=hbTrId("EDevicelockConsecutiveCharsNotAllowed"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
429 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
430 |
if(invalidNumber>=EDevicelockTotalPolicies) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
431 |
{ |
30 | 432 |
RDEBUG("EDevicelockTotalPolicies", invalidNumber ); |
35 | 433 |
newTitleText+=hbTrId("EDevicelockTotalPolicies"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
434 |
} |
30 | 435 |
if( !titleWidget ) |
436 |
{ |
|
437 |
RDEBUG("creating titleWidget", 0 ); |
|
35 | 438 |
titleWidget = new HbLabel(hbTrId("New lock code")); // it will be changed later |
30 | 439 |
setHeadingWidget(titleWidget); |
440 |
} |
|
441 |
RDEBUG("setPlainText", 0 ); |
|
442 |
titleWidget->setPlainText(newTitleText); |
|
443 |
||
26
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
444 |
if(invalidNumber<0) // everything is ok |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
445 |
{ |
30 | 446 |
okAction->setEnabled(true); // this might fail in the scenario: check this : invalid -> valid. This allows verif ? |
35 | 447 |
okAction->setText(hbTrId("Ok")); |
26
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
448 |
codeBottom->setEnabled(true); |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
449 |
} |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
450 |
else |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
451 |
{ |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
452 |
okAction->setEnabled(false); |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
453 |
codeBottom->setEnabled(false); |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
454 |
codeBottom->setText(""); |
35 | 455 |
okAction->setText(hbTrId("Ok")); |
26
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
456 |
} |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
457 |
// need to return because all objects are already created |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
458 |
return true; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
459 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
460 |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
461 |
// Content |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
462 |
SecUiNotificationContentWidget *content = new SecUiNotificationContentWidget(); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
463 |
content->constructFromParameters(parameters); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
464 |
setContentWidget(content); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
465 |
|
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
466 |
queryType = content->queryType; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
467 |
queryDual = content->queryDual; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
468 |
isEmergency = content->isEmergency; |
30 | 469 |
codeTop=NULL; |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
470 |
codeTop = content->codeTop; |
30 | 471 |
checkBox = content->checkbox; |
472 |
listWidget = content->listWidget; |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
473 |
codeBottom = content->codeBottom; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
474 |
lMinLength = content->lMinLength; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
475 |
lMaxLength = content->lMaxLength; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
476 |
lEmergencySupported = content->lEmergencySupported; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
477 |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
478 |
connect(content, SIGNAL(codeTopChanged(const QString &)), this, SLOT(handleCodeTopChanged(const QString &))); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
479 |
connect(content, SIGNAL(codeBottomChanged(const QString &)), this, SLOT(handleCodeBottomChanged(const QString &))); |
19
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
480 |
connect(content, SIGNAL(codeTopContentChanged()), this, SLOT(handleCodeTopContentChanged())); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
481 |
connect(content, SIGNAL(but1Changed()), this, SLOT(handlebut1Changed())); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
482 |
connect(content, SIGNAL(but2Changed()), this, SLOT(handlebut2Changed())); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
483 |
connect(content, SIGNAL(but3Changed()), this, SLOT(handlebut3Changed())); |
30 | 484 |
RDEBUG("queryType", queryType); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
485 |
// Buttons |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
486 |
if( (queryType & ESecUiTypeMaskLock)) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
487 |
{ |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
488 |
// no need to create OK or Cancel |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
489 |
return true; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
490 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
491 |
|
35 | 492 |
okAction = new HbAction(hbTrId("Ok")); |
30 | 493 |
RDEBUG("created HbAction okAction", 1); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
494 |
okAction->setEnabled(false); // initially the OK is disabled because codeTop is empty |
30 | 495 |
if((queryType & ESecUiBasicTypeMask) ==ESecUiBasicTypeCheck) { |
496 |
okAction->setEnabled(true); |
|
497 |
setHeadingWidget(0); // had to remove this no multiline |
|
498 |
} |
|
499 |
else if ((queryType & ESecUiBasicTypeMask) ==ESecUiBasicTypeCheckMulti){ |
|
500 |
okAction->setEnabled(true); |
|
501 |
} |
|
502 |
||
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
503 |
// setAction(okAction, QDialogButtonBox::AcceptRole); // it's supposed to use this, when deprecated |
30 | 504 |
// setPrimaryAction(okAction); |
505 |
addAction(okAction); |
|
506 |
disconnect(okAction, SIGNAL(triggered()), this, SLOT(close())); // the close will be done in handleAccepted |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
507 |
connect(okAction, SIGNAL(triggered()), this, SLOT(handleAccepted())); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
508 |
|
35 | 509 |
cancelAction = new HbAction(hbTrId("Cancel")); // qtTrId("txt_common_button_cancel") |
30 | 510 |
addAction(cancelAction); |
511 |
disconnect(cancelAction, SIGNAL(triggered()), this, SLOT(close())); // the close will be done in handleCancelled |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
512 |
connect(cancelAction, SIGNAL(triggered()), this, SLOT(handleCancelled())); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
513 |
// setAction(cancelAction, QDialogButtonBox::RejectRole); // it's supposed to use this, when deprecated |
30 | 514 |
// setSecondaryAction(cancelAction); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
515 |
|
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
516 |
// this should had been set by Autolock, but just to be sure |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
517 |
TInt ret = RProperty::Define(KPSUidSecurityUIs, KSecurityUIsDismissDialog, |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
518 |
RProperty::EInt, TSecurityPolicy(TSecurityPolicy::EAlwaysPass), |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
519 |
TSecurityPolicy(TSecurityPolicy::EAlwaysPass)); |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
520 |
RDEBUG("defined KSecurityUIsDismissDialog", ret); |
30 | 521 |
TInt aDismissDialog = -1; |
522 |
ret = RProperty::Get(KPSUidSecurityUIs, KSecurityUIsDismissDialog, aDismissDialog ); |
|
523 |
RDEBUG("ret", ret); |
|
524 |
RDEBUG("aDismissDialog", aDismissDialog); |
|
525 |
if(aDismissDialog==ESecurityUIsDismissDialogOn || aDismissDialog==ESecurityUIsDismissDialogProcessing) |
|
526 |
{ |
|
527 |
RDebug::Printf( "potential error: %s %s (%u) aDismissDialog=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, aDismissDialog ); |
|
528 |
} |
|
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
529 |
|
30 | 530 |
RDEBUG("check cancel", 0); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
531 |
if ((queryType & ESecUiCancelSupported)==ESecUiCancelSupported) |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
532 |
{ |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
533 |
// nothing to do. Cancel is enabled by default |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
534 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
535 |
else |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
536 |
{ |
30 | 537 |
RDEBUG("disable Cancel", 1); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
538 |
cancelAction->setEnabled(false); |
30 | 539 |
cancelAction->setText(""); |
540 |
cancelAction->setVisible(false); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
541 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
542 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
543 |
return true; |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
544 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
545 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
546 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
547 |
// SecUiNotificationDialog::sendResult() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
548 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
549 |
// |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
550 |
void SecUiNotificationDialog::sendResult(int accepted) |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
551 |
{ |
30 | 552 |
RDEBUG("0", 0); |
553 |
RDEBUG("mMyId", mMyId); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
554 |
QVariant acceptedValue(accepted); |
30 | 555 |
RDEBUG("0", 0); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
556 |
mResultMap.insert(KResultAccepted, acceptedValue); |
30 | 557 |
RDEBUG("0", 0); |
35 | 558 |
RDEBUGQT("mResultMap", mResultMap); |
30 | 559 |
RDEBUG("queryType", queryType); |
560 |
if(!(queryType & ESecUiTypeMaskLock)) |
|
561 |
{ // the lock-icon should not reply |
|
562 |
RDEBUG("emit deviceDialogData", 0); |
|
563 |
emit deviceDialogData(mResultMap); |
|
564 |
} |
|
565 |
RDEBUG("1", 1); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
566 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
567 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
568 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
569 |
// SecUiNotificationDialog::handleAccepted() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
570 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
571 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
572 |
void SecUiNotificationDialog::handleAccepted() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
573 |
{ |
30 | 574 |
RDEBUG("0", 0); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
575 |
// okAction |
30 | 576 |
RDEBUG("mMyId", mMyId); |
577 |
QString codeTopText=""; |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
578 |
|
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
579 |
if( (queryType & ESecUiTypeMaskLock)) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
580 |
{ |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
581 |
codeTopText = "Unlock-Request"; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
582 |
} |
30 | 583 |
else if( (queryType & ESecUiBasicTypeMask)==ESecUiBasicTypeCheck) |
584 |
{ |
|
585 |
codeTopText=(checkBox->isChecked() ? "1":"0"); |
|
586 |
mResultMap.insert(KCodeTopIndex, codeTopText); |
|
587 |
} |
|
588 |
else if( (queryType & ESecUiBasicTypeMask)==ESecUiBasicTypeCheckMulti) |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
589 |
{ |
30 | 590 |
QItemSelectionModel *selectionModel = listWidget->selectionModel(); |
591 |
QModelIndexList selectedItems = selectionModel->selectedIndexes(); |
|
592 |
QModelIndex index; |
|
593 |
codeTopText=""; |
|
594 |
foreach(index, selectedItems) { |
|
595 |
codeTopText+=QString::number(index.row()); |
|
35 | 596 |
// could also use if(index.row()!=selectedItems.count()-1) codeTopText+= "|"; |
30 | 597 |
codeTopText+= "|"; |
598 |
} |
|
599 |
mResultMap.insert(KCodeTopIndex, codeTopText); |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
600 |
} |
30 | 601 |
else |
602 |
codeTopText = codeTop->text(); |
|
603 |
// no need to check last time for codeBottom |
|
35 | 604 |
RDEBUGQT("codeTopText", codeTopText); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
605 |
sendResult(KErrNone); |
30 | 606 |
RDEBUG("calling close()", 0); |
607 |
close(); // this is needed because Cancel doesn't automatically closes the dialog |
|
608 |
RDEBUG("emitting deviceDialogClosed", 0); |
|
609 |
emit deviceDialogClosed(); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
610 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
611 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
612 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
613 |
// SecUiNotificationDialog::handleCancelled() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
614 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
615 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
616 |
void SecUiNotificationDialog::handleCancelled() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
617 |
{ |
30 | 618 |
RDEBUG("0", 0); |
619 |
RDEBUG("mMyId", mMyId); |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
620 |
sendResult(KErrCancel); |
30 | 621 |
RDEBUG("callingclose()", 0); |
622 |
close(); // this is needed because Cancel doesn't automatically closes the dialog |
|
623 |
RDEBUG("emitting deviceDialogClosed", 0); |
|
624 |
emit deviceDialogClosed(); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
625 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
626 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
627 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
628 |
// SecUiNotificationDialog::handleMemorySelectionChanged() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
629 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
630 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
631 |
void SecUiNotificationDialog::handleMemorySelectionChanged(const QString &text) |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
632 |
{ |
30 | 633 |
RDEBUG("0", 0); |
634 |
RDEBUG("mMyId", mMyId); |
|
35 | 635 |
RDEBUGQT("text", text); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
636 |
QVariant memorySelection(text); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
637 |
mResultMap.insert(KSelectedMemoryIndex, memorySelection); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
638 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
639 |
|
19
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
640 |
void SecUiNotificationDialog::handleCodeTopContentChanged() |
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
641 |
{ |
30 | 642 |
RDEBUG("0", 0); |
643 |
RDEBUG("mMyId", mMyId); |
|
35 | 644 |
RDEBUGQT("codeTop->text()", codeTop->text()); |
19
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
645 |
handleCodeTopChanged(codeTop->text()); |
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
646 |
} |
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
647 |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
648 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
649 |
// SecUiNotificationDialog::handleCodeTopChanged() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
650 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
651 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
652 |
void SecUiNotificationDialog::handleCodeTopChanged(const QString &text) |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
653 |
{ |
30 | 654 |
RDEBUG("0", 0); |
35 | 655 |
RDEBUGQT("text", text); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
656 |
if(queryDual) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
657 |
{ |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
658 |
codeBottom->setText(""); // any change resets the verification. |
35 | 659 |
if( (queryType & ESecUiMaskType) == 0x000004 ) // new codeLock |
660 |
{ // ChangeSecCodeParamsL change RMobilePhone::ESecurityCodePhonePassword |
|
661 |
QVariant codeTopVar(text); |
|
662 |
mResultMap.insert(KCodeTopIndex, codeTopVar); |
|
663 |
sendResult(KErrCompletion); // send the current password back to the client for further TARM validation. This is done on any key-press, not in the OK |
|
664 |
} |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
665 |
} |
35 | 666 |
else if(text.length() < lMinLength ) |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
667 |
{ |
35 | 668 |
RDEBUGQT("too short text", text); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
669 |
okAction->setEnabled(false); |
30 | 670 |
RDEBUG("lEmergencySupported", lEmergencySupported); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
671 |
if( lEmergencySupported && text.length() > 2 ) // emergency numbers need at least 3 digits |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
672 |
{ // check whether it's a emergency number |
30 | 673 |
QVariant codeTopVar(text); |
674 |
mResultMap.insert(KCodeTopIndex, codeTopVar); |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
675 |
sendResult(KErrAbort); // send the current password back to the client. Perhaps it's an emergency number and decides to Ok->Call |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
676 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
677 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
678 |
else if (text.length() >= lMinLength) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
679 |
{ |
30 | 680 |
// might use a flag to avoid re-setting. But this complicates things if there's another initial verification |
35 | 681 |
RDEBUGQT("long enough text", text); |
682 |
okAction->setText(hbTrId("Ok")); |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
683 |
if(queryDual==0) // only if Bottom is not used |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
684 |
okAction->setEnabled(true); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
685 |
} |
30 | 686 |
QVariant codeTopVar(text); |
687 |
mResultMap.insert(KCodeTopIndex, codeTopVar); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
688 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
689 |
// ---------------------------------------------------------------------------- |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
690 |
// SecUiNotificationDialog::handleCodeBottomChanged() |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
691 |
// ---------------------------------------------------------------------------- |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
692 |
// |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
693 |
void SecUiNotificationDialog::handleCodeBottomChanged(const QString &text) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
694 |
{ |
30 | 695 |
RDEBUG("0", 0); |
35 | 696 |
RDEBUGQT("text", text); |
697 |
RDEBUGQT("codeTop->text()", codeTop->text()); |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
698 |
if(text.length() < lMinLength ) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
699 |
{ |
35 | 700 |
RDEBUGQT("too short text", text); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
701 |
okAction->setEnabled(false); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
702 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
703 |
else |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
704 |
{ |
30 | 705 |
// might use a flag to avoid re-setting. But it just complicates things. |
35 | 706 |
RDEBUGQT("long enough text", text); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
707 |
if(codeTop->text()==text) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
708 |
{ |
30 | 709 |
// unless both codes match, don't allow OK. Note that the first field doesn't allow exit until the validations (i.e. NewLockCode) as succesfull |
35 | 710 |
RDEBUGQT("codes match", text); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
711 |
okAction->setEnabled(true); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
712 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
713 |
else |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
714 |
{ |
35 | 715 |
RDEBUGQT("codes don't match", text); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
716 |
okAction->setEnabled(false); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
717 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
718 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
719 |
// verification is not sent |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
720 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
721 |
// ---------------------------------------------------------------------------- |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
722 |
// SecUiNotificationDialog::handlebut1Changed() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
723 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
724 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
725 |
void SecUiNotificationDialog::handlebut1Changed() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
726 |
{ |
30 | 727 |
RDEBUG("0", 0); |
728 |
codeTop->setText("1234"); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
729 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
730 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
731 |
// SecUiNotificationDialog::handlebut2Changed() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
732 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
733 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
734 |
void SecUiNotificationDialog::handlebut2Changed() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
735 |
{ |
30 | 736 |
RDEBUG("0", 0); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
737 |
QString codeTopText = codeTop->text(); |
35 | 738 |
RDEBUGQT("codeTopText", codeTopText); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
739 |
codeTopText = codeTopText + "1" ; |
35 | 740 |
RDEBUGQT("codeTopText+1", codeTopText); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
741 |
codeTop->setText(codeTopText); |
30 | 742 |
|
743 |
RDEBUG("editorInterface", 0); |
|
744 |
HbEditorInterface editorInterface(codeTop); |
|
745 |
RDEBUG("actions", 0); |
|
746 |
QList<HbAction *> vkbList = editorInterface.actions(); |
|
747 |
RDEBUG("count", 0); |
|
748 |
int count = vkbList.count(); |
|
749 |
RDEBUG("got count", count); |
|
750 |
for (int i = 0; i < count; i++) |
|
751 |
{ |
|
752 |
RDEBUG("i", i); |
|
753 |
HbAction *action = static_cast<HbAction *>(vkbList[i]); |
|
754 |
RDEBUG("action", 0); |
|
755 |
} |
|
756 |
||
757 |
RDEBUG("okVKBAction", 0); |
|
758 |
okVKBAction = new HbAction(tr("Ok")); |
|
759 |
RDEBUG("addAction", 0); |
|
760 |
editorInterface.addAction(okVKBAction); |
|
761 |
RDEBUG("addAction", 1); |
|
762 |
connect(okVKBAction, SIGNAL(triggered()), this, SLOT(handleAccepted())); |
|
763 |
RDEBUG("connect", 1); |
|
764 |
||
765 |
QList<HbAction *> vkbList2 = editorInterface.actions(); |
|
766 |
RDEBUG("count", 0); |
|
767 |
int count2 = vkbList2.count(); |
|
768 |
RDEBUG("got count2", count2); |
|
769 |
for (int i = 0; i < count2; i++) |
|
770 |
{ |
|
771 |
RDEBUG("i", i); |
|
772 |
HbAction *action2 = static_cast<HbAction *>(vkbList2[i]); |
|
773 |
RDEBUG("action2", 0); |
|
774 |
} |
|
775 |
||
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
776 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
777 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
778 |
// SecUiNotificationDialog::handlebut3Changed() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
779 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
780 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
781 |
void SecUiNotificationDialog::handlebut3Changed() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
782 |
{ |
35 | 783 |
RDEBUG("0", 0); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
784 |
QString codeTopText = codeTop->text(); |
35 | 785 |
RDEBUG("codeTopText", 0); |
786 |
RDEBUGQT("codeTopText", codeTopText); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
787 |
codeTopText = codeTopText + "5" ; |
35 | 788 |
RDEBUGQT("codeTopText+5", codeTopText); |
19
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
789 |
codeTop->setEchoMode(HbLineEdit::PasswordEchoOnEdit); |
35 | 790 |
RDEBUGQT("codeTopText", codeTopText); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
791 |
codeTop->setText(codeTopText); |
35 | 792 |
RDEBUG("setFocus", 0); |
793 |
codeTop->setFocus(); |
|
794 |
RDEBUG("1", 1); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
795 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
796 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
797 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
798 |
// SecUiNotificationDialog::saveFocusWidget(QWidget*,QWidget*) |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
799 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
800 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
801 |
void SecUiNotificationDialog::saveFocusWidget(QWidget*,QWidget*) |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
802 |
{ |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
803 |
RDEBUG("0", 0); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
804 |
} |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
805 |
|
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
806 |
// ---------------------------------------------------------------------------- |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
807 |
// SecUiNotificationDialog::subscriberKSecurityUIsDismissDialogChanged() |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
808 |
// A way for Autolock to dismiss any possible PIN dialog |
30 | 809 |
// This doesn't dismiss the lockIcon because P&S is not connected |
810 |
// Note: if this changes itself, then it becomes recursive |
|
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
811 |
// ---------------------------------------------------------------------------- |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
812 |
// |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
813 |
void SecUiNotificationDialog::subscriberKSecurityUIsDismissDialogChanged() |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
814 |
{ |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
815 |
|
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
816 |
RDEBUG("0", 0); |
30 | 817 |
RDEBUG("mMyId", mMyId); |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
818 |
TInt aDismissDialog = ESecurityUIsDismissDialogUninitialized; |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
819 |
TInt err = RProperty::Get(KPSUidSecurityUIs, KSecurityUIsDismissDialog, aDismissDialog ); |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
820 |
RDEBUG("err", err); |
30 | 821 |
RDEBUG("aDismissDialog", aDismissDialog); |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
822 |
if( aDismissDialog == ESecurityUIsDismissDialogOn ) |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
823 |
{ |
30 | 824 |
if(subscriberKSecurityUIsDismissDialog) |
825 |
{ |
|
826 |
RDEBUG("subscriberKSecurityUIsDismissDialog", 1); |
|
827 |
} |
|
828 |
else |
|
829 |
{ |
|
830 |
RDEBUG("! subscriberKSecurityUIsDismissDialog", 0); |
|
831 |
} |
|
832 |
||
833 |
if(this) |
|
834 |
{ |
|
835 |
RDEBUG("this", 1); |
|
836 |
} |
|
837 |
else |
|
838 |
{ |
|
839 |
RDEBUG("! this", 0); |
|
840 |
} |
|
841 |
||
842 |
||
843 |
RDEBUG("disconnect subscriberKSecurityUIsDismissDialog", 0); |
|
844 |
disconnect(subscriberKSecurityUIsDismissDialog, SIGNAL(contentsChanged()), this, SLOT(subscriberKSecurityUIsDismissDialogChanged())); |
|
845 |
// this doesn't really disconnect, because somehow the events are still queued. This is a QtMobility error |
|
846 |
RDEBUG("disconnected subscriberKSecurityUIsDismissDialog", 1); |
|
847 |
||
848 |
RDEBUG("not set KSecurityUIsDismissDialog", ESecurityUIsDismissDialogProcessing); |
|
849 |
// can't set it because it does recursion |
|
850 |
// err = RProperty::Set(KPSUidSecurityUIs, KSecurityUIsDismissDialog, ESecurityUIsDismissDialogProcessing ); |
|
851 |
RDEBUG("err", err); |
|
852 |
// only if Cancel is allowed |
|
853 |
if ((queryType & ESecUiCancelSupported)==ESecUiCancelSupported) |
|
854 |
{ |
|
855 |
RDEBUG("sendResult(KErrCancel)", KErrCancel); // another option is KErrDied |
|
856 |
sendResult(KErrCancel); // similar to emit handleCancelled(); |
|
857 |
RDEBUG("calling close()", 0); |
|
858 |
err = close(); |
|
859 |
RDEBUG("err", err); |
|
860 |
RDEBUG("emitting deviceDialogClosed", 0); |
|
861 |
emit deviceDialogClosed(); |
|
862 |
// RDEBUG("emit closeDeviceDialog", 0); |
|
863 |
// this is old method emit closeDeviceDialog(false); // false means "not by client", although it's not really used |
|
864 |
RDEBUG("all emited", 0); |
|
865 |
} |
|
866 |
RDEBUG("not set KSecurityUIsDismissDialog", ESecurityUIsDismissDialogDone); |
|
867 |
// can't set it because it does recursion |
|
868 |
// err = RProperty::Set(KPSUidSecurityUIs, KSecurityUIsDismissDialog, ESecurityUIsDismissDialogDone ); // clear after using it |
|
869 |
RDEBUG("err", err); |
|
870 |
||
871 |
RDEBUG("reconnect subscriberKSecurityUIsDismissDialog", 0); |
|
872 |
connect(subscriberKSecurityUIsDismissDialog, SIGNAL(contentsChanged()), this, SLOT(subscriberKSecurityUIsDismissDialogChanged())); |
|
873 |
RDEBUG("reconnected subscriberKSecurityUIsDismissDialog", 1); |
|
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
874 |
} |
30 | 875 |
RDEBUG("1", 1); |
876 |
} |