MCPcopy Create free account
hub / github.com/KDE/kdevelop / documentUrlChanged

Method documentUrlChanged

kdevplatform/shell/problemmodel.cpp:358–371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356}
357
358void ProblemModel::documentUrlChanged(IDocument* document, const QUrl& previousUrl)
359{
360 Q_D(ProblemModel);
361
362 Q_ASSERT(thread() == QThread::currentThread());
363
364 const auto currentDocument = d->m_problems->currentDocument();
365 // If currentDocument.isEmpty(), the renamed document must have been closed already in
366 // DocumentControllerPrivate::changeDocumentUrl() because of a conflict with another open modified document at its
367 // new URL; another document at document->url() should be active now. So set the active document's URL as current.
368 if (currentDocument.isEmpty() || currentDocument == IndexedString{previousUrl}) {
369 setCurrentDocument(document);
370 }
371}
372
373void ProblemModel::setShowImports(bool showImports)
374{

Callers

nothing calls this directly

Calls 2

threadFunction · 0.85
isEmptyMethod · 0.45

Tested by

no test coverage detected