summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index fdaada9..3b61d30 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -129,8 +129,8 @@ int main(int argc, char *argv[])
sigemptyset(&usr1.sa_mask);
usr1.sa_flags = SA_RESTART;
- QSocketNotifier *sn = NULL;
- if (sigaction(SIGUSR1, &usr1, 0) == 0 && ::socketpair(AF_UNIX, SOCK_STREAM, 0, sockets) == 0) {
+ QSocketNotifier *sn = nullptr;
+ if (sigaction(SIGUSR1, &usr1, nullptr) == 0 && ::socketpair(AF_UNIX, SOCK_STREAM, 0, sockets) == 0) {
sn = new QSocketNotifier(sockets[1], QSocketNotifier::Read);
QObject::connect(sn, &QSocketNotifier::activated, [](int fd) {
char tmp[1000];
@@ -140,13 +140,13 @@ int main(int argc, char *argv[])
// Now set up all the screens
QPainter painter(&entire);
- MainWindow *focusWindow = 0;
+ MainWindow *focusWindow = nullptr;
QMapIterator<int, QRect> it(screens);
while (it.hasNext()) {
it.next();
MainWindow *w = new MainWindow(primary == it.key(), it.key(), it.value());
w->show();
- if (sn != NULL) {
+ if (sn != nullptr) {
QObject::connect(sn, SIGNAL(activated(int)), w, SLOT(showStandby()));
}
if (w->showLoginForm()) {
@@ -160,7 +160,8 @@ int main(int argc, char *argv[])
if (!entire.isNull()) {
qWarning() << "Setting x background";
- AddPixmapToBackground(entire.constBits(), entire.width(), entire.height(), 24, entire.bytesPerLine(), entire.byteCount());
+ AddPixmapToBackground(entire.constBits(), entire.width(), entire.height(),
+ 24, entire.bytesPerLine(), entire.byteCount());
}
// Ensure we set the primary screen's widget as active when there
@@ -179,7 +180,8 @@ static void createSimpleBackground()
if (img.isNull())
return;
img = img.scaled(QApplication::desktop()->size(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
- AddPixmapToBackground(img.constBits(), img.width(), img.height(), 24, img.bytesPerLine(), img.byteCount());
+ AddPixmapToBackground(img.constBits(), img.width(), img.height(),
+ 24, img.bytesPerLine(), img.byteCount());
}
static void sigUsr1(int)