author | hgs |
Fri, 06 Aug 2010 10:55:57 +0300 | |
changeset 42 | 82671cd8994b |
parent 35 | f1030a78d563 |
child 66 | 67b3e3c1fc87 |
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); |
|
42 | 230 |
// remove setFocus from PIN query because Orbit can't handle it |
231 |
// codeTop->setFocus(); // this should open the VKB . Doesn't seem to work when it's done on the widget, so it's done here. |
|
30 | 232 |
} // codeTop!=NULL |
233 |
||
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
234 |
const TUint32 KSecurityUIsTestCode = 0x00000307; |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
235 |
TInt value = 0; |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
236 |
TInt err = RProperty::Get(KPSUidSecurityUIs, KSecurityUIsTestCode, value ); |
30 | 237 |
RDEBUG("KSecurityUIsTestCode err", err); |
238 |
RDEBUG("faking value", value); |
|
239 |
RDEBUG("mShowEventReceived", mShowEventReceived); |
|
35 | 240 |
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
|
241 |
{ |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
242 |
QString myString = ""; |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
243 |
myString += QString("%1").arg(value); |
35 | 244 |
RDEBUGQT("myString", myString); |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
245 |
codeTop->setText( myString ); |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
246 |
TInt err = RProperty::Set(KPSUidSecurityUIs, KSecurityUIsTestCode, 0 ); // clear after using it |
35 | 247 |
RDEBUGQT("calling handleAccepted myString", myString); |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
248 |
emit handleAccepted(); |
30 | 249 |
// 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
|
250 |
} |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
251 |
} |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
252 |
mShowEventReceived = true; |
30 | 253 |
RDEBUG("1", 1); |
15
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 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
257 |
// SecUiNotificationDialog::constructDialog() |
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 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
260 |
bool SecUiNotificationDialog::constructDialog(const QVariantMap ¶meters) |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
261 |
{ |
30 | 262 |
RDEBUG("0", 0); |
263 |
RDEBUG("mMyId", mMyId); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
264 |
setTimeout(HbPopup::NoTimeout); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
265 |
setDismissPolicy(HbPopup::NoDismiss); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
266 |
setModal(true); |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
267 |
mShowEventReceived = false; |
30 | 268 |
subscriberKSecurityUIsDismissDialog = NULL; |
269 |
titleWidget = NULL; |
|
270 |
RDEBUG("subscriberKSecurityUIsDismissDialog NULL", 0); |
|
271 |
||
272 |
subscriberKSecurityUIsDismissDialog = new QValueSpaceSubscriber("/KPSUidSecurityUIs/KSecurityUIsDismissDialog", this); |
|
273 |
if(subscriberKSecurityUIsDismissDialog) |
|
274 |
{ |
|
275 |
RDEBUG("subscriberKSecurityUIsDismissDialog created", 1); |
|
276 |
} |
|
277 |
else |
|
278 |
{ |
|
279 |
RDEBUG("subscriberKSecurityUIsDismissDialog not created", 0); |
|
280 |
} |
|
281 |
connect(subscriberKSecurityUIsDismissDialog, SIGNAL(contentsChanged()), this, SLOT(subscriberKSecurityUIsDismissDialogChanged())); |
|
282 |
RDEBUG("subscriberKSecurityUIsDismissDialog", 1); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
283 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
284 |
// Title |
30 | 285 |
// this is also done later in the widget |
286 |
// For now, it only says "Security" |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
287 |
if (parameters.contains(KDialogTitle)) { |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
288 |
QString titleText = parameters.value(KDialogTitle).toString(); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
289 |
QString titleAttempts = ""; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
290 |
if(titleText.indexOf('|')>0) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
291 |
{ // if separator, take only first part |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
292 |
titleText = titleText.left(titleText.indexOf('|')); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
293 |
} |
35 | 294 |
if(titleText.indexOf('$')>0) |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
295 |
{ // if separator, take only first part |
35 | 296 |
titleAttempts = titleText.right(titleText.length()-titleText.indexOf('$')-1); |
297 |
RDEBUGQT("titleAttempts", titleAttempts); |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
298 |
int nAttempts = titleAttempts.toInt(); |
30 | 299 |
RDEBUG("nAttempts", nAttempts); |
35 | 300 |
titleText = titleText.left(titleText.indexOf('$')); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
301 |
if(nAttempts>0) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
302 |
titleText = titleText + " attempts=" + QString::number(nAttempts); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
303 |
} |
35 | 304 |
titleText = hbTrId("Security Query"); // this is the header, for any potential later error which needs to be displayed |
30 | 305 |
// This is created only if needed (i.e. errors for NewLockCode) |
306 |
// titleWidget = new HbLabel(titleText); |
|
307 |
// setHeadingWidget(titleWidget); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
308 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
309 |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
310 |
if (parameters.contains(KEmergency)) { |
30 | 311 |
RDEBUG("KEmergency", 1); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
312 |
QString emergencyText = parameters.value(KEmergency).toString(); |
35 | 313 |
RDEBUGQT("emergencyText", emergencyText); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
314 |
if(!emergencyText.compare("emergencyYes")) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
315 |
{ |
30 | 316 |
RDEBUG("emergencyYes", 1); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
317 |
isEmergency = 1; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
318 |
okAction->setEnabled(true); |
35 | 319 |
okAction->setText(hbTrId("Call")); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
320 |
return true; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
321 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
322 |
if(!emergencyText.compare("emergencyNo")) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
323 |
{ |
30 | 324 |
RDEBUG("emergencyNo", 1); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
325 |
isEmergency = 0; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
326 |
okAction->setEnabled(false); // 112 -> 1122 (=password) . This is handled by < lMinLength |
35 | 327 |
okAction->setText(hbTrId("Ok")); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
328 |
return true; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
329 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
330 |
} |
26
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
331 |
// after TARM validation. |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
332 |
if (parameters.contains(KInvalidNewLockCode)) { |
30 | 333 |
RDEBUG("KInvalidNewLockCode", 0); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
334 |
QString invalidText = parameters.value(KInvalidNewLockCode).toString(); |
35 | 335 |
RDEBUGQT("invalidText", invalidText); |
30 | 336 |
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
|
337 |
|
35 | 338 |
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
|
339 |
int invalidNumber = invalidStr.toInt(); |
30 | 340 |
RDEBUG("invalidNumber", invalidNumber); |
35 | 341 |
if(invalidNumber<0) // that is, -1 |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
342 |
{ |
30 | 343 |
RDEBUG("invalidNumber<0", invalidNumber ); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
344 |
// nothing to do |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
345 |
} |
30 | 346 |
if(invalidNumber==EDeviceLockAutolockperiod) |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
347 |
{ |
30 | 348 |
RDEBUG("EDeviceLockAutolockperiod", invalidNumber ); |
35 | 349 |
newTitleText+=hbTrId("EDeviceLockAutolockperiod"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
350 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
351 |
if(invalidNumber==EDeviceLockMaxAutolockPeriod) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
352 |
{ |
30 | 353 |
RDEBUG("EDeviceLockAutolockperiod", invalidNumber ); |
35 | 354 |
newTitleText+=hbTrId("EDeviceLockMaxAutolockPeriod"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
355 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
356 |
if(invalidNumber==EDeviceLockMinlength) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
357 |
{ |
30 | 358 |
RDEBUG("EDeviceLockMinlength", invalidNumber ); |
35 | 359 |
newTitleText+=hbTrId("EDeviceLockMinlength"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
360 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
361 |
if(invalidNumber==EDeviceLockMaxlength) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
362 |
{ |
30 | 363 |
RDEBUG("EDeviceLockMaxlength", invalidNumber ); |
35 | 364 |
newTitleText+=hbTrId("EDeviceLockMaxlength"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
365 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
366 |
if(invalidNumber==EDeviceLockRequireUpperAndLower) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
367 |
{ |
30 | 368 |
RDEBUG("EDeviceLockRequireUpperAndLower", invalidNumber ); |
35 | 369 |
newTitleText+=hbTrId("EDeviceLockRequireUpperAndLower"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
370 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
371 |
if(invalidNumber==EDeviceLockRequireCharsAndNumbers) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
372 |
{ |
30 | 373 |
RDEBUG("EDeviceLockMaxlength", invalidNumber ); |
35 | 374 |
newTitleText+=hbTrId("EDeviceLockMaxlength"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
375 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
376 |
if(invalidNumber==EDeviceLockAllowedMaxRepeatedChars) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
377 |
{ |
30 | 378 |
RDEBUG("EDeviceLockAllowedMaxRepeatedChars", invalidNumber ); |
35 | 379 |
newTitleText+=hbTrId("EDeviceLockAllowedMaxRepeatedChars"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
380 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
381 |
if(invalidNumber==EDeviceLockHistoryBuffer) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
382 |
{ |
30 | 383 |
RDEBUG("EDeviceLockHistoryBuffer", invalidNumber ); |
35 | 384 |
newTitleText+=hbTrId("EDeviceLockHistoryBuffer"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
385 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
386 |
if(invalidNumber==EDeviceLockPasscodeExpiration) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
387 |
{ |
30 | 388 |
RDEBUG("EDeviceLockPasscodeExpiration", invalidNumber ); |
35 | 389 |
newTitleText+=hbTrId("EDeviceLockPasscodeExpiration"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
390 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
391 |
if(invalidNumber==EDeviceLockMinChangeTolerance) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
392 |
{ |
30 | 393 |
RDEBUG("EDeviceLockMinChangeTolerance", invalidNumber ); |
35 | 394 |
newTitleText+=hbTrId("EDeviceLockMinChangeTolerance"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
395 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
396 |
if(invalidNumber==EDeviceLockMinChangeInterval) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
397 |
{ |
30 | 398 |
RDEBUG("EDeviceLockMinChangeInterval", invalidNumber ); |
35 | 399 |
newTitleText+=hbTrId("EDeviceLockMinChangeInterval"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
400 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
401 |
if(invalidNumber==EDeviceLockDisallowSpecificStrings) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
402 |
{ |
30 | 403 |
RDEBUG("EDeviceLockDisallowSpecificStrings", invalidNumber ); |
35 | 404 |
newTitleText+=hbTrId("EDeviceLockDisallowSpecificStrings"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
405 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
406 |
if(invalidNumber==EDeviceLockAllowedMaxAtempts) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
407 |
{ |
30 | 408 |
RDEBUG("EDeviceLockAllowedMaxAtempts", invalidNumber ); |
35 | 409 |
newTitleText+=hbTrId("EDeviceLockAllowedMaxAtempts"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
410 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
411 |
if(invalidNumber==EDeviceLockConsecutiveNumbers) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
412 |
{ |
30 | 413 |
RDEBUG("EDeviceLockConsecutiveNumbers", invalidNumber ); |
35 | 414 |
newTitleText+=hbTrId("EDeviceLockConsecutiveNumbers"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
415 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
416 |
if(invalidNumber==EDeviceLockMinSpecialCharacters) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
417 |
{ |
30 | 418 |
RDEBUG("EDeviceLockMinSpecialCharacters", invalidNumber ); |
35 | 419 |
newTitleText+=hbTrId("EDeviceLockMinSpecialCharacters"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
420 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
421 |
if(invalidNumber==EDeviceLockSingleCharRepeatNotAllowed) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
422 |
{ |
30 | 423 |
RDEBUG("EDeviceLockSingleCharRepeatNotAllowed", invalidNumber ); |
35 | 424 |
newTitleText+=hbTrId("EDeviceLockSingleCharRepeatNotAllowed"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
425 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
426 |
if(invalidNumber==EDevicelockConsecutiveCharsNotAllowed) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
427 |
{ |
30 | 428 |
RDEBUG("EDevicelockConsecutiveCharsNotAllowed", invalidNumber ); |
35 | 429 |
newTitleText+=hbTrId("EDevicelockConsecutiveCharsNotAllowed"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
430 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
431 |
if(invalidNumber>=EDevicelockTotalPolicies) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
432 |
{ |
30 | 433 |
RDEBUG("EDevicelockTotalPolicies", invalidNumber ); |
35 | 434 |
newTitleText+=hbTrId("EDevicelockTotalPolicies"); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
435 |
} |
30 | 436 |
if( !titleWidget ) |
437 |
{ |
|
438 |
RDEBUG("creating titleWidget", 0 ); |
|
35 | 439 |
titleWidget = new HbLabel(hbTrId("New lock code")); // it will be changed later |
30 | 440 |
setHeadingWidget(titleWidget); |
441 |
} |
|
442 |
RDEBUG("setPlainText", 0 ); |
|
443 |
titleWidget->setPlainText(newTitleText); |
|
444 |
||
26
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
445 |
if(invalidNumber<0) // everything is ok |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
446 |
{ |
30 | 447 |
okAction->setEnabled(true); // this might fail in the scenario: check this : invalid -> valid. This allows verif ? |
35 | 448 |
okAction->setText(hbTrId("Ok")); |
26
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
449 |
codeBottom->setEnabled(true); |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
450 |
} |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
451 |
else |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
452 |
{ |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
453 |
okAction->setEnabled(false); |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
454 |
codeBottom->setEnabled(false); |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
455 |
codeBottom->setText(""); |
35 | 456 |
okAction->setText(hbTrId("Ok")); |
26
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
457 |
} |
aad866c37519
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
22
diff
changeset
|
458 |
// 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
|
459 |
return true; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
460 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
461 |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
462 |
// Content |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
463 |
SecUiNotificationContentWidget *content = new SecUiNotificationContentWidget(); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
464 |
content->constructFromParameters(parameters); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
465 |
setContentWidget(content); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
466 |
|
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
467 |
queryType = content->queryType; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
468 |
queryDual = content->queryDual; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
469 |
isEmergency = content->isEmergency; |
30 | 470 |
codeTop=NULL; |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
471 |
codeTop = content->codeTop; |
30 | 472 |
checkBox = content->checkbox; |
473 |
listWidget = content->listWidget; |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
474 |
codeBottom = content->codeBottom; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
475 |
lMinLength = content->lMinLength; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
476 |
lMaxLength = content->lMaxLength; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
477 |
lEmergencySupported = content->lEmergencySupported; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
478 |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
479 |
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
|
480 |
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
|
481 |
connect(content, SIGNAL(codeTopContentChanged()), this, SLOT(handleCodeTopContentChanged())); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
482 |
connect(content, SIGNAL(but1Changed()), this, SLOT(handlebut1Changed())); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
483 |
connect(content, SIGNAL(but2Changed()), this, SLOT(handlebut2Changed())); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
484 |
connect(content, SIGNAL(but3Changed()), this, SLOT(handlebut3Changed())); |
30 | 485 |
RDEBUG("queryType", queryType); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
486 |
// Buttons |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
487 |
if( (queryType & ESecUiTypeMaskLock)) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
488 |
{ |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
489 |
// no need to create OK or Cancel |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
490 |
return true; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
491 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
492 |
|
35 | 493 |
okAction = new HbAction(hbTrId("Ok")); |
30 | 494 |
RDEBUG("created HbAction okAction", 1); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
495 |
okAction->setEnabled(false); // initially the OK is disabled because codeTop is empty |
30 | 496 |
if((queryType & ESecUiBasicTypeMask) ==ESecUiBasicTypeCheck) { |
497 |
okAction->setEnabled(true); |
|
498 |
setHeadingWidget(0); // had to remove this no multiline |
|
499 |
} |
|
500 |
else if ((queryType & ESecUiBasicTypeMask) ==ESecUiBasicTypeCheckMulti){ |
|
501 |
okAction->setEnabled(true); |
|
502 |
} |
|
503 |
||
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
504 |
// setAction(okAction, QDialogButtonBox::AcceptRole); // it's supposed to use this, when deprecated |
30 | 505 |
// setPrimaryAction(okAction); |
506 |
addAction(okAction); |
|
507 |
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
|
508 |
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
|
509 |
|
35 | 510 |
cancelAction = new HbAction(hbTrId("Cancel")); // qtTrId("txt_common_button_cancel") |
30 | 511 |
addAction(cancelAction); |
512 |
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
|
513 |
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
|
514 |
// setAction(cancelAction, QDialogButtonBox::RejectRole); // it's supposed to use this, when deprecated |
30 | 515 |
// setSecondaryAction(cancelAction); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
516 |
|
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
517 |
// 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
|
518 |
TInt ret = RProperty::Define(KPSUidSecurityUIs, KSecurityUIsDismissDialog, |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
519 |
RProperty::EInt, TSecurityPolicy(TSecurityPolicy::EAlwaysPass), |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
520 |
TSecurityPolicy(TSecurityPolicy::EAlwaysPass)); |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
521 |
RDEBUG("defined KSecurityUIsDismissDialog", ret); |
30 | 522 |
TInt aDismissDialog = -1; |
523 |
ret = RProperty::Get(KPSUidSecurityUIs, KSecurityUIsDismissDialog, aDismissDialog ); |
|
524 |
RDEBUG("ret", ret); |
|
525 |
RDEBUG("aDismissDialog", aDismissDialog); |
|
526 |
if(aDismissDialog==ESecurityUIsDismissDialogOn || aDismissDialog==ESecurityUIsDismissDialogProcessing) |
|
527 |
{ |
|
528 |
RDebug::Printf( "potential error: %s %s (%u) aDismissDialog=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, aDismissDialog ); |
|
529 |
} |
|
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
530 |
|
30 | 531 |
RDEBUG("check cancel", 0); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
532 |
if ((queryType & ESecUiCancelSupported)==ESecUiCancelSupported) |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
533 |
{ |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
534 |
// nothing to do. Cancel is enabled by default |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
535 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
536 |
else |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
537 |
{ |
30 | 538 |
RDEBUG("disable Cancel", 1); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
539 |
cancelAction->setEnabled(false); |
30 | 540 |
cancelAction->setText(""); |
541 |
cancelAction->setVisible(false); |
|
15
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 |
|
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
544 |
return true; |
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 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
548 |
// SecUiNotificationDialog::sendResult() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
549 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
550 |
// |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
551 |
void SecUiNotificationDialog::sendResult(int accepted) |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
552 |
{ |
30 | 553 |
RDEBUG("0", 0); |
554 |
RDEBUG("mMyId", mMyId); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
555 |
QVariant acceptedValue(accepted); |
30 | 556 |
RDEBUG("0", 0); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
557 |
mResultMap.insert(KResultAccepted, acceptedValue); |
30 | 558 |
RDEBUG("0", 0); |
35 | 559 |
RDEBUGQT("mResultMap", mResultMap); |
30 | 560 |
RDEBUG("queryType", queryType); |
561 |
if(!(queryType & ESecUiTypeMaskLock)) |
|
562 |
{ // the lock-icon should not reply |
|
563 |
RDEBUG("emit deviceDialogData", 0); |
|
564 |
emit deviceDialogData(mResultMap); |
|
565 |
} |
|
566 |
RDEBUG("1", 1); |
|
15
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 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
570 |
// SecUiNotificationDialog::handleAccepted() |
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 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
573 |
void SecUiNotificationDialog::handleAccepted() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
574 |
{ |
30 | 575 |
RDEBUG("0", 0); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
576 |
// okAction |
30 | 577 |
RDEBUG("mMyId", mMyId); |
578 |
QString codeTopText=""; |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
579 |
|
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
580 |
if( (queryType & ESecUiTypeMaskLock)) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
581 |
{ |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
582 |
codeTopText = "Unlock-Request"; |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
583 |
} |
30 | 584 |
else if( (queryType & ESecUiBasicTypeMask)==ESecUiBasicTypeCheck) |
585 |
{ |
|
586 |
codeTopText=(checkBox->isChecked() ? "1":"0"); |
|
587 |
mResultMap.insert(KCodeTopIndex, codeTopText); |
|
588 |
} |
|
589 |
else if( (queryType & ESecUiBasicTypeMask)==ESecUiBasicTypeCheckMulti) |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
590 |
{ |
30 | 591 |
QItemSelectionModel *selectionModel = listWidget->selectionModel(); |
592 |
QModelIndexList selectedItems = selectionModel->selectedIndexes(); |
|
593 |
QModelIndex index; |
|
594 |
codeTopText=""; |
|
595 |
foreach(index, selectedItems) { |
|
596 |
codeTopText+=QString::number(index.row()); |
|
35 | 597 |
// could also use if(index.row()!=selectedItems.count()-1) codeTopText+= "|"; |
30 | 598 |
codeTopText+= "|"; |
599 |
} |
|
600 |
mResultMap.insert(KCodeTopIndex, codeTopText); |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
601 |
} |
30 | 602 |
else |
603 |
codeTopText = codeTop->text(); |
|
604 |
// no need to check last time for codeBottom |
|
35 | 605 |
RDEBUGQT("codeTopText", codeTopText); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
606 |
sendResult(KErrNone); |
30 | 607 |
RDEBUG("calling close()", 0); |
608 |
close(); // this is needed because Cancel doesn't automatically closes the dialog |
|
609 |
RDEBUG("emitting deviceDialogClosed", 0); |
|
610 |
emit deviceDialogClosed(); |
|
15
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 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
614 |
// SecUiNotificationDialog::handleCancelled() |
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 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
617 |
void SecUiNotificationDialog::handleCancelled() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
618 |
{ |
30 | 619 |
RDEBUG("0", 0); |
620 |
RDEBUG("mMyId", mMyId); |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
621 |
sendResult(KErrCancel); |
30 | 622 |
RDEBUG("callingclose()", 0); |
623 |
close(); // this is needed because Cancel doesn't automatically closes the dialog |
|
624 |
RDEBUG("emitting deviceDialogClosed", 0); |
|
625 |
emit deviceDialogClosed(); |
|
15
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 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
629 |
// SecUiNotificationDialog::handleMemorySelectionChanged() |
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 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
632 |
void SecUiNotificationDialog::handleMemorySelectionChanged(const QString &text) |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
633 |
{ |
30 | 634 |
RDEBUG("0", 0); |
635 |
RDEBUG("mMyId", mMyId); |
|
35 | 636 |
RDEBUGQT("text", text); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
637 |
QVariant memorySelection(text); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
638 |
mResultMap.insert(KSelectedMemoryIndex, memorySelection); |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
639 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
640 |
|
19
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
641 |
void SecUiNotificationDialog::handleCodeTopContentChanged() |
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
642 |
{ |
30 | 643 |
RDEBUG("0", 0); |
644 |
RDEBUG("mMyId", mMyId); |
|
35 | 645 |
RDEBUGQT("codeTop->text()", codeTop->text()); |
19
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
646 |
handleCodeTopChanged(codeTop->text()); |
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
647 |
} |
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
648 |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
649 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
650 |
// SecUiNotificationDialog::handleCodeTopChanged() |
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 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
653 |
void SecUiNotificationDialog::handleCodeTopChanged(const QString &text) |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
654 |
{ |
30 | 655 |
RDEBUG("0", 0); |
35 | 656 |
RDEBUGQT("text", text); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
657 |
if(queryDual) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
658 |
{ |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
659 |
codeBottom->setText(""); // any change resets the verification. |
35 | 660 |
if( (queryType & ESecUiMaskType) == 0x000004 ) // new codeLock |
661 |
{ // ChangeSecCodeParamsL change RMobilePhone::ESecurityCodePhonePassword |
|
662 |
QVariant codeTopVar(text); |
|
663 |
mResultMap.insert(KCodeTopIndex, codeTopVar); |
|
664 |
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 |
|
665 |
} |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
666 |
} |
35 | 667 |
else if(text.length() < lMinLength ) |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
668 |
{ |
35 | 669 |
RDEBUGQT("too short text", text); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
670 |
okAction->setEnabled(false); |
30 | 671 |
RDEBUG("lEmergencySupported", lEmergencySupported); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
672 |
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
|
673 |
{ // check whether it's a emergency number |
30 | 674 |
QVariant codeTopVar(text); |
675 |
mResultMap.insert(KCodeTopIndex, codeTopVar); |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
676 |
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
|
677 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
678 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
679 |
else if (text.length() >= lMinLength) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
680 |
{ |
30 | 681 |
// might use a flag to avoid re-setting. But this complicates things if there's another initial verification |
35 | 682 |
RDEBUGQT("long enough text", text); |
683 |
okAction->setText(hbTrId("Ok")); |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
684 |
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
|
685 |
okAction->setEnabled(true); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
686 |
} |
30 | 687 |
QVariant codeTopVar(text); |
688 |
mResultMap.insert(KCodeTopIndex, codeTopVar); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
689 |
} |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
690 |
// ---------------------------------------------------------------------------- |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
691 |
// SecUiNotificationDialog::handleCodeBottomChanged() |
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 |
// |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
694 |
void SecUiNotificationDialog::handleCodeBottomChanged(const QString &text) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
695 |
{ |
30 | 696 |
RDEBUG("0", 0); |
35 | 697 |
RDEBUGQT("text", text); |
698 |
RDEBUGQT("codeTop->text()", codeTop->text()); |
|
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
699 |
if(text.length() < lMinLength ) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
700 |
{ |
35 | 701 |
RDEBUGQT("too short text", text); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
702 |
okAction->setEnabled(false); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
703 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
704 |
else |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
705 |
{ |
30 | 706 |
// might use a flag to avoid re-setting. But it just complicates things. |
35 | 707 |
RDEBUGQT("long enough text", text); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
708 |
if(codeTop->text()==text) |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
709 |
{ |
30 | 710 |
// 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 | 711 |
RDEBUGQT("codes match", text); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
712 |
okAction->setEnabled(true); |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
713 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
714 |
else |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
715 |
{ |
35 | 716 |
RDEBUGQT("codes don't match", text); |
17
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
717 |
okAction->setEnabled(false); |
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 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
720 |
// verification is not sent |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
721 |
} |
8957df7b0072
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
15
diff
changeset
|
722 |
// ---------------------------------------------------------------------------- |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
723 |
// SecUiNotificationDialog::handlebut1Changed() |
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 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
726 |
void SecUiNotificationDialog::handlebut1Changed() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
727 |
{ |
30 | 728 |
RDEBUG("0", 0); |
729 |
codeTop->setText("1234"); |
|
15
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 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
732 |
// SecUiNotificationDialog::handlebut2Changed() |
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 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
735 |
void SecUiNotificationDialog::handlebut2Changed() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
736 |
{ |
30 | 737 |
RDEBUG("0", 0); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
738 |
QString codeTopText = codeTop->text(); |
35 | 739 |
RDEBUGQT("codeTopText", codeTopText); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
740 |
codeTopText = codeTopText + "1" ; |
35 | 741 |
RDEBUGQT("codeTopText+1", codeTopText); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
742 |
codeTop->setText(codeTopText); |
30 | 743 |
|
744 |
RDEBUG("editorInterface", 0); |
|
745 |
HbEditorInterface editorInterface(codeTop); |
|
746 |
RDEBUG("actions", 0); |
|
747 |
QList<HbAction *> vkbList = editorInterface.actions(); |
|
748 |
RDEBUG("count", 0); |
|
749 |
int count = vkbList.count(); |
|
750 |
RDEBUG("got count", count); |
|
751 |
for (int i = 0; i < count; i++) |
|
752 |
{ |
|
753 |
RDEBUG("i", i); |
|
754 |
HbAction *action = static_cast<HbAction *>(vkbList[i]); |
|
755 |
RDEBUG("action", 0); |
|
756 |
} |
|
757 |
||
758 |
RDEBUG("okVKBAction", 0); |
|
759 |
okVKBAction = new HbAction(tr("Ok")); |
|
760 |
RDEBUG("addAction", 0); |
|
761 |
editorInterface.addAction(okVKBAction); |
|
762 |
RDEBUG("addAction", 1); |
|
763 |
connect(okVKBAction, SIGNAL(triggered()), this, SLOT(handleAccepted())); |
|
764 |
RDEBUG("connect", 1); |
|
765 |
||
766 |
QList<HbAction *> vkbList2 = editorInterface.actions(); |
|
767 |
RDEBUG("count", 0); |
|
768 |
int count2 = vkbList2.count(); |
|
769 |
RDEBUG("got count2", count2); |
|
770 |
for (int i = 0; i < count2; i++) |
|
771 |
{ |
|
772 |
RDEBUG("i", i); |
|
773 |
HbAction *action2 = static_cast<HbAction *>(vkbList2[i]); |
|
774 |
RDEBUG("action2", 0); |
|
775 |
} |
|
776 |
||
15
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 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
779 |
// SecUiNotificationDialog::handlebut3Changed() |
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 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
782 |
void SecUiNotificationDialog::handlebut3Changed() |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
783 |
{ |
35 | 784 |
RDEBUG("0", 0); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
785 |
QString codeTopText = codeTop->text(); |
35 | 786 |
RDEBUG("codeTopText", 0); |
787 |
RDEBUGQT("codeTopText", codeTopText); |
|
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
788 |
codeTopText = codeTopText + "5" ; |
35 | 789 |
RDEBUGQT("codeTopText+5", codeTopText); |
19
098e361762d2
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
17
diff
changeset
|
790 |
codeTop->setEchoMode(HbLineEdit::PasswordEchoOnEdit); |
35 | 791 |
RDEBUGQT("codeTopText", codeTopText); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
792 |
codeTop->setText(codeTopText); |
35 | 793 |
RDEBUG("setFocus", 0); |
794 |
codeTop->setFocus(); |
|
795 |
RDEBUG("1", 1); |
|
15
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 |
// ---------------------------------------------------------------------------- |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
799 |
// SecUiNotificationDialog::saveFocusWidget(QWidget*,QWidget*) |
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 |
// |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
802 |
void SecUiNotificationDialog::saveFocusWidget(QWidget*,QWidget*) |
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
803 |
{ |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
804 |
RDEBUG("0", 0); |
15
318c4eab2439
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
805 |
} |
22
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 |
// ---------------------------------------------------------------------------- |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
808 |
// SecUiNotificationDialog::subscriberKSecurityUIsDismissDialogChanged() |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
809 |
// A way for Autolock to dismiss any possible PIN dialog |
30 | 810 |
// This doesn't dismiss the lockIcon because P&S is not connected |
811 |
// 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
|
812 |
// ---------------------------------------------------------------------------- |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
813 |
// |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
814 |
void SecUiNotificationDialog::subscriberKSecurityUIsDismissDialogChanged() |
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 |
|
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
817 |
RDEBUG("0", 0); |
30 | 818 |
RDEBUG("mMyId", mMyId); |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
819 |
TInt aDismissDialog = ESecurityUIsDismissDialogUninitialized; |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
820 |
TInt err = RProperty::Get(KPSUidSecurityUIs, KSecurityUIsDismissDialog, aDismissDialog ); |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
821 |
RDEBUG("err", err); |
30 | 822 |
RDEBUG("aDismissDialog", aDismissDialog); |
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
823 |
if( aDismissDialog == ESecurityUIsDismissDialogOn ) |
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
824 |
{ |
30 | 825 |
if(subscriberKSecurityUIsDismissDialog) |
826 |
{ |
|
827 |
RDEBUG("subscriberKSecurityUIsDismissDialog", 1); |
|
828 |
} |
|
829 |
else |
|
830 |
{ |
|
831 |
RDEBUG("! subscriberKSecurityUIsDismissDialog", 0); |
|
832 |
} |
|
833 |
||
834 |
if(this) |
|
835 |
{ |
|
836 |
RDEBUG("this", 1); |
|
837 |
} |
|
838 |
else |
|
839 |
{ |
|
840 |
RDEBUG("! this", 0); |
|
841 |
} |
|
842 |
||
843 |
||
844 |
RDEBUG("disconnect subscriberKSecurityUIsDismissDialog", 0); |
|
845 |
disconnect(subscriberKSecurityUIsDismissDialog, SIGNAL(contentsChanged()), this, SLOT(subscriberKSecurityUIsDismissDialogChanged())); |
|
846 |
// this doesn't really disconnect, because somehow the events are still queued. This is a QtMobility error |
|
847 |
RDEBUG("disconnected subscriberKSecurityUIsDismissDialog", 1); |
|
848 |
||
849 |
RDEBUG("not set KSecurityUIsDismissDialog", ESecurityUIsDismissDialogProcessing); |
|
850 |
// can't set it because it does recursion |
|
851 |
// err = RProperty::Set(KPSUidSecurityUIs, KSecurityUIsDismissDialog, ESecurityUIsDismissDialogProcessing ); |
|
852 |
RDEBUG("err", err); |
|
853 |
// only if Cancel is allowed |
|
854 |
if ((queryType & ESecUiCancelSupported)==ESecUiCancelSupported) |
|
855 |
{ |
|
856 |
RDEBUG("sendResult(KErrCancel)", KErrCancel); // another option is KErrDied |
|
857 |
sendResult(KErrCancel); // similar to emit handleCancelled(); |
|
858 |
RDEBUG("calling close()", 0); |
|
859 |
err = close(); |
|
860 |
RDEBUG("err", err); |
|
861 |
RDEBUG("emitting deviceDialogClosed", 0); |
|
862 |
emit deviceDialogClosed(); |
|
863 |
// RDEBUG("emit closeDeviceDialog", 0); |
|
864 |
// this is old method emit closeDeviceDialog(false); // false means "not by client", although it's not really used |
|
865 |
RDEBUG("all emited", 0); |
|
866 |
} |
|
867 |
RDEBUG("not set KSecurityUIsDismissDialog", ESecurityUIsDismissDialogDone); |
|
868 |
// can't set it because it does recursion |
|
869 |
// err = RProperty::Set(KPSUidSecurityUIs, KSecurityUIsDismissDialog, ESecurityUIsDismissDialogDone ); // clear after using it |
|
870 |
RDEBUG("err", err); |
|
871 |
||
872 |
RDEBUG("reconnect subscriberKSecurityUIsDismissDialog", 0); |
|
873 |
connect(subscriberKSecurityUIsDismissDialog, SIGNAL(contentsChanged()), this, SLOT(subscriberKSecurityUIsDismissDialogChanged())); |
|
874 |
RDEBUG("reconnected subscriberKSecurityUIsDismissDialog", 1); |
|
22
6b63ca65093a
Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
875 |
} |
30 | 876 |
RDEBUG("1", 1); |
877 |
} |