summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@sosco.com>2009-09-17 12:28:16 (GMT)
committerShane Kearns <shane.kearns@sosco.com>2009-09-17 12:32:53 (GMT)
commit37b9577f00bfba78915dfd659499efbf04acce4e (patch)
tree76c1c50fca8776ce235a2d314818f27e878da8b3 /src
parent585a70c45d69b8abbea5f8f6ff117484247e95eb (diff)
downloadQt-37b9577f00bfba78915dfd659499efbf04acce4e.zip
Qt-37b9577f00bfba78915dfd659499efbf04acce4e.tar.gz
Qt-37b9577f00bfba78915dfd659499efbf04acce4e.tar.bz2
Fix regression after code review
The branch maintained its own set of native windows. This was commented to be a duplication of the native window list kept by QWidgetPrivate, and changed. Unfortunately, the set maintained on the branch contained only window owning controls, while the list kept by QWidgetPrivate contains all widgets that have a CCoeControl. Added a check for whether the control is window owning before using its DrawableWindow() to avoid getting a null pointer. Reviewed-by: Jason Barron
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp4
-rw-r--r--src/gui/kernel/qcursor_s60.cpp6
2 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 4573c71..6a381f5 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -1537,7 +1537,9 @@ void QApplication::restoreOverrideCursor()
QListIterator<WId> iter(QWidgetPrivate::mapper->uniqueKeys());
while (iter.hasNext()) {
CCoeControl *ctrl = iter.next();
- ctrl->DrawableWindow()->ClearPointerCursor();
+ if(ctrl->OwnsWindow()) {
+ ctrl->DrawableWindow()->ClearPointerCursor();
+ }
}
if (w)
qt_symbian_setWindowCursor(w->cursor(), w->effectiveWinId());
diff --git a/src/gui/kernel/qcursor_s60.cpp b/src/gui/kernel/qcursor_s60.cpp
index b50eb71..0d8283d 100644
--- a/src/gui/kernel/qcursor_s60.cpp
+++ b/src/gui/kernel/qcursor_s60.cpp
@@ -522,8 +522,10 @@ void qt_symbian_setGlobalCursor(const QCursor &cursor)
while(iter.hasNext())
{
CCoeControl *ctrl = iter.next();
- RWindowTreeNode *node = ctrl->DrawableWindow();
- qt_symbian_setWindowGroupCursor(cursor, *node);
+ if(ctrl->OwnsWindow()) {
+ RWindowTreeNode *node = ctrl->DrawableWindow();
+ qt_symbian_setWindowGroupCursor(cursor, *node);
+ }
}
}
}