summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-06-25 12:37:10 +0200
committerLars Knoll <lars.knoll@qt.io>2020-07-06 21:31:20 +0200
commit9a9a1a2a2e0c8bcbbaa178be3d67add3876df9b7 (patch)
tree94d877c9d1d74f978973403f6b6600e3367d8ca8 /tests/auto/gui
parentdf853fed66d891077ae2d04ecfa171d7e2cd5202 (diff)
Port QString to qsizetype
Change-Id: Id9477ccfabadd578546bb265a9483f128efb6736 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp b/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp
index 3da32a2842..4defd0da27 100644
--- a/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp
+++ b/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp
@@ -1557,26 +1557,26 @@ void tst_QTextCursor::update_data()
QTest::newRow("removeInsideSelection")
<< text
<< /*position*/ 0
- << /*anchor*/ text.length()
+ << /*anchor*/ int(text.length())
// delete 'big'
<< 6
<< 6 + charsToDelete
<< QString() // don't insert anything, just remove
<< /*expectedPosition*/ 0
- << /*expectedAnchor*/ text.length() - charsToDelete
+ << /*expectedAnchor*/ int(text.length() - charsToDelete)
;
text = "Hello big world";
charsToDelete = 3;
QTest::newRow("removeInsideSelectionWithSwappedAnchorAndPosition")
<< text
- << /*position*/ text.length()
+ << /*position*/ int(text.length())
<< /*anchor*/ 0
// delete 'big'
<< 6
<< 6 + charsToDelete
<< QString() // don't insert anything, just remove
- << /*expectedPosition*/ text.length() - charsToDelete
+ << /*expectedPosition*/ int(text.length() - charsToDelete)
<< /*expectedAnchor*/ 0
;
@@ -1587,13 +1587,13 @@ void tst_QTextCursor::update_data()
QTest::newRow("replaceInsideSelection")
<< text
<< /*position*/ 0
- << /*anchor*/ text.length()
+ << /*anchor*/ int(text.length())
// delete 'big' ...
<< 6
<< 6 + charsToDelete
<< textToInsert // ... and replace 'big' with 'small'
<< /*expectedPosition*/ 0
- << /*expectedAnchor*/ text.length() - charsToDelete + textToInsert.length()
+ << /*expectedAnchor*/ int(text.length() - charsToDelete + textToInsert.length())
;
text = "Hello big world";
@@ -1601,13 +1601,13 @@ void tst_QTextCursor::update_data()
textToInsert = "small";
QTest::newRow("replaceInsideSelectionWithSwappedAnchorAndPosition")
<< text
- << /*position*/ text.length()
+ << /*position*/ int(text.length())
<< /*anchor*/ 0
// delete 'big' ...
<< 6
<< 6 + charsToDelete
<< textToInsert // ... and replace 'big' with 'small'
- << /*expectedPosition*/ text.length() - charsToDelete + textToInsert.length()
+ << /*expectedPosition*/ int(text.length() - charsToDelete + textToInsert.length())
<< /*expectedAnchor*/ 0
;
@@ -1616,14 +1616,14 @@ void tst_QTextCursor::update_data()
charsToDelete = 3;
QTest::newRow("removeBeforeSelection")
<< text
- << /*position*/ text.length() - 5
- << /*anchor*/ text.length()
+ << /*position*/ int(text.length() - 5)
+ << /*anchor*/ int(text.length())
// delete 'big'
<< 6
<< 6 + charsToDelete
<< QString() // don't insert anything, just remove
- << /*expectedPosition*/ text.length() - 5 - charsToDelete
- << /*expectedAnchor*/ text.length() - charsToDelete
+ << /*expectedPosition*/ int(text.length() - 5 - charsToDelete)
+ << /*expectedAnchor*/ int(text.length() - charsToDelete)
;
text = "Hello big world";