diff options
author | Janne Anttila <janne.anttila@digia.com> | 2009-10-13 07:48:17 (GMT) |
---|---|---|
committer | Janne Anttila <janne.anttila@digia.com> | 2009-10-13 07:49:00 (GMT) |
commit | 9c6e466dc09813dd4a641b2cf385f35ac99346f5 (patch) | |
tree | 365c190a6b67aa64d0c542bde688204342542b67 /src/gui/kernel/qapplication_s60.cpp | |
parent | c34ed14c2c185fcb6fee1f8091790f41270f8472 (diff) | |
download | Qt-9c6e466dc09813dd4a641b2cf385f35ac99346f5.zip Qt-9c6e466dc09813dd4a641b2cf385f35ac99346f5.tar.gz Qt-9c6e466dc09813dd4a641b2cf385f35ac99346f5.tar.bz2 |
Fixed a few compiler warnings from QtGui for Symbian.
Reviewed-by: TrustMe
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 6919292..f1bbcae 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -929,7 +929,7 @@ TTypeUid::Ptr QSymbianControl::MopSupplyObject(TTypeUid id) return CCoeControl::MopSupplyObject(id); } -void QSymbianControl::setFocusSafely(bool focus) +void QSymbianControl::setFocusSafely(bool focus, bool resetLastFocused) { // The stack hack in here is very unfortunate, but it is the only way to ensure proper // focus in Symbian. If this is not executed, the control which happens to be on @@ -939,17 +939,19 @@ void QSymbianControl::setFocusSafely(bool focus) S60->appUi()->RemoveFromStack(this); // Symbian doesn't automatically remove focus from the last focused control, so we need to // remember it and clear focus ourselves. - if (lastFocusedControl && lastFocusedControl != this) + if (resetLastFocused && lastFocusedControl && lastFocusedControl != this) lastFocusedControl->SetFocus(false); QT_TRAP_THROWING(S60->appUi()->AddToStackL(this, ECoeStackPriorityDefault + 1, ECoeStackFlagStandard)); // Note the + 1 - lastFocusedControl = this; + if (resetLastFocused) + lastFocusedControl = this; this->SetFocus(true); } else { S60->appUi()->RemoveFromStack(this); QT_TRAP_THROWING(S60->appUi()->AddToStackL(this, ECoeStackPriorityDefault, ECoeStackFlagStandard)); - lastFocusedControl = 0; + if (resetLastFocused) + lastFocusedControl = 0; this->SetFocus(false); } } |