Vcs: in VcsBaseClient use functors to create log/diff parameter widgets

Also API of VcsBaseEditorParameterWidget was changed to take benefit of C++11 lambdas.
Slot executeCommand() is no longer virtual and only fires signal commandExecutionRequested().
The Vcs client just has to bind a lambda to this signal instead of some boiler-plate code
like keeping track of the arguments of diff/log with "struct XxxDiffParameters", etc.

Change-Id: I347c97d84a8324e9c661df4e6d9a6075980b020f
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Hugues Delorme
2015-01-20 17:42:16 +01:00
parent 3956fab1dd
commit 4b5d2ccef7
11 changed files with 157 additions and 321 deletions

View File

@@ -80,10 +80,12 @@ public:
virtual QStringList arguments() const;
public slots:
virtual void executeCommand();
virtual void handleArgumentsChanged();
void handleArgumentsChanged();
void executeCommand();
signals:
void commandExecutionRequested();
// Trigger a re-run to show changed output according to new argument list.
void argumentsChanged();