diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2014-11-27 12:11:46 +0100 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@theqtcompany.com> | 2014-12-17 14:32:17 +0100 |
commit | a48adcf9be144eff9f22f30195e834f869fe19b4 (patch) | |
tree | e80ea9ea39345dbdeb060a04b95b1c46919396cc /src/libs/cplusplus/DependencyTable.cpp | |
parent | a8ece5e9b0b92b36a4b513696afcc8ca6781e447 (diff) | |
download | qt-creator-a48adcf9be144eff9f22f30195e834f869fe19b4.tar.gz |
C++: handle case-insensitive file names in the CPlusPlus::Snapshot
... by keying on Utils::FileName
Task-number: QTCREATORBUG-12390
Change-Id: Ia98afb5a9160a7fd9225a2f9e02539ff3c35ae86
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Diffstat (limited to 'src/libs/cplusplus/DependencyTable.cpp')
-rw-r--r-- | src/libs/cplusplus/DependencyTable.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/libs/cplusplus/DependencyTable.cpp b/src/libs/cplusplus/DependencyTable.cpp index 18c945d5cf..9a6743ada4 100644 --- a/src/libs/cplusplus/DependencyTable.cpp +++ b/src/libs/cplusplus/DependencyTable.cpp @@ -34,13 +34,14 @@ using namespace CPlusPlus; -QStringList DependencyTable::filesDependingOn(const QString &fileName) const +Utils::FileNameList DependencyTable::filesDependingOn(const Utils::FileName &fileName) const { + Utils::FileNameList deps; + int index = fileIndex.value(fileName, -1); if (index == -1) - return QStringList(); + return deps; - QStringList deps; for (int i = 0; i < files.size(); ++i) { const QBitArray &bits = includeMap.at(i); @@ -53,7 +54,6 @@ QStringList DependencyTable::filesDependingOn(const QString &fileName) const void DependencyTable::build(const Snapshot &snapshot) { - includesPerFile.clear(); files.clear(); fileIndex.clear(); includes.clear(); @@ -71,15 +71,14 @@ void DependencyTable::build(const Snapshot &snapshot) } for (int i = 0; i < files.size(); ++i) { - const QString fileName = files.at(i); - if (Document::Ptr doc = snapshot.document(files.at(i))) { + const Utils::FileName &fileName = files.at(i); + if (Document::Ptr doc = snapshot.document(fileName)) { QBitArray bitmap(files.size()); QList<int> directIncludes; const QStringList documentIncludes = doc->includedFiles(); - includesPerFile.insert(fileName, documentIncludes); foreach (const QString &includedFile, documentIncludes) { - int index = fileIndex.value(includedFile); + int index = fileIndex.value(Utils::FileName::fromString(includedFile)); if (index == -1) continue; |