From 793cea587159a0ba01fec6af28e899697ef4da79 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 9 Jul 2018 05:33:58 +0200 Subject: cleanup only --- variant/default/main-window.cpp | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'variant') diff --git a/variant/default/main-window.cpp b/variant/default/main-window.cpp index 0d817bca..200400e6 100644 --- a/variant/default/main-window.cpp +++ b/variant/default/main-window.cpp @@ -866,19 +866,14 @@ void main_window::ensure_tray() void main_window::toggle_restore_from_tray(QSystemTrayIcon::ActivationReason e) { - if (progn( - switch (e) - { - // if we enable double click also then it causes - // toggle back to the original state - //case QSystemTrayIcon::DoubleClick: - case QSystemTrayIcon::Trigger: // single click - return false; - default: - return true; - } - )) + switch (e) { + // if we enable double click also then it causes + // toggle back to the original state + //case QSystemTrayIcon::DoubleClick: + case QSystemTrayIcon::Trigger: // single click + break; + default: return; } @@ -891,12 +886,11 @@ void main_window::toggle_restore_from_tray(QSystemTrayIcon::ActivationReason e) setVisible(is_minimized); setHidden(!is_minimized); - setWindowState(progn( - using ws = Qt::WindowStates; + setWindowState(typed_progn(Qt::WindowStates, if (is_minimized) - return ws(windowState() & (~Qt::WindowMinimized)); + return windowState() & ~Qt::WindowMinimized; else - return ws(Qt::WindowNoState); + return Qt::WindowNoState; )); if (is_minimized) -- cgit v1.2.3