aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2016-07-13 14:08:13 +0200
committerFrederik Gladhorn <frederik.gladhorn@qt.io>2016-07-15 23:03:49 +0000
commitb845b6560df7c70a811d1ff361cbf52f0ec5cd59 (patch)
tree2bfaea3bd2e48249e0e23e6511e9ee9658c8b077 /src
parent8f19045ef5d308231716ddcb62a80cc43ebb2dd7 (diff)
move QQuickCloseEvent from qquickwindow_p.h to qquickevents_p_p.h
It seems to be the same sort of persistent event for exposure to QML. Change-Id: I4ebc48422ee517f37e300629b6d100f68b9703b3 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/quick/items/qquickevents_p_p.h17
-rw-r--r--src/quick/items/qquickwindow_p.h18
2 files changed, 17 insertions, 18 deletions
diff --git a/src/quick/items/qquickevents_p_p.h b/src/quick/items/qquickevents_p_p.h
index 39c5a060b5..065e025152 100644
--- a/src/quick/items/qquickevents_p_p.h
+++ b/src/quick/items/qquickevents_p_p.h
@@ -222,10 +222,27 @@ private:
bool _accepted;
};
+class Q_QUICK_PRIVATE_EXPORT QQuickCloseEvent : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted)
+
+public:
+ QQuickCloseEvent()
+ : _accepted(true) {}
+
+ bool isAccepted() { return _accepted; }
+ void setAccepted(bool accepted) { _accepted = accepted; }
+
+private:
+ bool _accepted;
+};
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QQuickKeyEvent)
QML_DECLARE_TYPE(QQuickMouseEvent)
QML_DECLARE_TYPE(QQuickWheelEvent)
+QML_DECLARE_TYPE(QQuickCloseEvent)
#endif // QQUICKEVENTS_P_P_H
diff --git a/src/quick/items/qquickwindow_p.h b/src/quick/items/qquickwindow_p.h
index 31fa079658..71f2bb5778 100644
--- a/src/quick/items/qquickwindow_p.h
+++ b/src/quick/items/qquickwindow_p.h
@@ -293,22 +293,6 @@ private:
static void cleanupNodesOnShutdown(QQuickItem *);
};
-class Q_QUICK_PRIVATE_EXPORT QQuickCloseEvent : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted)
-
-public:
- QQuickCloseEvent()
- : _accepted(true) {}
-
- bool isAccepted() { return _accepted; }
- void setAccepted(bool accepted) { _accepted = accepted; }
-
-private:
- bool _accepted;
-};
-
class QQuickWindowQObjectCleanupJob : public QRunnable
{
public:
@@ -326,6 +310,4 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickWindowPrivate::FocusOptions)
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QQuickCloseEvent)
-
#endif // QQUICKWINDOW_P_H