From: Matthew Vogt Date: Tue, 29 May 2012 01:01:59 +0000 (+1000) Subject: Remove obsolete overload of QQmlEngine::importPlugin() X-Git-Tag: 071012131707~274 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=64d0e68cfe83f7f67d5e306ae91fb9bb7b293752;p=profile%2Fivi%2Fqtdeclarative.git Remove obsolete overload of QQmlEngine::importPlugin() Task-number: QTBUG-25122 Change-Id: I63fb462192e6d8292c00755a7d37e72e9110293a Reviewed-by: Martin Jones --- diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index 2634145..beaa6d7 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -1647,31 +1647,6 @@ bool QQmlEngine::importPlugin(const QString &filePath, const QString &uri, QList } /*! - Imports the plugin named \a filePath with the \a uri provided. - Returns true if the plugin was successfully imported; otherwise returns false. - - On failure and if non-null, *\a errorString will be set to a message describing the failure. - - The plugin has to be a Qt plugin which implements the QQmlExtensionPlugin interface. -*/ -bool QQmlEngine::importPlugin(const QString &filePath, const QString &uri, QString *errorString) -{ - Q_D(QQmlEngine); - QList errors; - bool retn = d->importDatabase.importPlugin(filePath, uri, &errors); - if (!errors.isEmpty()) { - QString builtError; - for (int i = 0; i < errors.size(); ++i) { - builtError = QString(QLatin1String("%1\n %2")) - .arg(builtError) - .arg(errors.at(i).toString()); - } - *errorString = builtError; - } - return retn; -} - -/*! \property QQmlEngine::offlineStoragePath \brief the directory for storing offline user data diff --git a/src/qml/qml/qqmlengine.h b/src/qml/qml/qqmlengine.h index 2bca3c1..5b6d367 100644 --- a/src/qml/qml/qqmlengine.h +++ b/src/qml/qml/qqmlengine.h @@ -114,7 +114,6 @@ public: bool addNamedBundle(const QString &name, const QString &fileName); - bool importPlugin(const QString &filePath, const QString &uri, QString *errorString); // XXX: Qt 5: Remove this function bool importPlugin(const QString &filePath, const QString &uri, QList *errors); void setNetworkAccessManagerFactory(QQmlNetworkAccessManagerFactory *);