diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-11-25 10:49:54 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-11-26 09:08:51 +0100 |
commit | d556d7a6b80d862c1b010358e16ee29004a32f75 (patch) | |
tree | 934054ffd8ea68accc7500f054101eb1aa82a8cc /tests/auto/widgets/kernel | |
parent | c54b1d273f6aee3538c1608e9fefff22e80e11fb (diff) |
Avoid initializing QFlags with 0 or nullptr in tests
Amends qtbase/af2daafde72db02454d24b7d691aa6861525ab99.
Change-Id: Ib5d17611e43e7ab2c63c7f0587f549377f262e32
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests/auto/widgets/kernel')
3 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp b/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp index 00bde3cb25..cbfbefaf3c 100644 --- a/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp +++ b/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp @@ -415,7 +415,7 @@ public: QSize minimumSize() const { return QSize(m_descr.minimumSize, 0); } QSize maximumSize() const { return QSize(m_descr.maximumSize, QLAYOUTSIZE_MAX); } Qt::Orientations expandingDirections() const - { return m_descr.expanding ? Qt::Horizontal : Qt::Orientations(0); } + { return m_descr.expanding ? Qt::Horizontal : Qt::Orientations{}; } void setGeometry(const QRect &r) { m_pos = r.x(); m_size = r.width();} QRect geometry() const { return QRect(m_pos, 0, m_size, 100); } bool isEmpty() const { return m_descr.empty; } diff --git a/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp b/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp index 140a367afe..c8fe1841c8 100644 --- a/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp +++ b/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp @@ -163,7 +163,7 @@ void tst_QLayout::smartMaxSize() QSizePolicy::MinimumExpanding, QSizePolicy::Ignored }; - Qt::Alignment alignments[] = { 0, + Qt::Alignment alignments[] = { Qt::Alignment{}, Qt::AlignLeft, Qt::AlignRight, Qt::AlignHCenter diff --git a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp index 7d114fde56..dd3e2f844b 100644 --- a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp +++ b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp @@ -845,12 +845,12 @@ void tst_QWidget_window::tst_dnd_propagation() auto posInsideLabel = QHighDpi::toNativePixels(QPoint(60, 60), window->screen()); // Enter DropTarget. - QWindowSystemInterface::handleDrag(window, &mimeData, posInsideDropTarget, supportedActions, 0, 0); + QWindowSystemInterface::handleDrag(window, &mimeData, posInsideDropTarget, supportedActions, {}, {}); // Enter QLabel. This will propagate because default QLabel does // not accept the drop event in dragEnterEvent(). - QWindowSystemInterface::handleDrag(window, &mimeData, posInsideLabel, supportedActions, 0, 0); + QWindowSystemInterface::handleDrag(window, &mimeData, posInsideLabel, supportedActions, {}, {}); // Drop on QLabel. DropTarget will get dropEvent(), because it accepted the event. - QWindowSystemInterface::handleDrop(window, &mimeData, posInsideLabel, supportedActions, 0, 0); + QWindowSystemInterface::handleDrop(window, &mimeData, posInsideLabel, supportedActions, {}, {}); QGuiApplication::processEvents(); |