From 31467e8649979d06ea2f676768016e6a147eadb9 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Tue, 6 Mar 2012 18:03:33 +1000 Subject: Allow threaded compilation in an async Loader Enables threaded compilation for a Loader "source". Change-Id: I2d60a3ace07aab58f3b8f069e45a2864178c959f Reviewed-by: Chris Adams --- src/qml/qml/qqmlcomponent.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/qml/qml/qqmlcomponent.h') diff --git a/src/qml/qml/qqmlcomponent.h b/src/qml/qml/qqmlcomponent.h index 1265fb1c7d..9fc9388e41 100644 --- a/src/qml/qml/qqmlcomponent.h +++ b/src/qml/qml/qqmlcomponent.h @@ -73,10 +73,15 @@ class Q_QML_EXPORT QQmlComponent : public QObject Q_PROPERTY(QUrl url READ url CONSTANT) public: + Q_ENUMS(CompilationMode) + enum CompilationMode { PreferSynchronous, Asynchronous }; + QQmlComponent(QObject *parent = 0); QQmlComponent(QQmlEngine *, QObject *parent=0); QQmlComponent(QQmlEngine *, const QString &fileName, QObject *parent = 0); + QQmlComponent(QQmlEngine *, const QString &fileName, CompilationMode mode, QObject *parent = 0); QQmlComponent(QQmlEngine *, const QUrl &url, QObject *parent = 0); + QQmlComponent(QQmlEngine *, const QUrl &url, CompilationMode mode, QObject *parent = 0); virtual ~QQmlComponent(); Q_ENUMS(Status) @@ -108,6 +113,7 @@ public: public Q_SLOTS: void loadUrl(const QUrl &url); + void loadUrl(const QUrl &url, CompilationMode mode); void setData(const QByteArray &, const QUrl &baseUrl); Q_SIGNALS: -- cgit v1.2.3