Commit 737838c3 authored by Marco Bubke's avatar Marco Bubke

QmlDesigner: Add usedImports and possibleImports to the model

This are dummy implementations.

Change-Id: I555ac15509350497edfdd3bdc5e5e3a2a046a496
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 14455083
......@@ -96,6 +96,8 @@ public:
// Imports:
QList<Import> imports() const;
QList<Import> possibleImports() const;
QList<Import> usedImports() const;
void changeImports(const QList<Import> &importsToBeAdded, const QList<Import> &importsToBeRemoved);
bool hasImport(const Import &import, bool ignoreAlias = true, bool allowHigherVersion = false);
QString pathForImport(const Import &import);
......
......@@ -1729,6 +1729,27 @@ QList<Import> Model::imports() const
return d->imports();
}
QList<Import> Model::possibleImports() const
{
QList<Import> possibleImportList;
possibleImportList.append(Import::createLibraryImport("QtQuick", "2.1"));
possibleImportList.append(Import::createLibraryImport("QtQuick.Controls", "1.0"));
possibleImportList.append(Import::createLibraryImport("QtQuick.Layouts", "1.0"));
possibleImportList.append(Import::createLibraryImport("QtQuick.Window", "2.0"));
return possibleImportList;
}
QList<Import> Model::usedImports() const
{
QList<Import> usedImportList;
usedImportList.append(Import::createLibraryImport("QtQuick"));
return usedImportList;
}
void Model::changeImports(const QList<Import> &importsToBeAdded, const QList<Import> &importsToBeRemoved)
{
d->changeImports(importsToBeAdded, importsToBeRemoved);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment