diff --git a/src/plugins/qmlprojectmanager/fileformat/qmlprojectitem.cpp b/src/plugins/qmlprojectmanager/fileformat/qmlprojectitem.cpp index ee2c94c0f1bce121f2ce1a6cd75ada4e7fde3131..f79d4c51ca089d616a8d1eb2e513df2d2d626bf8 100644 --- a/src/plugins/qmlprojectmanager/fileformat/qmlprojectitem.cpp +++ b/src/plugins/qmlprojectmanager/fileformat/qmlprojectitem.cpp @@ -9,7 +9,7 @@ class QmlProjectItemPrivate : public QObject { public: QString sourceDirectory; - QStringList libraryPaths; + QStringList importPaths; QList<QmlFileFilterItem*> qmlFileFilters() const; @@ -79,21 +79,21 @@ void QmlProjectItem::setSourceDirectory(const QString &directoryPath) emit sourceDirectoryChanged(); } -QStringList QmlProjectItem::libraryPaths() const +QStringList QmlProjectItem::importPaths() const { Q_D(const QmlProjectItem); - return d->libraryPaths; + return d->importPaths; } -void QmlProjectItem::setLibraryPaths(const QStringList &libraryPaths) +void QmlProjectItem::setImportPaths(const QStringList &libraryPaths) { Q_D(QmlProjectItem); - if (d->libraryPaths == libraryPaths) + if (d->importPaths == libraryPaths) return; - d->libraryPaths = libraryPaths; - emit libraryPathsChanged(); + d->importPaths = libraryPaths; + emit importPathsChanged(); } /* Returns list of absolute paths */ diff --git a/src/plugins/qmlprojectmanager/fileformat/qmlprojectitem.h b/src/plugins/qmlprojectmanager/fileformat/qmlprojectitem.h index e68b58ab8b628660d2487382cc2ee2ba98f4f9f8..1271146aaaf5f8f331442a34818fbbbdaf6d02bd 100644 --- a/src/plugins/qmlprojectmanager/fileformat/qmlprojectitem.h +++ b/src/plugins/qmlprojectmanager/fileformat/qmlprojectitem.h @@ -24,7 +24,7 @@ class QmlProjectItem : public QObject { Q_PROPERTY(QDeclarativeListProperty<QmlProjectManager::QmlProjectContentItem> content READ content DESIGNABLE false) Q_PROPERTY(QString sourceDirectory READ sourceDirectory NOTIFY sourceDirectoryChanged) - Q_PROPERTY(QStringList libraryPaths READ libraryPaths WRITE setLibraryPaths NOTIFY libraryPathsChanged) + Q_PROPERTY(QStringList importPaths READ importPaths WRITE setImportPaths NOTIFY importPathsChanged) Q_CLASSINFO("DefaultProperty", "content"); @@ -37,8 +37,8 @@ public: QString sourceDirectory() const; void setSourceDirectory(const QString &directoryPath); - QStringList libraryPaths() const; - void setLibraryPaths(const QStringList &paths); + QStringList importPaths() const; + void setImportPaths(const QStringList &paths); QStringList files() const; bool matchesFile(const QString &filePath) const; @@ -46,7 +46,7 @@ public: signals: void qmlFilesChanged(); void sourceDirectoryChanged(); - void libraryPathsChanged(); + void importPathsChanged(); protected: QmlProjectItemPrivate *d_ptr; diff --git a/src/plugins/qmlprojectmanager/qmlproject.cpp b/src/plugins/qmlprojectmanager/qmlproject.cpp index ccbb81e6c004c30648ce988b72aa46a6be1aa159..5c512db9a5a6a856bd6c67cd70021c7ccb646c37 100644 --- a/src/plugins/qmlprojectmanager/qmlproject.cpp +++ b/src/plugins/qmlprojectmanager/qmlproject.cpp @@ -169,7 +169,7 @@ QStringList QmlProject::libraryPaths() const { QStringList libraryPaths; if (m_projectItem) - libraryPaths = m_projectItem.data()->libraryPaths(); + libraryPaths = m_projectItem.data()->importPaths(); return libraryPaths; } diff --git a/tests/auto/qml/qmlprojectmanager/fileformat/tst_fileformat.cpp b/tests/auto/qml/qmlprojectmanager/fileformat/tst_fileformat.cpp index fc9828d70ae6def7f39e518401cb5217e3742889..a5f7598b83068047ee16ed2b2660cda74c2cbf96 100644 --- a/tests/auto/qml/qmlprojectmanager/fileformat/tst_fileformat.cpp +++ b/tests/auto/qml/qmlprojectmanager/fileformat/tst_fileformat.cpp @@ -250,7 +250,7 @@ void TestProject::testLibraryPaths() QString projectFile = QLatin1String( "import QmlProject 1.0\n" "Project {\n" - " libraryPaths: [ \"../otherLibrary\", \"library\" ]\n" + " importPaths: [ \"../otherLibrary\", \"library\" ]\n" "}\n"); { @@ -268,7 +268,7 @@ void TestProject::testLibraryPaths() QStringList expectedPaths(QStringList() << "../otherLibrary" << "library"); - QCOMPARE(project->libraryPaths().toSet(), expectedPaths.toSet()); + QCOMPARE(project->importPaths().toSet(), expectedPaths.toSet()); } }