summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Eike Beer <kde@opensource.sf-tec.de>2016-10-19 20:12:36 (GMT)
committerRolf Eike Beer <kde@opensource.sf-tec.de>2016-10-19 20:12:36 (GMT)
commita28f31252aea596fce2ace75be73f68f9e98d715 (patch)
tree4bfb5964fb1d30d37550a9e39971c6640d352a45
parentd4916218686561997c29b75499a1cc20113750d8 (diff)
use relay-only slots, directly connect to signal
-rw-r--r--gpgproc.cpp18
-rw-r--r--gpgproc.h4
2 files changed, 4 insertions, 18 deletions
diff --git a/gpgproc.cpp b/gpgproc.cpp
index dd38434..f975e7d 100644
--- a/gpgproc.cpp
+++ b/gpgproc.cpp
@@ -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;
diff --git a/gpgproc.h b/gpgproc.h
index cd751a2..375c899 100644
--- a/gpgproc.h
+++ b/gpgproc.h
@@ -178,10 +178,6 @@ signals:
*/
void processExited();
-protected slots:
- void processFinished();
- void received();
-
private:
QByteArray m_codec;
};