Core: Use FileName for file path in IDocument

Change-Id: I85f7398aee59d0d36f0e5c3bf88ff3c96002e394
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2014-12-21 21:54:30 +02:00
committed by Orgad Shaneh
parent 9c1b28fec2
commit c6a983d271
123 changed files with 327 additions and 324 deletions

View File

@@ -157,7 +157,7 @@ QString QbsProject::displayName() const
IDocument *QbsProject::document() const
{
foreach (IDocument *doc, m_qbsDocuments) {
if (doc->filePath() == m_fileName)
if (doc->filePath().toString() == m_fileName)
return doc;
}
QTC_ASSERT(false, return 0);
@@ -211,7 +211,7 @@ public:
: m_document(0)
{
foreach (Core::IDocument * const doc, documents) {
if (doc->filePath() == filePath) {
if (doc->filePath().toString() == filePath) {
m_document = doc;
break;
}
@@ -226,7 +226,7 @@ public:
{
QTC_ASSERT(m_document, return);
Core::DocumentManager::addDocument(m_document);
Core::DocumentManager::unexpectFileChange(m_document->filePath());
Core::DocumentManager::unexpectFileChange(m_document->filePath().toString());
}
private:
@@ -658,7 +658,7 @@ void QbsProject::updateDocuments(const QSet<QString> &files)
QTC_ASSERT(!newFiles.isEmpty(), newFiles << m_fileName);
QSet<QString> oldFiles;
foreach (IDocument *doc, m_qbsDocuments)
oldFiles.insert(doc->filePath());
oldFiles.insert(doc->filePath().toString());
QSet<QString> filesToAdd = newFiles;
filesToAdd.subtract(oldFiles);
@@ -667,7 +667,7 @@ void QbsProject::updateDocuments(const QSet<QString> &files)
QSet<IDocument *> currentDocuments = m_qbsDocuments;
foreach (IDocument *doc, currentDocuments) {
if (filesToRemove.contains(doc->filePath())) {
if (filesToRemove.contains(doc->filePath().toString())) {
m_qbsDocuments.remove(doc);
delete doc;
}