Skip to content
Snippets Groups Projects
Commit c9938fef authored by Marco Bubke's avatar Marco Bubke
Browse files

QmlDesigner: Add isSameModule to Import


Change-Id: I5d06ad83adcd48b311d9c270ffcc5d1cf85e3afa
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 737838c3
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,7 @@ public:
QString toImportString() const;
bool operator==(const Import &other) const;
bool isSameModule(const Import &other) const;
private:
Import(const QString &url, const QString &file, const QString &version, const QString &alias, const QStringList &importPaths);
......
......@@ -95,6 +95,14 @@ bool Import::operator==(const Import &other) const
return url() == other.url() && file() == other.file() && version() == other.version() && alias() == other.alias();
}
bool Import::isSameModule(const Import &other) const
{
if (isLibraryImport())
return url() == other.url();
else
return file() == other.file();
}
uint qHash(const Import &import)
{
return ::qHash(import.url()) ^ ::qHash(import.file()) ^ ::qHash(import.version()) ^ ::qHash(import.alias());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment