diff --git a/src/corelib/global/qflags.h b/src/corelib/global/qflags.h index e576128bce..ded933880e 100644 --- a/src/corelib/global/qflags.h +++ b/src/corelib/global/qflags.h @@ -93,10 +93,6 @@ class QFlags "long long will overflow."); static_assert((std::is_enum::value), "QFlags is only usable on enumeration types."); -#if QT_DEPRECATED_SINCE(5,15) - struct Private; - typedef int (Private::*Zero); -#endif public: #if defined(Q_CC_MSVC) || defined(Q_CLANG_QDOC) // see above for MSVC @@ -117,9 +113,6 @@ public: #endif constexpr inline QFlags() noexcept : i(0) {} constexpr inline QFlags(Enum flags) noexcept : i(Int(flags)) {} -#if QT_DEPRECATED_SINCE(5,15) - QT_DEPRECATED_X("Use default constructor instead") constexpr inline QFlags(Zero) noexcept : i(0) {} -#endif constexpr inline QFlags(QFlag flag) noexcept : i(flag) {} constexpr inline QFlags(std::initializer_list flags) noexcept diff --git a/src/plugins/platforms/ios/qiosinputcontext.h b/src/plugins/platforms/ios/qiosinputcontext.h index debdf7a638..c59c5328af 100644 --- a/src/plugins/platforms/ios/qiosinputcontext.h +++ b/src/plugins/platforms/ios/qiosinputcontext.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. @@ -76,10 +76,10 @@ struct KeyboardState struct ImeState { - ImeState() : currentState(0), focusObject(0) {} + ImeState() = default; Qt::InputMethodQueries update(Qt::InputMethodQueries properties); - QInputMethodQueryEvent currentState; - QObject *focusObject; + QInputMethodQueryEvent currentState = QInputMethodQueryEvent({}); + QObject *focusObject = nullptr; }; class QIOSInputContext : public QPlatformInputContext diff --git a/src/plugins/platforms/ios/qiosinputcontext.mm b/src/plugins/platforms/ios/qiosinputcontext.mm index d2229df133..0eb12498b4 100644 --- a/src/plugins/platforms/ios/qiosinputcontext.mm +++ b/src/plugins/platforms/ios/qiosinputcontext.mm @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. @@ -297,7 +297,7 @@ QT_BEGIN_NAMESPACE Qt::InputMethodQueries ImeState::update(Qt::InputMethodQueries properties) { if (!properties) - return 0; + return {}; QInputMethodQueryEvent newState(properties); diff --git a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp index beec8db0d9..45ed5d7d21 100644 --- a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp +++ b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp @@ -638,7 +638,7 @@ void tst_QFileDialog2::task226366_lowerCaseHardDriveWindows() QLineEdit *edit = fd.findChild("fileNameEdit"); QToolButton *buttonParent = fd.findChild("toParentButton"); QTest::qWait(200); - QTest::mouseClick(buttonParent, Qt::LeftButton,0,QPoint(0,0)); + QTest::mouseClick(buttonParent, Qt::LeftButton, {}, QPoint(0, 0)); QTest::qWait(2000); QTest::keyClick(edit, Qt::Key_C); QTest::qWait(200); diff --git a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp index 35611d470d..9a6cf3bfcf 100644 --- a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp +++ b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp @@ -339,14 +339,14 @@ void tst_QMenu::mouseActivation() menubar.show(); - QTest::mouseClick(&menubar, Qt::LeftButton, 0, menubar.actionGeometry(action).center(), 300); + QTest::mouseClick(&menubar, Qt::LeftButton, {}, menubar.actionGeometry(action).center(), 300); QVERIFY(submenu.isVisible()); - QTest::mouseClick(&submenu, Qt::LeftButton, 0, QPoint(5, 5), 300); + QTest::mouseClick(&submenu, Qt::LeftButton, {}, QPoint(5, 5), 300); QVERIFY(!submenu.isVisible()); - QTest::mouseClick(&menubar, Qt::LeftButton, 0, menubar.actionGeometry(action).center(), 300); + QTest::mouseClick(&menubar, Qt::LeftButton, {}, menubar.actionGeometry(action).center(), 300); QVERIFY(submenu.isVisible()); - QTest::mouseClick(&submenu, Qt::RightButton, 0, QPoint(5, 5), 300); + QTest::mouseClick(&submenu, Qt::RightButton, {}, QPoint(5, 5), 300); QVERIFY(submenu.isVisible()); #endif }