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

Method openScratchDocument

plugins/scratchpad/scratchpad.cpp:295–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293}
294
295void Scratchpad::openScratchDocument(const QString& scratchFilePath, const QString& scratchFileName)
296{
297 auto* const document = core()->documentController()->openDocument(QUrl::fromLocalFile(scratchFilePath));
298 if (document) {
299 document->setPrettyName(i18nc("prefix to distinguish scratch tabs", "scratch:%1", scratchFileName));
300 } else {
301 qCWarning(PLUGIN_SCRATCHPAD) << "could not open scratch document at" << scratchFilePath;
302 }
303}
304
305#include "scratchpad.moc"
306#include "moc_scratchpad.cpp"

Callers

nothing calls this directly

Calls 3

documentControllerMethod · 0.80
openDocumentMethod · 0.45
setPrettyNameMethod · 0.45

Tested by

no test coverage detected