@@ -434,7 +434,9 @@ QCoeFepInputContext::QCoeFepInputContext(QObject *parent)
434
434
m_splitViewPreviousWindowStates(Qt::WindowNoState),
435
435
m_splitViewPreviousFocusItem(0 ),
436
436
m_ccpu(0 ),
437
- m_extendedInputCapabilities(0 )
437
+ m_extendedInputCapabilities(0 ),
438
+ m_formAccessor(0 ),
439
+ m_dummyEditor(0 )
438
440
{
439
441
m_fepState->SetObjectProvider (this );
440
442
int defaultFlags = EAknEditorFlagDefault;
@@ -476,6 +478,14 @@ QCoeFepInputContext::QCoeFepInputContext(QObject *parent)
476
478
m_pasteAction->setSoftKeyRole (QAction::NegativeSoftKey);
477
479
connect (m_copyAction, SIGNAL (triggered ()), this , SLOT (copy ()));
478
480
connect (m_pasteAction, SIGNAL (triggered ()), this , SLOT (paste ()));
481
+
482
+ // Use dummy editor to enable smiley support by default
483
+ m_dummyEditor.reset (new CEikEdwin ());
484
+ TRAPD (err, m_dummyEditor->ConstructL (CEikEdwin::EAvkonEnableSmileySupport));
485
+ if (!err) {
486
+ m_formAccessor.reset (new CAknEdwinFormAccessor (m_dummyEditor.data ()));
487
+ m_fepState->SetFormAccessor (m_formAccessor.data ());
488
+ }
479
489
}
480
490
481
491
QCoeFepInputContext::~QCoeFepInputContext ()
@@ -1328,17 +1338,25 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints)
1328
1338
}
1329
1339
m_fepState->SetNumericKeymap (static_cast <TAknEditorNumericKeymap>(flags));
1330
1340
1341
+ bool enableSmileys = false ;
1342
+
1331
1343
if (hints & ImhUrlCharactersOnly) {
1332
1344
// URL characters is everything except space, so a superset of the other restrictions
1333
1345
m_fepState->SetSpecialCharacterTableResourceId (R_AVKON_URL_SPECIAL_CHARACTER_TABLE_DIALOG);
1334
1346
} else if (hints & ImhEmailCharactersOnly) {
1335
1347
m_fepState->SetSpecialCharacterTableResourceId (R_AVKON_EMAIL_ADDR_SPECIAL_CHARACTER_TABLE_DIALOG);
1336
1348
} else if (needsCharMap) {
1337
1349
m_fepState->SetSpecialCharacterTableResourceId (R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG);
1350
+ enableSmileys = !(hints & ImhHiddenText);
1338
1351
} else {
1339
1352
m_fepState->SetSpecialCharacterTableResourceId (0 );
1340
1353
}
1341
1354
1355
+ if (enableSmileys)
1356
+ m_dummyEditor->AddFlagToUserFlags (CEikEdwin::EAvkonEnableSmileySupport);
1357
+ else
1358
+ m_dummyEditor->RemoveFlagFromUserFlags (CEikEdwin::EAvkonEnableSmileySupport);
1359
+
1342
1360
if (hints & ImhHiddenText) {
1343
1361
m_textCapabilities = TCoeInputCapabilities::EAllText | TCoeInputCapabilities::ESecretText;
1344
1362
} else {
0 commit comments