From 75e2ab627fc22329219fa042570e8b91946596bd Mon Sep 17 00:00:00 2001 From: David Faure Date: Thu, 12 Sep 2019 15:02:33 +0200 Subject: [PATCH] Port away from deprecated methods since Qt 5.14 --- autotests/bihash/benchmarks.cpp | 2 +- autotests/proxymodeltestsuite/modeltest.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/autotests/bihash/benchmarks.cpp b/autotests/bihash/benchmarks.cpp index c1f627f..3716e48 100644 --- a/autotests/bihash/benchmarks.cpp +++ b/autotests/bihash/benchmarks.cpp @@ -97,7 +97,7 @@ class BiHashBenchmarks : public QObject public: BiHashBenchmarks(QObject *parent = 0) { - qsrand(QDateTime::currentDateTime().toTime_t()); + qsrand(QDateTime::currentDateTime().toSecsSinceEpoch()); } private: diff --git a/autotests/proxymodeltestsuite/modeltest.cpp b/autotests/proxymodeltestsuite/modeltest.cpp index fe4d4e3..de0ae16 100644 --- a/autotests/proxymodeltestsuite/modeltest.cpp +++ b/autotests/proxymodeltestsuite/modeltest.cpp @@ -464,12 +464,12 @@ void ModelTest::data() } // General Purpose roles that should return a QColor - QVariant colorVariant = model->data ( model->index ( 0, 0 ), Qt::BackgroundColorRole ); + QVariant colorVariant = model->data ( model->index ( 0, 0 ), Qt::BackgroundRole ); if ( colorVariant.isValid() ) { QVERIFY( colorVariant.canConvert() ); } - colorVariant = model->data ( model->index ( 0, 0 ), Qt::TextColorRole ); + colorVariant = model->data ( model->index ( 0, 0 ), Qt::ForegroundRole ); if ( colorVariant.isValid() ) { QVERIFY( colorVariant.canConvert() ); }