diff options
author | Fan PengCheng <fanpengcheng@uniontech.com> | 2021-03-22 18:21:08 +0800 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-03-26 06:24:04 +0000 |
commit | 35dd643b07c9b38dc4b3acfd8684aaa8ed192010 (patch) | |
tree | 240222145be4970b702864eb19a1495ac0f8861f /src/widgets/dialogs | |
parent | 3e65d0408b830518ca2f18c8d0d583cbb665d1f3 (diff) |
Fix coding style
Curly brace is supposed to go on the same line as the if.
Change-Id: I92fbd984e9ccdb06acdfe89e45c34b26a08df0cb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r-- | src/widgets/dialogs/qmessagebox.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index 1ff677847a..1a8006944b 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -99,9 +99,7 @@ public: #ifndef QT_NO_CONTEXTMENU void contextMenuEvent(QContextMenuEvent * e) override { - QMenu *menu = createStandardContextMenu(); - if (menu) - { + if (QMenu *menu = createStandardContextMenu()) { menu->setAttribute(Qt::WA_DeleteOnClose); menu->popup(e->globalPos()); } |