Silence warnings from usage of deprecated APIs in tests
Change-Id: I443705ab5ff75512393877f360468ad903df03b9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This commit is contained in:
parent
c3c53af394
commit
86b04bb1fa
|
@ -3606,11 +3606,11 @@ void tst_qquicktext::fontSizeMode()
|
|||
// and text is NOT wrapped
|
||||
myText->setVAlign(QQuickText::AlignBottom);
|
||||
myText->setFontSizeMode(QQuickText::Fit);
|
||||
QVERIFY(QQuickTest::qWaitForItemPolished(myText));
|
||||
QVERIFY(QQuickTest::qWaitForPolish(myText));
|
||||
|
||||
int baselineOffset = myText->baselineOffset();
|
||||
myText->setHeight(myText->height() * 2);
|
||||
QVERIFY(QQuickTest::qWaitForItemPolished(myText));
|
||||
QVERIFY(QQuickTest::qWaitForPolish(myText));
|
||||
QVERIFY(myText->baselineOffset() > baselineOffset);
|
||||
|
||||
// Growing height needs to update the baselineOffset when AlignBottom is used
|
||||
|
@ -3619,11 +3619,11 @@ void tst_qquicktext::fontSizeMode()
|
|||
myText->setFontSizeMode(QQuickText::Fit);
|
||||
myText->setWrapMode(QQuickText::NoWrap);
|
||||
myText->resetMaximumLineCount();
|
||||
QVERIFY(QQuickTest::qWaitForItemPolished(myText));
|
||||
QVERIFY(QQuickTest::qWaitForPolish(myText));
|
||||
|
||||
baselineOffset = myText->baselineOffset();
|
||||
myText->setHeight(myText->height() * 2);
|
||||
QVERIFY(QQuickTest::qWaitForItemPolished(myText));
|
||||
QVERIFY(QQuickTest::qWaitForPolish(myText));
|
||||
QVERIFY(myText->baselineOffset() > baselineOffset);
|
||||
|
||||
// Check baselineOffset for the HorizontalFit case
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
using namespace QQuickViewTestUtils;
|
||||
using namespace QQuickVisualTestUtils;
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
#define LOAD_TREEVIEW(fileName) \
|
||||
view->setSource(testFileUrl(fileName)); \
|
||||
view->show(); \
|
||||
|
@ -1111,7 +1113,7 @@ void tst_qquicktreeview::sortTreeModelDynamic()
|
|||
|
||||
// Now change the text in one of the items. This will trigger
|
||||
// a sort for only one of the parents in the model.
|
||||
proxyModel.setData(treeView->modelIndex(0, row), u"xxx"_qs, Qt::DisplayRole);
|
||||
proxyModel.setData(treeView->modelIndex(0, row), u"xxx"_s, Qt::DisplayRole);
|
||||
|
||||
for (int row = 0; row < treeView->rows(); ++row) {
|
||||
const auto index = treeView->modelIndex(0, row);
|
||||
|
|
Loading…
Reference in New Issue