diff options
| author | Orgad Shaneh <[email protected]> | 2016-11-26 21:52:49 +0200 |
|---|---|---|
| committer | Orgad Shaneh <[email protected]> | 2016-11-28 09:38:12 +0000 |
| commit | 5832f52ceefb9ee19842af4513ae00ee7d311e31 (patch) | |
| tree | 0ed1a117b154151354b2d4b7036dde81ffe7b0ac /src/plugins/git/gitplugin.cpp | |
| parent | 565aed03a24e315847421272d582b7fd3b7ff04d (diff) | |
VCS: Replace describe slots with lambdas
Change-Id: I05ca25aad8be43fdfa15d3fb5eaaa9bf753ee79f
Reviewed-by: Tobias Hunger <[email protected]>
Diffstat (limited to 'src/plugins/git/gitplugin.cpp')
| -rw-r--r-- | src/plugins/git/gitplugin.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index 90498282351..71476bb940e 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -285,11 +285,13 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage) addAutoReleasedObject(new SettingsPage(versionControl())); addAutoReleasedObject(new GitGrep); - static const char *describeSlot = SLOT(show(QString,QString)); + const auto describeFunc = [this](const QString &source, const QString &id) { + m_gitClient->show(source, id); + }; const int editorCount = sizeof(editorParameters) / sizeof(editorParameters[0]); const auto widgetCreator = []() { return new GitEditorWidget; }; for (int i = 0; i < editorCount; i++) - addAutoReleasedObject(new VcsEditorFactory(editorParameters + i, widgetCreator, m_gitClient, describeSlot)); + addAutoReleasedObject(new VcsEditorFactory(editorParameters + i, widgetCreator, describeFunc)); addAutoReleasedObject(new VcsSubmitEditorFactory(&submitParameters, []() { return new GitSubmitEditor(&submitParameters); })); |
