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

Method StashPatchSource

plugins/git/stashpatchsource.cpp:19–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17using namespace KDevelop;
18
19StashPatchSource::StashPatchSource(const QString& stashName, GitPlugin* plugin, const QDir & baseDir)
20 : m_stashName(stashName), m_plugin(plugin), m_baseDir(baseDir)
21{
22 QTemporaryFile tempFile;
23
24 tempFile.setAutoRemove(false);
25 tempFile.open();
26 m_patchFile = QUrl::fromLocalFile(tempFile.fileName());
27
28 auto job = qobject_cast<KDevelop::DVcsJob*>(m_plugin->gitStash(m_baseDir, QStringList{QStringLiteral("show"), QStringLiteral("-u"), m_stashName}, KDevelop::OutputJob::Silent));
29
30 connect(job, &DVcsJob::resultsReady, this, &StashPatchSource::updatePatchFile);
31 KDevelop::ICore::self()->runController()->registerJob(job);
32}
33
34StashPatchSource::~StashPatchSource()
35{

Callers

nothing calls this directly

Calls 5

gitStashMethod · 0.80
registerJobMethod · 0.80
runControllerMethod · 0.80
openMethod · 0.45
fileNameMethod · 0.45

Tested by

no test coverage detected