summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/dialogs
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-02-06 22:09:33 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-02-08 18:00:51 +0000
commit1b5a17632efbaf6c1d0eacdda72fad3bc9d5fe13 (patch)
tree336afc751c787a9aa376ef895750d4bce74619a3 /tests/auto/widgets/dialogs
parent4ce485a2eba40cc6d1edcf4baa794276432e1bea (diff)
Fix deprecation warnings in widget autotests
Fix all deprecation warnings within tests/auto/widgets Change-Id: I854f54c0a1dc0a0086f626b93cd39f63cb1b6033 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'tests/auto/widgets/dialogs')
-rw-r--r--tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp8
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp b/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp
index 6a0ad4b3a4..413b865f04 100644
--- a/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp
+++ b/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp
@@ -116,10 +116,10 @@ void tst_QColorDialog::testGetRgba()
#ifdef Q_OS_MAC
QEXPECT_FAIL("", "Sending QTest::keyClick to OSX color dialog helper fails, see QTBUG-24320", Continue);
#endif
- bool ok = false;
- QTimer::singleShot(500, this, SLOT(postKeyReturn()));
- QColorDialog::getRgba(0xffffffff, &ok);
- QVERIFY(ok);
+ QTimer::singleShot(500, this, &tst_QColorDialog::postKeyReturn);
+ const QColor color = QColorDialog::getColor(QColor::fromRgba(0xffffffff), nullptr, QString(),
+ QColorDialog::ShowAlphaChannel);
+ QVERIFY(color.isValid());
}
void tst_QColorDialog::defaultOkButton()
diff --git a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
index 20fc7c9a6c..869418371c 100644
--- a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
+++ b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
@@ -486,7 +486,7 @@ protected:
parentIndex = source_parent;
QString path;
- path = parentIndex.child(source_row,0).data(Qt::DisplayRole).toString();
+ path = sourceModel()->index(source_row, 0, parentIndex).data(Qt::DisplayRole).toString();
do {
path = parentIndex.data(Qt::DisplayRole).toString() + QLatin1Char('/') + path;