forked from qt-creator/qt-creator
Diff/Vcs: Use a function object for reloading
Helps with slimming down the user code side. Change-Id: I4b0aac76c0d1516eb05bff9c18594e64f8b41a7a Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -175,13 +175,13 @@ public:
|
||||
: VcsBaseDiffEditorController(document), m_authenticationOptions(authOptions)
|
||||
{
|
||||
forceContextLineCount(3); // SVN cannot change that when using internal diff
|
||||
setReloader([this] { m_changeNumber ? requestDescription() : requestDiff(); });
|
||||
}
|
||||
|
||||
void setFilesList(const QStringList &filesList);
|
||||
void setChangeNumber(int changeNumber);
|
||||
|
||||
protected:
|
||||
void reload() override;
|
||||
void processCommandOutput(const QString &output) override;
|
||||
|
||||
private:
|
||||
@@ -242,15 +242,6 @@ void SubversionDiffEditorController::requestDiff()
|
||||
runCommand(QList<QStringList>() << args, 0);
|
||||
}
|
||||
|
||||
void SubversionDiffEditorController::reload()
|
||||
{
|
||||
if (m_changeNumber) {
|
||||
requestDescription();
|
||||
} else {
|
||||
requestDiff();
|
||||
}
|
||||
}
|
||||
|
||||
void SubversionDiffEditorController::processCommandOutput(const QString &output)
|
||||
{
|
||||
QTC_ASSERT(m_state != Idle, return);
|
||||
|
||||
Reference in New Issue
Block a user