projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
modernize: Reformat ALL the source... again!
[quassel.git]
/
src
/
common
/
posixsignalwatcher.cpp
diff --git
a/src/common/posixsignalwatcher.cpp
b/src/common/posixsignalwatcher.cpp
index
7de0e77
..
eee3918
100644
(file)
--- a/
src/common/posixsignalwatcher.cpp
+++ b/
src/common/posixsignalwatcher.cpp
@@
-20,10
+20,10
@@
#include "posixsignalwatcher.h"
#include "posixsignalwatcher.h"
+#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/socket.h>
-#include <sys/types.h>
#include <sys/time.h>
#include <sys/time.h>
-#include <sys/
resource
.h>
+#include <sys/
types
.h>
#include <unistd.h>
#include <cerrno>
#include <unistd.h>
#include <cerrno>
@@
-36,7
+36,7
@@
int PosixSignalWatcher::_sockpair[2];
int PosixSignalWatcher::_sockpair[2];
-PosixSignalWatcher::PosixSignalWatcher(QObject
*
parent)
+PosixSignalWatcher::PosixSignalWatcher(QObject
*
parent)
: AbstractSignalWatcher{parent}
{
if (::socketpair(AF_UNIX, SOCK_STREAM, 0, _sockpair)) {
: 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);
}
_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);
_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
#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);
int rc = getrlimit(RLIMIT_CORE, limit);
if (rc == -1 || !((long)limit->rlim_cur > 0 || limit->rlim_cur == RLIM_INFINITY)) {
registerSignal(SIGABRT);