diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2011-09-28 07:23:28 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2011-09-28 07:54:15 (GMT) |
commit | eef7c0674d667e1a932a58944a80a0046d08445a (patch) | |
tree | 81ba3b3411ee3bbc312f2f3b78bebbdb4c8b53ec /src/gui | |
parent | 5f161591b6ae25524b129bf4a41d6438f0a4d402 (diff) | |
download | Qt-eef7c0674d667e1a932a58944a80a0046d08445a.zip Qt-eef7c0674d667e1a932a58944a80a0046d08445a.tar.gz Qt-eef7c0674d667e1a932a58944a80a0046d08445a.tar.bz2 |
Fix building against older Symbian^3 environments
R_AVKON_DISCREET_POPUP_TEXT_COPIED is missing from some older Symbian^3
environments, so define it explicitly. Also do not attempt to show
the popup unless running against newer versions.
Reviewed-by: Sami Merila
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index e7084ac..3546079 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -94,6 +94,11 @@ #define QT_EPSUidAknFep 0x100056de #define QT_EAknFepTouchInputActive 0x00000004 +// For compatibility with older Symbian^3 environments, which do not have this define yet. +#ifndef R_AVKON_DISCREET_POPUP_TEXT_COPIED +#define R_AVKON_DISCREET_POPUP_TEXT_COPIED 0x8cc0227 +#endif + _LIT(KAvkonResourceFile, "z:\\resource\\avkon.rsc" ); QT_BEGIN_NAMESPACE @@ -1624,11 +1629,13 @@ void QCoeFepInputContext::copyOrCutTextToClipboard(const char *operation) if (cursor != anchor) { if (ccpuInvokeSlot(w, focusObject, operation)) { - TRAP_IGNORE( - CAknDiscreetPopup::ShowGlobalPopupL( - R_AVKON_DISCREET_POPUP_TEXT_COPIED, - KAvkonResourceFile); - ) + if (QSysInfo::symbianVersion() > QSysInfo::SV_SF_3) { + TRAP_IGNORE( + CAknDiscreetPopup::ShowGlobalPopupL( + R_AVKON_DISCREET_POPUP_TEXT_COPIED, + KAvkonResourceFile); + ) + } } } } |