QFlags: remove deprecated constructor
Fix remaining places that still exercised it. Task-number: QTBUG-85700 Change-Id: I84562f53439197141343831c0b9f88983689e6bf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
parent
1907599bfd
commit
257d5888e8
@ -93,10 +93,6 @@ class QFlags
|
|||||||
"long long will overflow.");
|
"long long will overflow.");
|
||||||
static_assert((std::is_enum<Enum>::value), "QFlags is only usable on enumeration types.");
|
static_assert((std::is_enum<Enum>::value), "QFlags is only usable on enumeration types.");
|
||||||
|
|
||||||
#if QT_DEPRECATED_SINCE(5,15)
|
|
||||||
struct Private;
|
|
||||||
typedef int (Private::*Zero);
|
|
||||||
#endif
|
|
||||||
public:
|
public:
|
||||||
#if defined(Q_CC_MSVC) || defined(Q_CLANG_QDOC)
|
#if defined(Q_CC_MSVC) || defined(Q_CLANG_QDOC)
|
||||||
// see above for MSVC
|
// see above for MSVC
|
||||||
@ -117,9 +113,6 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
constexpr inline QFlags() noexcept : i(0) {}
|
constexpr inline QFlags() noexcept : i(0) {}
|
||||||
constexpr inline QFlags(Enum flags) noexcept : i(Int(flags)) {}
|
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(QFlag flag) noexcept : i(flag) {}
|
||||||
|
|
||||||
constexpr inline QFlags(std::initializer_list<Enum> flags) noexcept
|
constexpr inline QFlags(std::initializer_list<Enum> flags) noexcept
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2016 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the plugins of the Qt Toolkit.
|
** This file is part of the plugins of the Qt Toolkit.
|
||||||
@ -76,10 +76,10 @@ struct KeyboardState
|
|||||||
|
|
||||||
struct ImeState
|
struct ImeState
|
||||||
{
|
{
|
||||||
ImeState() : currentState(0), focusObject(0) {}
|
ImeState() = default;
|
||||||
Qt::InputMethodQueries update(Qt::InputMethodQueries properties);
|
Qt::InputMethodQueries update(Qt::InputMethodQueries properties);
|
||||||
QInputMethodQueryEvent currentState;
|
QInputMethodQueryEvent currentState = QInputMethodQueryEvent({});
|
||||||
QObject *focusObject;
|
QObject *focusObject = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
class QIOSInputContext : public QPlatformInputContext
|
class QIOSInputContext : public QPlatformInputContext
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2016 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the plugins of the Qt Toolkit.
|
** 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)
|
Qt::InputMethodQueries ImeState::update(Qt::InputMethodQueries properties)
|
||||||
{
|
{
|
||||||
if (!properties)
|
if (!properties)
|
||||||
return 0;
|
return {};
|
||||||
|
|
||||||
QInputMethodQueryEvent newState(properties);
|
QInputMethodQueryEvent newState(properties);
|
||||||
|
|
||||||
|
@ -638,7 +638,7 @@ void tst_QFileDialog2::task226366_lowerCaseHardDriveWindows()
|
|||||||
QLineEdit *edit = fd.findChild<QLineEdit*>("fileNameEdit");
|
QLineEdit *edit = fd.findChild<QLineEdit*>("fileNameEdit");
|
||||||
QToolButton *buttonParent = fd.findChild<QToolButton*>("toParentButton");
|
QToolButton *buttonParent = fd.findChild<QToolButton*>("toParentButton");
|
||||||
QTest::qWait(200);
|
QTest::qWait(200);
|
||||||
QTest::mouseClick(buttonParent, Qt::LeftButton,0,QPoint(0,0));
|
QTest::mouseClick(buttonParent, Qt::LeftButton, {}, QPoint(0, 0));
|
||||||
QTest::qWait(2000);
|
QTest::qWait(2000);
|
||||||
QTest::keyClick(edit, Qt::Key_C);
|
QTest::keyClick(edit, Qt::Key_C);
|
||||||
QTest::qWait(200);
|
QTest::qWait(200);
|
||||||
|
@ -339,14 +339,14 @@ void tst_QMenu::mouseActivation()
|
|||||||
menubar.show();
|
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());
|
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());
|
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());
|
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());
|
QVERIFY(submenu.isVisible());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user