forked from qt-creator/qt-creator
		
	QmlDesigner: Add isSameModule to Import
Change-Id: I5d06ad83adcd48b311d9c270ffcc5d1cf85e3afa Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
		| @@ -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()); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user