QmlJS: Use canonical paths for matching of import directories

We rely on string comparison for detection of QML import paths. Therefore
make sure that all paths are canonical.

Change-Id: I416bc31915644a888c416d726049668b0e71f29a
Task-number: QTCREATORBUG-12902
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
Kai Koehne
2014-09-02 14:42:51 +02:00
parent ba558bc2a2
commit 9e62375b71
4 changed files with 19 additions and 10 deletions

View File

@@ -534,6 +534,7 @@ void Snapshot::insert(const Document::Ptr &document, bool allowInvalid)
void Snapshot::insertLibraryInfo(const QString &path, const LibraryInfo &info)
{
QTC_CHECK(!path.isEmpty());
QTC_CHECK(info.fingerprint() == info.calculateFingerprint());
_libraries.insert(QDir::cleanPath(path), info);
if (!info.wasFound()) return;