┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/private/kitemlistroleeditor.h
diff options
context:
space:
mode:
authorFrank Reininghaus <[email protected]>2012-11-05 22:12:45 +0100
committerFrank Reininghaus <[email protected]>2012-11-05 22:12:45 +0100
commit15faff457dd5ff609b3d6d824e0366beae1abe28 (patch)
tree518a559c977bdb116939c0b57d8977f04db916ae /src/kitemviews/private/kitemlistroleeditor.h
parentc6eb4866d8bb601d63acedd78edaf37a8c5c3c2f (diff)
parentc0559a2a1d7d66b26e1d00b4ff59c7fce8848566 (diff)
Merge remote-tracking branch 'origin/KDE/4.9'
Diffstat (limited to 'src/kitemviews/private/kitemlistroleeditor.h')
-rw-r--r--src/kitemviews/private/kitemlistroleeditor.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/kitemviews/private/kitemlistroleeditor.h b/src/kitemviews/private/kitemlistroleeditor.h
index aa2c97754..a2f705808 100644
--- a/src/kitemviews/private/kitemlistroleeditor.h
+++ b/src/kitemviews/private/kitemlistroleeditor.h
@@ -47,6 +47,15 @@ public:
void setRole(const QByteArray& role);
QByteArray role() const;
+ /**
+ * Calls deleteLater() if no event is being handled at the moment.
+ * Otherwise, the deletion is deferred until the event handling is
+ * finished. This prevents that the deletion happens inside a nested
+ * event loop which might be run in contextMenuEvent() or
+ * mouseMoveEvent() because this would probably cause a crash.
+ */
+ void deleteWhenIdle();
+
virtual bool eventFilter(QObject* watched, QEvent* event);
signals:
@@ -55,6 +64,7 @@ signals:
protected:
virtual bool event(QEvent* event);
+ virtual bool viewportEvent(QEvent* event);
virtual void keyPressEvent(QKeyEvent* event);
private slots:
@@ -75,6 +85,8 @@ private:
int m_index;
QByteArray m_role;
bool m_blockFinishedSignal;
+ int m_eventHandlingLevel;
+ bool m_deleteAfterEventHandling;
};
#endif