Skip to content

Commit a6a806b

Browse files
committed
Use compile time connections
Change-Id: I0322e8f594a07d0173a732e5036e4d9ca524232c Reviewed-by: Laszlo Agocs <[email protected]>
1 parent 7180862 commit a6a806b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

process.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ Process::Process()
8888
, mDebug(false)
8989
{
9090
mProcess->setProcessChannelMode(QProcess::SeparateChannels);
91-
connect(mProcess, SIGNAL(readyReadStandardError()), this, SLOT(readyReadStandardError()));
92-
connect(mProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(readyReadStandardOutput()));
93-
connect(mProcess, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(finished(int, QProcess::ExitStatus)));
94-
connect(mProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(error(QProcess::ProcessError)));
95-
connect(mProcess, SIGNAL(finished(int, QProcess::ExitStatus)), qApp, SLOT(quit()));
91+
connect(mProcess, &QProcess::readyReadStandardError, this, &Process::readyReadStandardError);
92+
connect(mProcess, &QProcess::readyReadStandardOutput, this, &Process::readyReadStandardOutput);
93+
connect(mProcess, (void (QProcess::*)(int, QProcess::ExitStatus))&QProcess::finished, this, &Process::finished);
94+
connect(mProcess, (void (QProcess::*)(QProcess::ProcessError))&QProcess::error, this, &Process::error);
95+
connect(mProcess, (void (QProcess::*)(int, QProcess::ExitStatus))&QProcess::finished, qApp, &QCoreApplication::quit);
9696

9797
if (pipe2(pipefd, O_CLOEXEC) != 0)
9898
qWarning("Could not create pipe");
@@ -238,7 +238,7 @@ void Process::incomingConnection(int i)
238238

239239
void Process::setSocketNotifier(QSocketNotifier *s)
240240
{
241-
connect(s, SIGNAL(activated(int)), this, SLOT(incomingConnection(int)));
241+
connect(s, &QSocketNotifier::activated, this, &Process::incomingConnection);
242242
}
243243

244244
void Process::setConfig(const Config &config)

0 commit comments

Comments
 (0)