Gerrit: Replace single line slots with lambdas

Change-Id: I63c3e963a2aa04043c4da3da6313757b001f568d
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Orgad Shaneh
2017-03-13 17:29:34 +02:00
committed by Orgad Shaneh
parent db16f265c9
commit 8795ec0beb

View File

@@ -238,8 +238,6 @@ signals:
private:
void processError(QProcess::ProcessError);
void processFinished(int exitCode, QProcess::ExitStatus);
void readyReadStandardError();
void readyReadStandardOutput();
void timeout();
void errorTermination(const QString &msg);
@@ -277,10 +275,12 @@ QueryContext::QueryContext(const QString &query,
+ "&o=CURRENT_REVISION&o=DETAILED_LABELS&o=DETAILED_ACCOUNTS";
m_arguments = GerritServer::curlArguments() << url;
}
connect(&m_process, &QProcess::readyReadStandardError,
this, &QueryContext::readyReadStandardError);
connect(&m_process, &QProcess::readyReadStandardOutput,
this, &QueryContext::readyReadStandardOutput);
connect(&m_process, &QProcess::readyReadStandardError, this, [this] {
VcsOutputWindow::appendError(QString::fromLocal8Bit(m_process.readAllStandardError()));
});
connect(&m_process, &QProcess::readyReadStandardOutput, this, [this] {
m_output.append(m_process.readAllStandardOutput());
});
connect(&m_process, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
this, &QueryContext::processFinished);
connect(&m_process, &QProcess::errorOccurred, this, &QueryContext::processError);
@@ -357,16 +357,6 @@ void QueryContext::processFinished(int exitCode, QProcess::ExitStatus es)
emit finished();
}
void QueryContext::readyReadStandardError()
{
VcsOutputWindow::appendError(QString::fromLocal8Bit(m_process.readAllStandardError()));
}
void QueryContext::readyReadStandardOutput()
{
m_output.append(m_process.readAllStandardOutput());
}
void QueryContext::timeout()
{
if (m_process.state() != QProcess::Running)