Changeset View
Changeset View
Standalone View
Standalone View
vcs/widgets/vcsdiffpatchsources.cpp
Show First 20 Lines • Show All 201 Lines • ▼ Show 20 Line(s) | 180 | { | |||
---|---|---|---|---|---|
202 | m_depth = vcsdiff.depth(); | 202 | m_depth = vcsdiff.depth(); | ||
203 | 203 | | |||
204 | emit patchChanged(); | 204 | emit patchChanged(); | ||
205 | } | 205 | } | ||
206 | 206 | | |||
207 | void VCSDiffPatchSource::update() { | 207 | void VCSDiffPatchSource::update() { | ||
208 | if(!m_updater) | 208 | if(!m_updater) | ||
209 | return; | 209 | return; | ||
210 | m_updater->setContextLines(m_contextLines == 0? INT_MAX : m_contextLines); | ||||
210 | updateFromDiff(m_updater->update()); | 211 | updateFromDiff(m_updater->update()); | ||
211 | } | 212 | } | ||
212 | 213 | | |||
213 | VCSCommitDiffPatchSource::~VCSCommitDiffPatchSource() { | 214 | VCSCommitDiffPatchSource::~VCSCommitDiffPatchSource() { | ||
214 | delete m_commitMessageWidget.data(); | 215 | delete m_commitMessageWidget.data(); | ||
215 | } | 216 | } | ||
216 | 217 | | |||
217 | bool VCSCommitDiffPatchSource::canSelectFiles() const { | 218 | bool VCSCommitDiffPatchSource::canSelectFiles() const { | ||
▲ Show 20 Lines • Show All 72 Lines • ▼ Show 20 Line(s) | 285 | { | |||
290 | } else { | 291 | } else { | ||
291 | qWarning() << "Patch review plugin not found"; | 292 | qWarning() << "Patch review plugin not found"; | ||
292 | return false; | 293 | return false; | ||
293 | } | 294 | } | ||
294 | } | 295 | } | ||
295 | 296 | | |||
296 | VcsDiff VCSStandardDiffUpdater::update() const | 297 | VcsDiff VCSStandardDiffUpdater::update() const | ||
297 | { | 298 | { | ||
299 | m_vcs->setDiffContextLines(m_contextLines); | ||||
298 | QScopedPointer<VcsJob> diffJob(m_vcs->diff(m_url, | 300 | QScopedPointer<VcsJob> diffJob(m_vcs->diff(m_url, | ||
299 | KDevelop::VcsRevision::createSpecialRevision(KDevelop::VcsRevision::Base), | 301 | KDevelop::VcsRevision::createSpecialRevision(KDevelop::VcsRevision::Base), | ||
300 | KDevelop::VcsRevision::createSpecialRevision(KDevelop::VcsRevision::Working))); | 302 | KDevelop::VcsRevision::createSpecialRevision(KDevelop::VcsRevision::Working))); | ||
301 | const bool success = diffJob ? diffJob->exec() : false; | 303 | const bool success = diffJob ? diffJob->exec() : false; | ||
302 | if (!success) { | 304 | if (!success) { | ||
303 | KMessageBox::error(nullptr, i18n("Could not create a patch for the current version.")); | 305 | KMessageBox::error(nullptr, i18n("Could not create a patch for the current version.")); | ||
304 | return {}; | 306 | return {}; | ||
305 | } | 307 | } | ||
Show All 13 Lines |