From ba0cd9ba655c6543d2f9c2a46a3ecf0b6da98f1d Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 26 Jul 2018 17:15:55 +0200 Subject: Cleanup code style (C++11, casts, etc) --- src/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 41600a6..46d8bc5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -234,7 +234,7 @@ int main(int argc, char *argv[]) { g_forLocationHandling = LOCATION_EXCLUSIVE; } else { qDebug() << "Invalid location mode: " << mode; - QMessageBox::critical(NULL, "Error", "Invalid location mode: " + mode); + QMessageBox::critical(nullptr, "Error", "Invalid location mode: " + mode); return 1; } } @@ -247,7 +247,7 @@ int main(int argc, char *argv[]) { g_templateHandling = LOCATION_BUMP; } else { qDebug() << "Invalid template mode: " << mode; - QMessageBox::critical(NULL, "Error", "Invalid template mode: " + mode); + QMessageBox::critical(nullptr, "Error", "Invalid template mode: " + mode); return 1; } } @@ -339,7 +339,7 @@ int main(int argc, char *argv[]) { // center dialog on primary screen QPoint center = desktopRect.center(); - w.move(center.x() - w.width() * 0.5, center.y() - w.height() * 0.5); + w.move(center.x() - w.width() / 2, center.y() - w.height() / 2); a.setActiveWindow(&w); return a.exec(); -- cgit v1.2.3-55-g7522