summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qt_s60_p.h
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-09-30 09:41:09 (GMT)
committeraxis <qt-info@nokia.com>2009-09-30 13:31:26 (GMT)
commit5dadf715a40189c94235e8445dc79f0270b0a87e (patch)
tree5577577134b817147772b3209f844e947c51e3a8 /src/gui/kernel/qt_s60_p.h
parent8c4b3937511c8e960f9c03f1c711005aef49d982 (diff)
downloadQt-5dadf715a40189c94235e8445dc79f0270b0a87e.zip
Qt-5dadf715a40189c94235e8445dc79f0270b0a87e.tar.gz
Qt-5dadf715a40189c94235e8445dc79f0270b0a87e.tar.bz2
Fixed some focus issues on Symbian.
There are really two bugs that are fixed in this commit: - SetFocus() in Symbian does not automatically clear focus on the previously focused control, so we have to remember that control and clear it ourselves. - Symbian assumes that it is always the control at the top of the control stack that should have focus, and if this isn't the case, focus may or may not work depending on whether Symbian has had a chance to reset the focus or not. Therefore, whenever we change focus on a control, we have to also readd that control to the top of the stack, to ensure that it stays focused. RevBy: Janne Anttila
Diffstat (limited to 'src/gui/kernel/qt_s60_p.h')
-rw-r--r--src/gui/kernel/qt_s60_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h
index 0d48634..92e695f 100644
--- a/src/gui/kernel/qt_s60_p.h
+++ b/src/gui/kernel/qt_s60_p.h
@@ -157,6 +157,8 @@ public:
void setIgnoreFocusChanged(bool enabled) { m_ignoreFocusChanged = enabled; }
void CancelLongTapTimer();
+ void setFocusSafely(bool focus);
+
protected:
void Draw(const TRect& aRect) const;
void SizeChanged();
@@ -174,6 +176,9 @@ private:
#endif
private:
+ static QSymbianControl *lastFocusedControl;
+
+private:
QWidget *qwidget;
bool m_ignoreFocusChanged;
QLongTapTimer* m_longTapDetector;