forked from qt-creator/qt-creator
C++: Reduce FileName indirection
Change-Id: Ib7dfa4d3984f807985b7ce2ee0e58fb0565adc06 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
156228aeb8
commit
27a3e1c0b4
@@ -74,7 +74,7 @@ CPlusPlus::Symbol *AnalyzerUtils::findSymbolUnderCursor()
|
|||||||
widget->convertPosition(pos, &line, &column);
|
widget->convertPosition(pos, &line, &column);
|
||||||
|
|
||||||
const CPlusPlus::Snapshot &snapshot = CppTools::CppModelManager::instance()->snapshot();
|
const CPlusPlus::Snapshot &snapshot = CppTools::CppModelManager::instance()->snapshot();
|
||||||
CPlusPlus::Document::Ptr doc = snapshot.document(widget->textDocument()->filePath().toString());
|
CPlusPlus::Document::Ptr doc = snapshot.document(widget->textDocument()->filePath());
|
||||||
QTC_ASSERT(doc, return 0);
|
QTC_ASSERT(doc, return 0);
|
||||||
|
|
||||||
// fetch the expression's code
|
// fetch the expression's code
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ void CppElementEvaluator::execute()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
const Snapshot &snapshot = m_modelManager->snapshot();
|
const Snapshot &snapshot = m_modelManager->snapshot();
|
||||||
Document::Ptr doc = snapshot.document(m_editor->textDocument()->filePath().toString());
|
Document::Ptr doc = snapshot.document(m_editor->textDocument()->filePath());
|
||||||
if (!doc)
|
if (!doc)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -550,7 +550,7 @@ TextEditorWidget::Link FollowSymbolUnderCursor::findLink(const QTextCursor &curs
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Now we prefer the doc from the snapshot with macros expanded.
|
// Now we prefer the doc from the snapshot with macros expanded.
|
||||||
Document::Ptr doc = snapshot.document(m_widget->textDocument()->filePath().toString());
|
Document::Ptr doc = snapshot.document(m_widget->textDocument()->filePath());
|
||||||
if (!doc) {
|
if (!doc) {
|
||||||
doc = documentFromSemanticInfo;
|
doc = documentFromSemanticInfo;
|
||||||
if (!doc)
|
if (!doc)
|
||||||
|
|||||||
@@ -543,7 +543,7 @@ bool QtCreatorIntegration::navigateToSlot(const QString &objectName,
|
|||||||
it.next();
|
it.next();
|
||||||
const Utils::FileName &fileName = it.key();
|
const Utils::FileName &fileName = it.key();
|
||||||
if (fileName != configFileName)
|
if (fileName != configFileName)
|
||||||
newDocTable.insert(docTable.document(fileName.toString()));
|
newDocTable.insert(docTable.document(fileName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
docTable = newDocTable;
|
docTable = newDocTable;
|
||||||
|
|||||||
Reference in New Issue
Block a user