diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/gui.pro | 3 | ||||
-rw-r--r-- | src/gui/kernel/qgesturemanager.cpp | 10 | ||||
-rw-r--r-- | src/gui/kernel/qgesturemanager_p.h | 1 | ||||
-rw-r--r-- | src/gui/widgets/qtextedit.cpp | 2 |
4 files changed, 11 insertions, 5 deletions
diff --git a/src/gui/gui.pro b/src/gui/gui.pro index 90b5de5..4d51fa8 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -64,13 +64,12 @@ symbian { neon:*-g++* { DEFINES += QT_HAVE_NEON - QMAKE_CXXFLAGS *= -mfpu=neon HEADERS += $$NEON_HEADERS SOURCES += $$NEON_SOURCES DRAWHELPER_NEON_ASM_FILES = $$NEON_ASM - neon_compiler.commands = $$QMAKE_CXX -c + neon_compiler.commands = $$QMAKE_CXX -c -mfpu=neon neon_compiler.commands += $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} neon_compiler.dependency_type = TYPE_C neon_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)} diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp index 5e9a0cb..9519447 100644 --- a/src/gui/kernel/qgesturemanager.cpp +++ b/src/gui/kernel/qgesturemanager.cpp @@ -175,9 +175,9 @@ void QGestureManager::cleanupCachedGestures(QObject *target, Qt::GestureType typ m_activeGestures.remove(g); m_gestureOwners.remove(g); m_gestureTargets.remove(g); + m_gesturesToDelete.insert(g); } - qDeleteAll(gestures); iter = m_objectGestures.erase(iter); } else { ++iter; @@ -385,6 +385,11 @@ bool QGestureManager::filterEventThroughContexts(const QMultiMap<QObject *, recycle(gesture); m_gestureTargets.remove(gesture); } + + //Clean up the Gestures + qDeleteAll(m_gesturesToDelete); + m_gesturesToDelete.clear(); + return ret; } @@ -447,7 +452,8 @@ void QGestureManager::cancelGesturesForChildren(QGesture *original) void QGestureManager::cleanupGesturesForRemovedRecognizer(QGesture *gesture) { QGestureRecognizer *recognizer = m_deletedRecognizers.value(gesture); - Q_ASSERT(recognizer); + if(!recognizer) //The Gesture is removed while in the even loop, so the recognizers for this gestures was removed + return; m_deletedRecognizers.remove(gesture); if (m_deletedRecognizers.keys(recognizer).isEmpty()) { // no more active gestures, cleanup! diff --git a/src/gui/kernel/qgesturemanager_p.h b/src/gui/kernel/qgesturemanager_p.h index 0d84b67..a5a3482 100644 --- a/src/gui/kernel/qgesturemanager_p.h +++ b/src/gui/kernel/qgesturemanager_p.h @@ -130,6 +130,7 @@ private: QHash<QGestureRecognizer *, QSet<QGesture *> > m_obsoleteGestures; QHash<QGesture *, QGestureRecognizer *> m_deletedRecognizers; + QSet<QGesture *> m_gesturesToDelete; void cleanupGesturesForRemovedRecognizer(QGesture *gesture); QGesture *getState(QObject *widget, QGestureRecognizer *recognizer, diff --git a/src/gui/widgets/qtextedit.cpp b/src/gui/widgets/qtextedit.cpp index 4541730..6b3f444 100644 --- a/src/gui/widgets/qtextedit.cpp +++ b/src/gui/widgets/qtextedit.cpp @@ -773,7 +773,7 @@ Qt::Alignment QTextEdit::alignment() const is the document's parent object. The parent object of the provided document remains the owner of the object. - If the current document is a child of the text editor, then it is deleted. + The editor does not delete the current document, even if it is a child of the editor. \sa document() */ |