diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/items/qquickwindow_p.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/quick/items/qquickwindow_p.h b/src/quick/items/qquickwindow_p.h index c8f156ed37..f33e366acb 100644 --- a/src/quick/items/qquickwindow_p.h +++ b/src/quick/items/qquickwindow_p.h @@ -62,6 +62,7 @@ #include <QtCore/qthread.h> #include <QtCore/qmutex.h> #include <QtCore/qwaitcondition.h> +#include <QtCore/qrunnable.h> #include <private/qwindow_p.h> #include <private/qopengl_p.h> #include <qopenglcontext.h> @@ -287,6 +288,19 @@ private: bool _accepted; }; +class QQuickWindowQObjectCleanupJob : public QRunnable +{ +public: + QQuickWindowQObjectCleanupJob(QObject *o) : object(o) { } + void run() Q_DECL_OVERRIDE { delete object; } + QObject *object; + static void schedule(QQuickWindow *window, QObject *object) { + Q_ASSERT(window); + Q_ASSERT(object); + window->scheduleRenderJob(new QQuickWindowQObjectCleanupJob(object), QQuickWindow::AfterSynchronizingStage); + } +}; + Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickWindowPrivate::FocusOptions) QT_END_NAMESPACE |