diff options
3 files changed, 27 insertions, 27 deletions
diff --git a/tests/auto/qml/debugger/qqmldebugtranslationclient/tst_qqmldebugtranslationclient.cpp b/tests/auto/qml/debugger/qqmldebugtranslationclient/tst_qqmldebugtranslationclient.cpp index 1c73eb8521..2cdf0a5029 100644 --- a/tests/auto/qml/debugger/qqmldebugtranslationclient/tst_qqmldebugtranslationclient.cpp +++ b/tests/auto/qml/debugger/qqmldebugtranslationclient/tst_qqmldebugtranslationclient.cpp @@ -121,20 +121,20 @@ private: QString getNewProcessOutput(int updateTimeOut = 10) { - int newCurrentOutputLine = 0; + qsizetype newCurrentOutputLine = 0; int counter = 0; do { counter++; - newCurrentOutputLine = m_process->output().count(); + newCurrentOutputLine = m_process->output().size(); if (newCurrentOutputLine > m_currentOutputLine) { // lets wait a little bit more to not cut anything int triggeredCount = 0; int debugCounter = 0; do { debugCounter++; - triggeredCount = m_process->output().count(); + triggeredCount = m_process->output().size(); QTest::qWait(updateTimeOut); - newCurrentOutputLine = m_process->output().count(); + newCurrentOutputLine = m_process->output().size(); } while (triggeredCount != newCurrentOutputLine); QString currentOutputString = m_process->output().right(newCurrentOutputLine - m_currentOutputLine); if (m_enableClientOutput) @@ -159,7 +159,7 @@ private: QPointer<QQmlDebugTranslationClient> m_debugTranslationClient; QPointer<QQmlPreviewClient> m_previewClient; - int m_currentOutputLine = 0; + qsizetype m_currentOutputLine = 0; bool m_enableClientOutput = true; }; diff --git a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp index c15a626d33..73ad7e5961 100644 --- a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp +++ b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp @@ -1488,7 +1488,7 @@ void tst_qquicktextedit::selection() QCOMPARE(textEditObject->selectionEnd(), 0); QVERIFY(textEditObject->selectedText().isNull()); - textEditObject->setCursorPosition(textEditObject->text().count()+1); + textEditObject->setCursorPosition(textEditObject->text().length()+1); QCOMPARE(textEditObject->cursorPosition(), 0); QCOMPARE(textEditObject->selectionStart(), 0); QCOMPARE(textEditObject->selectionEnd(), 0); @@ -1645,24 +1645,24 @@ void tst_qquicktextedit::isRightToLeft() // first test that the right string is delivered to the QString::isRightToLeft() QCOMPARE(textEdit.isRightToLeft(0,0), text.mid(0,0).isRightToLeft()); QCOMPARE(textEdit.isRightToLeft(0,1), text.mid(0,1).isRightToLeft()); - QCOMPARE(textEdit.isRightToLeft(text.count()-2, text.count()-1), text.mid(text.count()-2, text.count()-1).isRightToLeft()); - QCOMPARE(textEdit.isRightToLeft(text.count()/2, text.count()/2 + 1), text.mid(text.count()/2, text.count()/2 + 1).isRightToLeft()); - QCOMPARE(textEdit.isRightToLeft(0,text.count()/4), text.mid(0,text.count()/4).isRightToLeft()); - QCOMPARE(textEdit.isRightToLeft(text.count()/4,3*text.count()/4), text.mid(text.count()/4,3*text.count()/4).isRightToLeft()); + QCOMPARE(textEdit.isRightToLeft(text.length()-2, text.length()-1), text.mid(text.length()-2, text.length()-1).isRightToLeft()); + QCOMPARE(textEdit.isRightToLeft(text.length()/2, text.length()/2 + 1), text.mid(text.length()/2, text.length()/2 + 1).isRightToLeft()); + QCOMPARE(textEdit.isRightToLeft(0,text.length()/4), text.mid(0,text.length()/4).isRightToLeft()); + QCOMPARE(textEdit.isRightToLeft(text.length()/4,3*text.length()/4), text.mid(text.length()/4,3*text.length()/4).isRightToLeft()); if (text.isEmpty()) QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: QML TextEdit: isRightToLeft(start, end) called with the end property being smaller than the start."); - QCOMPARE(textEdit.isRightToLeft(3*text.count()/4,text.count()-1), text.mid(3*text.count()/4,text.count()-1).isRightToLeft()); + QCOMPARE(textEdit.isRightToLeft(3*text.length()/4,text.length()-1), text.mid(3*text.length()/4,text.length()-1).isRightToLeft()); // then test that the feature actually works QCOMPARE(textEdit.isRightToLeft(0,0), emptyString); QCOMPARE(textEdit.isRightToLeft(0,1), firstCharacter); - QCOMPARE(textEdit.isRightToLeft(text.count()-2, text.count()-1), lastCharacter); - QCOMPARE(textEdit.isRightToLeft(text.count()/2, text.count()/2 + 1), middleCharacter); - QCOMPARE(textEdit.isRightToLeft(0,text.count()/4), startString); - QCOMPARE(textEdit.isRightToLeft(text.count()/4,3*text.count()/4), midString); + QCOMPARE(textEdit.isRightToLeft(text.length()-2, text.length()-1), lastCharacter); + QCOMPARE(textEdit.isRightToLeft(text.length()/2, text.length()/2 + 1), middleCharacter); + QCOMPARE(textEdit.isRightToLeft(0,text.length()/4), startString); + QCOMPARE(textEdit.isRightToLeft(text.length()/4,3*text.length()/4), midString); if (text.isEmpty()) QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: QML TextEdit: isRightToLeft(start, end) called with the end property being smaller than the start."); - QCOMPARE(textEdit.isRightToLeft(3*text.count()/4,text.count()-1), endString); + QCOMPARE(textEdit.isRightToLeft(3*text.length()/4,text.length()-1), endString); } void tst_qquicktextedit::keySelection() diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp index 42099762f0..cb6f61d845 100644 --- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp +++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp @@ -678,7 +678,7 @@ void tst_qquicktextinput::selection() QCOMPARE(textinputObject->selectionEnd(), 0); QVERIFY(textinputObject->selectedText().isNull()); - textinputObject->setCursorPosition(textinputObject->text().count()+1); + textinputObject->setCursorPosition(textinputObject->text().length() + 1); QCOMPARE(textinputObject->cursorPosition(), 0); QCOMPARE(textinputObject->selectionStart(), 0); QCOMPARE(textinputObject->selectionEnd(), 0); @@ -866,24 +866,24 @@ void tst_qquicktextinput::isRightToLeft() // first test that the right string is delivered to the QString::isRightToLeft() QCOMPARE(textInput.isRightToLeft(0,0), text.mid(0,0).isRightToLeft()); QCOMPARE(textInput.isRightToLeft(0,1), text.mid(0,1).isRightToLeft()); - QCOMPARE(textInput.isRightToLeft(text.count()-2, text.count()-1), text.mid(text.count()-2, text.count()-1).isRightToLeft()); - QCOMPARE(textInput.isRightToLeft(text.count()/2, text.count()/2 + 1), text.mid(text.count()/2, text.count()/2 + 1).isRightToLeft()); - QCOMPARE(textInput.isRightToLeft(0,text.count()/4), text.mid(0,text.count()/4).isRightToLeft()); - QCOMPARE(textInput.isRightToLeft(text.count()/4,3*text.count()/4), text.mid(text.count()/4,3*text.count()/4).isRightToLeft()); + QCOMPARE(textInput.isRightToLeft(text.length()-2, text.length()-1), text.mid(text.length()-2, text.length()-1).isRightToLeft()); + QCOMPARE(textInput.isRightToLeft(text.length()/2, text.length()/2 + 1), text.mid(text.length()/2, text.length()/2 + 1).isRightToLeft()); + QCOMPARE(textInput.isRightToLeft(0,text.length()/4), text.mid(0,text.length()/4).isRightToLeft()); + QCOMPARE(textInput.isRightToLeft(text.length()/4,3*text.length()/4), text.mid(text.length()/4,3*text.length()/4).isRightToLeft()); if (text.isEmpty()) QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: QML TextInput: isRightToLeft(start, end) called with the end property being smaller than the start."); - QCOMPARE(textInput.isRightToLeft(3*text.count()/4,text.count()-1), text.mid(3*text.count()/4,text.count()-1).isRightToLeft()); + QCOMPARE(textInput.isRightToLeft(3*text.length()/4,text.length()-1), text.mid(3*text.length()/4,text.length()-1).isRightToLeft()); // then test that the feature actually works QCOMPARE(textInput.isRightToLeft(0,0), emptyString); QCOMPARE(textInput.isRightToLeft(0,1), firstCharacter); - QCOMPARE(textInput.isRightToLeft(text.count()-2, text.count()-1), lastCharacter); - QCOMPARE(textInput.isRightToLeft(text.count()/2, text.count()/2 + 1), middleCharacter); - QCOMPARE(textInput.isRightToLeft(0,text.count()/4), startString); - QCOMPARE(textInput.isRightToLeft(text.count()/4,3*text.count()/4), midString); + QCOMPARE(textInput.isRightToLeft(text.length()-2, text.length()-1), lastCharacter); + QCOMPARE(textInput.isRightToLeft(text.length()/2, text.length()/2 + 1), middleCharacter); + QCOMPARE(textInput.isRightToLeft(0,text.length()/4), startString); + QCOMPARE(textInput.isRightToLeft(text.length()/4,3*text.length()/4), midString); if (text.isEmpty()) QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: QML TextInput: isRightToLeft(start, end) called with the end property being smaller than the start."); - QCOMPARE(textInput.isRightToLeft(3*text.count()/4,text.count()-1), endString); + QCOMPARE(textInput.isRightToLeft(3*text.length()/4,text.length()-1), endString); } void tst_qquicktextinput::moveCursorSelection_data() |