summaryrefslogtreecommitdiffhomepage
path: root/variant/default/main-window.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-07-09 05:33:58 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-07-09 05:35:08 +0200
commit793cea587159a0ba01fec6af28e899697ef4da79 (patch)
treeb4ec4477862ed74dc2c180d2b002915f8df040e8 /variant/default/main-window.cpp
parent841e163ae4b86317cca29748cf0f2730418e4fa5 (diff)
cleanup only
Diffstat (limited to 'variant/default/main-window.cpp')
-rw-r--r--variant/default/main-window.cpp26
1 files changed, 10 insertions, 16 deletions
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)