aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cvs
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2016-11-26 21:52:49 +0200
committerOrgad Shaneh <orgads@gmail.com>2016-11-28 09:38:12 +0000
commit5832f52ceefb9ee19842af4513ae00ee7d311e31 (patch)
tree0ed1a117b154151354b2d4b7036dde81ffe7b0ac /src/plugins/cvs
parent565aed03a24e315847421272d582b7fd3b7ff04d (diff)
VCS: Replace describe slots with lambdas
Change-Id: I05ca25aad8be43fdfa15d3fb5eaaa9bf753ee79f Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins/cvs')
-rw-r--r--src/plugins/cvs/cvsplugin.cpp15
-rw-r--r--src/plugins/cvs/cvsplugin.h3
2 files changed, 6 insertions, 12 deletions
diff --git a/src/plugins/cvs/cvsplugin.cpp b/src/plugins/cvs/cvsplugin.cpp
index 06c25a42709..c697b0427ea 100644
--- a/src/plugins/cvs/cvsplugin.cpp
+++ b/src/plugins/cvs/cvsplugin.cpp
@@ -212,11 +212,15 @@ bool CvsPlugin::initialize(const QStringList &arguments, QString *errorMessage)
addAutoReleasedObject(new VcsSubmitEditorFactory(&submitParameters,
[]() { return new CvsSubmitEditor(&submitParameters); }));
- static const char *describeSlotC = SLOT(slotDescribe(QString,QString));
+ const auto describeFunc = [this](const QString &source, const QString &changeNr) {
+ QString errorMessage;
+ if (!describe(source, changeNr, &errorMessage))
+ VcsOutputWindow::appendError(errorMessage);
+ };
const int editorCount = sizeof(editorParameters) / sizeof(editorParameters[0]);
const auto widgetCreator = []() { return new CvsEditorWidget; };
for (int i = 0; i < editorCount; i++)
- addAutoReleasedObject(new VcsEditorFactory(editorParameters + i, widgetCreator, this, describeSlotC));
+ addAutoReleasedObject(new VcsEditorFactory(editorParameters + i, widgetCreator, describeFunc));
const QString prefix = QLatin1String("cvs");
m_commandLocator = new CommandLocator("CVS", prefix, prefix);
@@ -964,13 +968,6 @@ void CvsPlugin::updateRepository()
}
-void CvsPlugin::slotDescribe(const QString &source, const QString &changeNr)
-{
- QString errorMessage;
- if (!describe(source, changeNr, &errorMessage))
- VcsOutputWindow::appendError(errorMessage);
-}
-
bool CvsPlugin::describe(const QString &file, const QString &changeNr, QString *errorMessage)
{
diff --git a/src/plugins/cvs/cvsplugin.h b/src/plugins/cvs/cvsplugin.h
index 86567c45110..c3e2b1a456f 100644
--- a/src/plugins/cvs/cvsplugin.h
+++ b/src/plugins/cvs/cvsplugin.h
@@ -90,9 +90,6 @@ public slots:
void vcsAnnotate(const QString &workingDirectory, const QString &file,
const QString &revision, int lineNumber);
-private slots:
- void slotDescribe(const QString &source, const QString &changeNr);
-
#ifdef WITH_TESTS
void testDiffFileResolving_data();
void testDiffFileResolving();