Commit 9663831b authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.Model: adding pathForImport() to model.



pathForImport() returns the plugin path for an import.

Change-Id: If066fb9a10c65d3695a590c4c6eecbe52b303a3a
Reviewed-by: default avatarMarco Bubke <marco.bubke@digia.com>
parent 1a6ff5d5
......@@ -100,6 +100,7 @@ public:
QList<Import> imports() 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);
RewriterView *rewriterView() const;
......
......@@ -1755,6 +1755,14 @@ bool Model::hasImport(const Import &import, bool ignoreAlias, bool allowHigherVe
return false;
}
QString Model::pathForImport(const Import &import)
{
if (!rewriterView())
return QString();
return rewriterView()->pathForImport(import);
}
RewriterView *Model::rewriterView() const
{
return d->rewriterView();
......
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