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

Method runSelectedScratch

plugins/scratchpad/scratchpadview.cpp:189–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189void ScratchpadView::runSelectedScratch()
190{
191 const auto sourceIndex = proxyModel()->mapToSource(currentIndex());
192 if (auto* document = KDevelop::ICore::self()->documentController()->documentForUrl(
193 QUrl::fromLocalFile(sourceIndex.data(Scratchpad::FullPathRole).toString()))) {
194 if (!document->save()) {
195 return; // canceled by the user
196 }
197 }
198 m_scratchpad->setCommand(sourceIndex, commandWidget->text());
199 m_scratchpad->runScratch(sourceIndex);
200}
201
202void ScratchpadView::scratchActivated(const QModelIndex& index)
203{

Callers

nothing calls this directly

Calls 9

documentForUrlMethod · 0.80
documentControllerMethod · 0.80
runScratchMethod · 0.80
mapToSourceMethod · 0.45
toStringMethod · 0.45
dataMethod · 0.45
saveMethod · 0.45
setCommandMethod · 0.45
textMethod · 0.45

Tested by

no test coverage detected