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

Method VCSDiffPatchSource

kdevplatform/vcs/widgets/vcsdiffpatchsources.cpp:117–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117VCSDiffPatchSource::VCSDiffPatchSource(VCSDiffUpdater* updater)
118 : m_updater(updater)
119{
120 update();
121 KDevelop::IBasicVersionControl* vcs = m_updater->vcs();
122 QUrl url = m_updater->url();
123
124 QScopedPointer<VcsJob> statusJob(vcs->status(QList<QUrl>() << url));
125 QVariant varlist;
126
127 if( statusJob->exec() && statusJob->status() == VcsJob::JobSucceeded )
128 {
129 varlist = statusJob->fetchResults();
130
131 const auto vars = varlist.toList();
132 m_infos.reserve(m_infos.size() + vars.size());
133 for (const auto& var : vars) {
134 VcsStatusInfo info = var.value<KDevelop::VcsStatusInfo>();
135
136 m_infos += info;
137 if(info.state()!=VcsStatusInfo::ItemUpToDate)
138 m_selectable[info.url()] = info.state();
139 }
140 }
141 else
142 qCDebug(VCS) << "Couldn't get status for urls: " << url;
143}
144
145VCSDiffPatchSource::VCSDiffPatchSource(const KDevelop::VcsDiff& diff)
146 : m_updater(nullptr)

Callers

nothing calls this directly

Calls 9

vcsMethod · 0.80
execMethod · 0.80
urlMethod · 0.45
statusMethod · 0.45
fetchResultsMethod · 0.45
toListMethod · 0.45
reserveMethod · 0.45
sizeMethod · 0.45
stateMethod · 0.45

Tested by

no test coverage detected