diff options
Diffstat (limited to 'src/declarative/qml')
-rw-r--r-- | src/declarative/qml/qmlengine.cpp | 15 | ||||
-rw-r--r-- | src/declarative/qml/qmlengine.h | 3 | ||||
-rw-r--r-- | src/declarative/qml/qmlengine_p.h | 1 | ||||
-rw-r--r-- | src/declarative/qml/qmlnetworkaccessmanagerfactory.cpp | 14 | ||||
-rw-r--r-- | src/declarative/qml/qmlnetworkaccessmanagerfactory.h | 6 |
5 files changed, 2 insertions, 37 deletions
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index a33aea7..8b52684 100644 --- a/src/declarative/qml/qmlengine.cpp +++ b/src/declarative/qml/qmlengine.cpp @@ -122,7 +122,7 @@ QmlEnginePrivate::QmlEnginePrivate(QmlEngine *e) contextClass(0), sharedContext(0), sharedScope(0), objectClass(0), valueTypeClass(0), globalClass(0), cleanup(0), erroredBindings(0), inProgressCreations(0), scriptEngine(this), workerScriptEngine(0), componentAttacheds(0), inBeginCreate(false), - networkAccessManager(0), networkAccessManagerFactory(0), accessManagerValid(false), + networkAccessManager(0), networkAccessManagerFactory(0), typeManager(e), uniqueId(1) { globalClass = new QmlGlobalScriptClass(&scriptEngine); @@ -412,12 +412,6 @@ QmlNetworkAccessManagerFactory *QmlEngine::networkAccessManagerFactory() const return d->networkAccessManagerFactory; } -void QmlEngine::namInvalidated() -{ - Q_D(QmlEngine); - d->accessManagerValid = false; -} - /*! Returns a common QNetworkAccessManager which can be used by any QML element instantiated by this engine. @@ -432,19 +426,12 @@ void QmlEngine::namInvalidated() QNetworkAccessManager *QmlEngine::networkAccessManager() const { Q_D(const QmlEngine); - if (!d->accessManagerValid) { - delete d->networkAccessManagerFactory; - d->networkAccessManagerFactory = 0; - } if (!d->networkAccessManager) { if (d->networkAccessManagerFactory) { - connect(d->networkAccessManagerFactory, SIGNAL(invalidated()) - , this, SLOT(namInvalidated()), Qt::UniqueConnection); d->networkAccessManager = d->networkAccessManagerFactory->create(const_cast<QmlEngine*>(this)); } else { d->networkAccessManager = new QNetworkAccessManager(const_cast<QmlEngine*>(this)); } - d->accessManagerValid = true; } return d->networkAccessManager; } diff --git a/src/declarative/qml/qmlengine.h b/src/declarative/qml/qmlengine.h index b9ec277..7ee014a 100644 --- a/src/declarative/qml/qmlengine.h +++ b/src/declarative/qml/qmlengine.h @@ -95,9 +95,6 @@ public: Q_SIGNALS: void quit (); -private Q_SLOTS: - void namInvalidated(); - private: Q_DECLARE_PRIVATE(QmlEngine) }; diff --git a/src/declarative/qml/qmlengine_p.h b/src/declarative/qml/qmlengine_p.h index 6f62b40..ddb25a0 100644 --- a/src/declarative/qml/qmlengine_p.h +++ b/src/declarative/qml/qmlengine_p.h @@ -211,7 +211,6 @@ public: bool inBeginCreate; mutable QNetworkAccessManager *networkAccessManager; mutable QmlNetworkAccessManagerFactory *networkAccessManagerFactory; - mutable bool accessManagerValid; QmlCompositeTypeManager typeManager; QStringList fileImportPath; diff --git a/src/declarative/qml/qmlnetworkaccessmanagerfactory.cpp b/src/declarative/qml/qmlnetworkaccessmanagerfactory.cpp index 6ae20de..76f20d8 100644 --- a/src/declarative/qml/qmlnetworkaccessmanagerfactory.cpp +++ b/src/declarative/qml/qmlnetworkaccessmanagerfactory.cpp @@ -76,18 +76,4 @@ QmlNetworkAccessManagerFactory::~QmlNetworkAccessManagerFactory() implementation of this method is reentrant. */ -/*! - Invalidates all currently created QNetworkAccessManager(s) which - will cause create() to be called for subsequent network access. -*/ -void QmlNetworkAccessManagerFactory::invalidate() -{ - emit invalidated(); -} - -/*! - \internal - \fn QmlNetworkAccessManagerFactory::invalidated() -*/ - QT_END_NAMESPACE diff --git a/src/declarative/qml/qmlnetworkaccessmanagerfactory.h b/src/declarative/qml/qmlnetworkaccessmanagerfactory.h index f64918b..ce9860f 100644 --- a/src/declarative/qml/qmlnetworkaccessmanagerfactory.h +++ b/src/declarative/qml/qmlnetworkaccessmanagerfactory.h @@ -51,16 +51,12 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QNetworkAccessManager; -class Q_DECLARATIVE_EXPORT QmlNetworkAccessManagerFactory : public QObject +class Q_DECLARATIVE_EXPORT QmlNetworkAccessManagerFactory { - Q_OBJECT public: virtual ~QmlNetworkAccessManagerFactory(); - void invalidate(); virtual QNetworkAccessManager *create(QObject *parent) = 0; -Q_SIGNALS: - void invalidated(); }; QT_END_NAMESPACE |