Use braced initializer list for returns in Systray::taskbarGeometry()
authorStephan Beyer <s-beyer@gmx.net>
Tue, 7 Jul 2020 07:43:22 +0000 (09:43 +0200)
committerKevin Ottens <ervin@ipsquad.net>
Wed, 8 Jul 2020 12:08:41 +0000 (14:08 +0200)
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
src/gui/systray.cpp

index 15f9d668e141e003fb3ab9c8cb71192395e68446..b2462f6c7148eabbcf6504c5c6c673afa77935c8 100644 (file)
@@ -264,14 +264,14 @@ QRect Systray::taskbarGeometry() const
 #elif defined(Q_OS_MACOS)
     // Finder bar is always 22px height on macOS (when treating as effective pixels)
     auto screenWidth = currentScreenRect().width();
-    return QRect(0, 0, screenWidth, 22);
+    return {0, 0, screenWidth, 22};
 #else
     if (taskbarOrientation() == TaskBarPosition::Bottom || taskbarOrientation() == TaskBarPosition::Top) {
         auto screenWidth = currentScreenRect().width();
-        return QRect(0, 0, screenWidth, 32);
+        return {0, 0, screenWidth, 32};
     } else {
         auto screenHeight = currentScreenRect().height();
-        return QRect(0, 0, 32, screenHeight);
+        return {0, 0, 32, screenHeight};
     }
 #endif
 }