Commit a28f3125 authored by Rolf Eike Beer's avatar Rolf Eike Beer
Browse files

use relay-only slots, directly connect to signal

parent d4916218
......@@ -195,28 +195,18 @@ GPGProc::resetProcess(const QString &binary)
setOutputChannelMode(OnlyStdoutChannel);
disconnect(this, static_cast<void(GPGProc::*)(int, QProcess::ExitStatus)>(&GPGProc::finished), this, &GPGProc::processFinished);
disconnect(this, &GPGProc::lineReadyStandardOutput, this, &GPGProc::received);
disconnect(this, static_cast<void(GPGProc::*)(int, QProcess::ExitStatus)>(&GPGProc::finished), this, &GPGProc::processExited);
disconnect(this, &GPGProc::lineReadyStandardOutput, this, &GPGProc::readReady);
}
void GPGProc::start()
{
// make sure there is exactly one connection from us to that signal
connect(this, static_cast<void(GPGProc::*)(int, QProcess::ExitStatus)>(&GPGProc::finished), this, &GPGProc::processFinished, Qt::UniqueConnection);
connect(this, &GPGProc::lineReadyStandardOutput, this, &GPGProc::received, Qt::UniqueConnection);
connect(this, static_cast<void(GPGProc::*)(int, QProcess::ExitStatus)>(&GPGProc::finished), this, &GPGProc::processExited, Qt::UniqueConnection);
connect(this, &GPGProc::lineReadyStandardOutput, this, &GPGProc::readReady, Qt::UniqueConnection);
KProcess::start();
}
void GPGProc::received()
{
emit readReady();
}
void GPGProc::processFinished()
{
emit processExited();
}
int GPGProc::readln(QString &line, const bool colons)
{
QByteArray a;
......
......@@ -178,10 +178,6 @@ signals:
*/
void processExited();
protected slots:
void processFinished();
void received();
private:
QByteArray m_codec;
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment