summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorLi Zhong Ming <lizhongming@uniontech.com>2020-07-22 16:01:07 +0800
committerLi Zhong Ming <lizhongming@uniontech.com>2020-07-24 19:21:25 +0800
commit6a2f34db0b2d049e299d4cc7660264c37fba90e0 (patch)
treeab26b475394c1e354fe8251a8c3b8ecf52b1f2db /src/widgets
parent9a189a096f134e80e0c11523db14c8580275b4ad (diff)
Remove the space before the ')'
1.According to QT coding styles, there should be no space around the parentheses 2.Replace the & operator with testflag() Task-number: QTBUG-85617 Change-Id: I1d1ae9ec0d20f3401ce4a2ee9089b72205f6e8eb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/widgets/qcombobox.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index c42d951248..abb1fd7572 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -752,7 +752,7 @@ bool QComboBoxPrivateContainer::eventFilter(QObject *o, QEvent *e)
#ifdef QT_KEYPAD_NAVIGATION
case Qt::Key_Select:
#endif
- if (view->currentIndex().isValid() && (view->currentIndex().flags() & Qt::ItemIsEnabled) ) {
+ if (view->currentIndex().isValid() && view->currentIndex().flags().testFlag(Qt::ItemIsEnabled)) {
combo->hidePopup();
emit itemSelected(view->currentIndex());
}
@@ -798,8 +798,8 @@ bool QComboBoxPrivateContainer::eventFilter(QObject *o, QEvent *e)
QMouseEvent *m = static_cast<QMouseEvent *>(e);
if (isVisible() && view->rect().contains(m->position().toPoint()) && view->currentIndex().isValid()
&& !blockMouseReleaseTimer.isActive() && !ignoreEvent
- && (view->currentIndex().flags() & Qt::ItemIsEnabled)
- && (view->currentIndex().flags() & Qt::ItemIsSelectable)) {
+ && (view->currentIndex().flags().testFlag(Qt::ItemIsEnabled))
+ && (view->currentIndex().flags().testFlag(Qt::ItemIsSelectable))) {
combo->hidePopup();
emit itemSelected(view->currentIndex());
return true;