From 37b9577f00bfba78915dfd659499efbf04acce4e Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Thu, 17 Sep 2009 14:28:16 +0200 Subject: 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 --- src/gui/kernel/qapplication_s60.cpp | 4 +++- src/gui/kernel/qcursor_s60.cpp | 6 ++++-- 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 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); + } } } } -- cgit v0.12