From a3187addc5edfbacff2d4a3ae7e08efc5451bc8d Mon Sep 17 00:00:00 2001 From: Christian Kamm <christian.d.kamm@nokia.com> Date: Sun, 21 Mar 2010 09:36:54 +0100 Subject: [PATCH] QmlProjectManager: more libraryPaths -> importPaths renames. See c722282cf3e7c03f89b3454b1b77e88d15b3ed67. --- .../qml-type-descriptions/qmlproject-types.xml | 2 +- .../qmlprojectmanager/fileformat/qmlprojectitem.cpp | 6 +++--- src/plugins/qmlprojectmanager/qmlproject.cpp | 12 ++++++------ src/plugins/qmlprojectmanager/qmlproject.h | 2 +- .../qmlprojectmanager/qmlprojectrunconfiguration.cpp | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/share/qtcreator/qml-type-descriptions/qmlproject-types.xml b/share/qtcreator/qml-type-descriptions/qmlproject-types.xml index c042b164d05..1b3e35fc9cc 100644 --- a/share/qtcreator/qml-type-descriptions/qmlproject-types.xml +++ b/share/qtcreator/qml-type-descriptions/qmlproject-types.xml @@ -2,7 +2,7 @@ <module> <type name="QmlProject.Project"> <property name="sourceDirectory" type="string"/> - <property name="libraryPaths" type="string" isList="true"/> + <property name="importPaths" type="string" isList="true"/> <property name="content" type="QmlProjectItem" isList="true"/> </type> <type name="QmlProjectItem"> diff --git a/src/plugins/qmlprojectmanager/fileformat/qmlprojectitem.cpp b/src/plugins/qmlprojectmanager/fileformat/qmlprojectitem.cpp index f79d4c51ca0..0be5f30f98c 100644 --- a/src/plugins/qmlprojectmanager/fileformat/qmlprojectitem.cpp +++ b/src/plugins/qmlprojectmanager/fileformat/qmlprojectitem.cpp @@ -85,14 +85,14 @@ QStringList QmlProjectItem::importPaths() const return d->importPaths; } -void QmlProjectItem::setImportPaths(const QStringList &libraryPaths) +void QmlProjectItem::setImportPaths(const QStringList &importPaths) { Q_D(QmlProjectItem); - if (d->importPaths == libraryPaths) + if (d->importPaths == importPaths) return; - d->importPaths = libraryPaths; + d->importPaths = importPaths; emit importPathsChanged(); } diff --git a/src/plugins/qmlprojectmanager/qmlproject.cpp b/src/plugins/qmlprojectmanager/qmlproject.cpp index 5c512db9a5a..89aeba3d6ca 100644 --- a/src/plugins/qmlprojectmanager/qmlproject.cpp +++ b/src/plugins/qmlprojectmanager/qmlproject.cpp @@ -95,7 +95,7 @@ void QmlProject::parseProject(RefreshOptions options) && qobject_cast<QmlProjectItem*>(component->create())) { m_projectItem = qobject_cast<QmlProjectItem*>(component->create()); connect(m_projectItem.data(), SIGNAL(qmlFilesChanged()), this, SLOT(refreshFiles())); - connect(m_projectItem.data(), SIGNAL(libraryPathsChanged()), this, SLOT(refreshImportPaths())); + connect(m_projectItem.data(), SIGNAL(importPathsChanged()), this, SLOT(refreshImportPaths())); refreshImportPaths(); } else { Core::MessageManager *messageManager = Core::ICore::instance()->messageManager(); @@ -165,12 +165,12 @@ bool QmlProject::validProjectFile() const return !m_projectItem.isNull(); } -QStringList QmlProject::libraryPaths() const +QStringList QmlProject::importPaths() const { - QStringList libraryPaths; + QStringList importPaths; if (m_projectItem) - libraryPaths = m_projectItem.data()->importPaths(); - return libraryPaths; + importPaths = m_projectItem.data()->importPaths(); + return importPaths; } bool QmlProject::addFiles(const QStringList &filePaths) @@ -195,7 +195,7 @@ void QmlProject::refreshFiles() void QmlProject::refreshImportPaths() { - m_modelManager->setProjectImportPaths(libraryPaths()); + m_modelManager->setProjectImportPaths(importPaths()); } QString QmlProject::displayName() const diff --git a/src/plugins/qmlprojectmanager/qmlproject.h b/src/plugins/qmlprojectmanager/qmlproject.h index 6639a109c11..2df755c46a8 100644 --- a/src/plugins/qmlprojectmanager/qmlproject.h +++ b/src/plugins/qmlprojectmanager/qmlproject.h @@ -99,7 +99,7 @@ public: QDir projectDir() const; QStringList files() const; - QStringList libraryPaths() const; + QStringList importPaths() const; bool addFiles(const QStringList &filePaths); diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp index 1093eb15468..4d24791a536 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp @@ -129,9 +129,9 @@ QStringList QmlProjectRunConfiguration::viewerArguments() const args.append(m_qmlViewerArgs); // arguments from .qmlproject file - foreach (const QString &libraryPath, qmlTarget()->qmlProject()->libraryPaths()) { + foreach (const QString &importPath, qmlTarget()->qmlProject()->importPaths()) { args.append(QLatin1String("-L")); - args.append(libraryPath); + args.append(importPath); } const QString s = mainScript(); -- GitLab