From 6a2f34db0b2d049e299d4cc7660264c37fba90e0 Mon Sep 17 00:00:00 2001 From: Li Zhong Ming Date: Wed, 22 Jul 2020 16:01:07 +0800 Subject: 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 --- src/widgets/widgets/qcombobox.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/widgets') 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(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; -- cgit v1.2.3