C++: handle case-insensitive file names in the WorkingCopy

... by keying on Utils::FileName

Task-number: QTCREATORBUG-12390
Change-Id: Ia1a59d2e422b4f92300ac6a8e0e52dd7456a6e70
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
Erik Verbruggen
2014-11-27 10:49:18 +01:00
committed by Nikolai Kosjar
parent e3977de08e
commit be4a030696
8 changed files with 45 additions and 19 deletions

View File

@@ -537,12 +537,14 @@ bool QtCreatorIntegration::navigateToSlot(const QString &objectName,
} else {
const CppTools::WorkingCopy workingCopy =
CppTools::CppModelManager::instance()->workingCopy();
QHashIterator<QString, QPair<QByteArray, unsigned> > it = workingCopy.iterator();
const Utils::FileName configFileName =
Utils::FileName::fromString(CppTools::CppModelManager::configurationFileName());
QHashIterator<Utils::FileName, QPair<QByteArray, unsigned> > it = workingCopy.iterator();
while (it.hasNext()) {
it.next();
const QString fileName = it.key();
if (fileName != CppTools::CppModelManager::configurationFileName())
newDocTable.insert(docTable.document(fileName));
const Utils::FileName &fileName = it.key();
if (fileName != configFileName)
newDocTable.insert(docTable.document(fileName.toString()));
}
}
docTable = newDocTable;