forked from qt-creator/qt-creator
QmlProject: Implement basic support for QmlFileSelector
This patch adds support for QmlFileSelector for QmlProject and Qt Quick Designer. Task-number: QDS-590 Change-Id: I0cc043d3ec9578008ec879b36fe834b70fb8c5ad Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -225,6 +225,13 @@ QStringList QmlProject::customImportPaths() const
|
||||
return {};
|
||||
}
|
||||
|
||||
QStringList QmlProject::customFileSelectors() const
|
||||
{
|
||||
if (m_projectItem)
|
||||
return m_projectItem.data()->fileSelectors();
|
||||
return {};
|
||||
}
|
||||
|
||||
bool QmlProject::addFiles(const QStringList &filePaths)
|
||||
{
|
||||
QStringList toAdd;
|
||||
@@ -256,6 +263,13 @@ QStringList QmlProject::makeAbsolute(const Utils::FileName &path, const QStringL
|
||||
});
|
||||
}
|
||||
|
||||
QVariant QmlProject::additionalData(Id id, const Target *) const
|
||||
{
|
||||
if (id == Constants::customFileSelectorsData)
|
||||
return customFileSelectors();
|
||||
return {};
|
||||
}
|
||||
|
||||
void QmlProject::refreshFiles(const QSet<QString> &/*added*/, const QSet<QString> &removed)
|
||||
{
|
||||
refresh(Files);
|
||||
|
Reference in New Issue
Block a user