forked from qt-creator/qt-creator
move text document for file path convenience function
Move it from language client utils to a static function inside the text document. Change-Id: I91bc72d0e978c1d843082e12bb8a0fa60a1bbc5e Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -361,11 +361,8 @@ TextMarkRegistry::TextMarkRegistry(QObject *parent)
|
||||
void TextMarkRegistry::add(TextMark *mark)
|
||||
{
|
||||
instance()->m_marks[mark->fileName()].insert(mark);
|
||||
auto document = qobject_cast<TextDocument *>(
|
||||
DocumentModel::documentForFilePath(mark->fileName().toString()));
|
||||
if (!document)
|
||||
return;
|
||||
document->addMark(mark);
|
||||
if (TextDocument *document = TextDocument::textDocumentForFileName(mark->fileName()))
|
||||
document->addMark(mark);
|
||||
}
|
||||
|
||||
bool TextMarkRegistry::remove(TextMark *mark)
|
||||
|
||||
Reference in New Issue
Block a user