X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fposixsignalwatcher.cpp;h=eee391830296d6b55e7c6677c0f1a9ac446c3fa6;hp=7de0e773546739e50f6f5ec3d31d69d942f8f241;hb=c1cf157116de7fc3da96203aa6f03c38c7ebb650;hpb=222d0be6ffa0f6c63c3c8c5a303260b9aee10e68 diff --git a/src/common/posixsignalwatcher.cpp b/src/common/posixsignalwatcher.cpp index 7de0e773..eee39183 100644 --- a/src/common/posixsignalwatcher.cpp +++ b/src/common/posixsignalwatcher.cpp @@ -20,10 +20,10 @@ #include "posixsignalwatcher.h" +#include #include -#include #include -#include +#include #include #include @@ -36,7 +36,7 @@ int PosixSignalWatcher::_sockpair[2]; -PosixSignalWatcher::PosixSignalWatcher(QObject *parent) +PosixSignalWatcher::PosixSignalWatcher(QObject* parent) : AbstractSignalWatcher{parent} { if (::socketpair(AF_UNIX, SOCK_STREAM, 0, _sockpair)) { @@ -45,7 +45,7 @@ PosixSignalWatcher::PosixSignalWatcher(QObject *parent) } _notifier = new QSocketNotifier(_sockpair[1], QSocketNotifier::Read, this); - connect(_notifier, SIGNAL(activated(int)), this, SLOT(onNotify(int))); + connect(_notifier, &QSocketNotifier::activated, this, &PosixSignalWatcher::onNotify); _notifier->setEnabled(true); registerSignal(SIGINT); @@ -54,7 +54,7 @@ PosixSignalWatcher::PosixSignalWatcher(QObject *parent) #ifdef HAVE_BACKTRACE // we only handle crashes ourselves if coredumps are disabled - struct rlimit *limit = (rlimit *)malloc(sizeof(struct rlimit)); + struct rlimit* limit = (rlimit*)malloc(sizeof(struct rlimit)); int rc = getrlimit(RLIMIT_CORE, limit); if (rc == -1 || !((long)limit->rlim_cur > 0 || limit->rlim_cur == RLIM_INFINITY)) { registerSignal(SIGABRT);