diff options
Diffstat (limited to 'tests/auto/other')
32 files changed, 76 insertions, 90 deletions
diff --git a/tests/auto/other/atwrapper/atWrapper.cpp b/tests/auto/other/atwrapper/atWrapper.cpp index 4260ca18b8..a75a7b91bf 100644 --- a/tests/auto/other/atwrapper/atWrapper.cpp +++ b/tests/auto/other/atwrapper/atWrapper.cpp @@ -149,9 +149,10 @@ void atWrapper::ftpMgetDone( bool error) if ( mgetDirList.size() > 1 ) for ( int i = 1; i < mgetDirList.size(); ++i ) { - file = new QFile( QString( output ) + "/" + mgetDirList.at( 0 ) + "/" + mgetDirList.at( i ) ); + file = new QFile( QString( output ) + QLatin1Char('/') + mgetDirList.at( 0 ) + + QLatin1Char('/') + mgetDirList.at( i ) ); if (file->open(QIODevice::WriteOnly)) { - ftp.get( ftpBaseDir + "/" + mgetDirList.at( 0 ) + "/" + mgetDirList.at( i ), file ); + ftp.get( ftpBaseDir + QLatin1Char('/') + mgetDirList.at( 0 ) + QLatin1Char('/') + mgetDirList.at( i ), file ); ftp.list(); //Only there to fill up a slot in the pendingCommands queue. while ( ftp.hasPendingCommands() ) QCoreApplication::instance()->processEvents(); @@ -192,11 +193,11 @@ bool atWrapper::setupFTP() QString dir = ""; ftpMkDir( ftpBaseDir ); - ftpBaseDir += "/" + QLibraryInfo::buildKey(); + ftpBaseDir += QLatin1Char('/') + QLibraryInfo::buildKey(); ftpMkDir( ftpBaseDir ); - ftpBaseDir += "/" + QString( qVersion() ); + ftpBaseDir += QLatin1Char('/') + QString( qVersion() ); ftpMkDir( ftpBaseDir ); @@ -209,9 +210,9 @@ bool atWrapper::setupFTP() { i.next(); //qDebug() << "Creating dir with key:" << i.key(); - ftpMkDir( ftpBaseDir + "/" + QString( i.key() ) + ".failed" ); - ftpMkDir( ftpBaseDir + "/" + QString( i.key() ) + ".diff" ); - if (!ftpMkDir( ftpBaseDir + "/" + QString( i.key() ) + ".baseline" )) + ftpMkDir( ftpBaseDir + QLatin1Char('/') + QString( i.key() ) + ".failed" ); + ftpMkDir( ftpBaseDir + QLatin1Char('/') + QString( i.key() ) + ".diff" ); + if (!ftpMkDir( ftpBaseDir + QLatin1Char('/') + QString( i.key() ) + ".baseline" )) haveBaseline = false; } @@ -226,7 +227,7 @@ bool atWrapper::setupFTP() { j.next(); rmDirList.clear(); - rmDirList << ftpBaseDir + "/" + j.key() + ".failed" + "/"; + rmDirList << ftpBaseDir + QLatin1Char('/') + j.key() + ".failed/"; ftpRmDir( j.key() + ".failed" ); ftp.rmdir( j.key() + ".failed" ); ftp.mkdir( j.key() + ".failed" ); @@ -236,7 +237,7 @@ bool atWrapper::setupFTP() QCoreApplication::instance()->processEvents(); rmDirList.clear(); - rmDirList << ftpBaseDir + "/" + j.key() + ".diff" + "/"; + rmDirList << ftpBaseDir + QLatin1Char('/') + j.key() + ".diff/"; ftpRmDir( j.key() + ".diff" ); ftp.rmdir( j.key() + ".diff" ); ftp.mkdir( j.key() + ".diff" ); @@ -396,7 +397,7 @@ void atWrapper::createBaseline() for (int n = 0; n < list.size(); n++) { QFileInfo fileInfo = list.at( n ); - QFile file( QString( output ) + "/" + i.key() + "/" + fileInfo.fileName() ); + QFile file( QString( output ) + QLatin1Char('/') + i.key() + QLatin1Char('/') + fileInfo.fileName() ); file.open( QIODevice::ReadOnly ); QByteArray fileData = file.readAll(); //qDebug() << "Sending up:" << fileInfo.fileName() << "with file size" << fileData.size(); @@ -470,9 +471,9 @@ bool atWrapper::diff( QString basedir, QString dir, QString target ) //Comparing the two specified files, and then uploading them to //the ftp server if they differ - basedir += "/" + dir; + basedir += QLatin1Char('/') + dir; QString one = basedir + ".baseline/" + target; - QString two = basedir + "/" + target; + QString two = basedir + QLatin1Char('/') + target; QFile file( one ); @@ -517,7 +518,7 @@ void atWrapper::uploadDiff( QString basedir, QString dir, QString filename ) qDebug() << basedir; QImage im1( basedir + ".baseline/" + filename ); - QImage im2( basedir + "/" + filename ); + QImage im2( basedir + QLatin1Char('/') + filename ); QImage im3(im1.size(), QImage::Format_ARGB32); @@ -591,16 +592,16 @@ bool atWrapper::loadConfig( QString path ) QDir::current().mkdir( output ); - output += "/" + QLibraryInfo::buildKey(); + output += QLatin1Char('/') + QLibraryInfo::buildKey(); QDir::current().mkdir( output ); - output += "/" + QString( qVersion() ); + output += QLatin1Char('/') + QString( qVersion() ); QDir::current().mkdir( output ); - ftpBaseDir += "/" + QHostInfo::localHostName().split( "." ).first(); + ftpBaseDir += QLatin1Char('/') + QHostInfo::localHostName().split( QLatin1Char('.') ).first(); /* diff --git a/tests/auto/other/compiler/compiler.pro b/tests/auto/other/compiler/compiler.pro index 213429050f..57871429d2 100644 --- a/tests/auto/other/compiler/compiler.pro +++ b/tests/auto/other/compiler/compiler.pro @@ -6,4 +6,3 @@ QT = core testlib contains(QT_CONFIG, c++11): CONFIG += c++14 c++11 -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/other/gestures/gestures.pro b/tests/auto/other/gestures/gestures.pro index fa87dbddfb..3d0ef7c745 100644 --- a/tests/auto/other/gestures/gestures.pro +++ b/tests/auto/other/gestures/gestures.pro @@ -2,4 +2,3 @@ CONFIG += testcase TARGET = tst_gestures QT += widgets testlib gui-private SOURCES += tst_gestures.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/other/gestures/tst_gestures.cpp b/tests/auto/other/gestures/tst_gestures.cpp index 2a4f88c627..851edaeb19 100644 --- a/tests/auto/other/gestures/tst_gestures.cpp +++ b/tests/auto/other/gestures/tst_gestures.cpp @@ -36,6 +36,7 @@ #include <QtTest/qtesttouch.h> #include <qevent.h> +#include <qtouchdevice.h> #include <qwidget.h> #include <qlayout.h> #include <qgesture.h> diff --git a/tests/auto/other/lancelot/lancelot.pro b/tests/auto/other/lancelot/lancelot.pro index ef557691e3..6e79566649 100644 --- a/tests/auto/other/lancelot/lancelot.pro +++ b/tests/auto/other/lancelot/lancelot.pro @@ -1,5 +1,4 @@ CONFIG += testcase -CONFIG += parallel_test CONFIG -= app_bundle TARGET = tst_lancelot QT += xml widgets testlib @@ -12,4 +11,3 @@ RESOURCES += images.qrc include($$PWD/../../../baselineserver/shared/qbaselinetest.pri) TESTDATA += scripts/* -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/other/lancelot/paintcommands.cpp b/tests/auto/other/lancelot/paintcommands.cpp index 4fc41fd649..15454b59d2 100644 --- a/tests/auto/other/lancelot/paintcommands.cpp +++ b/tests/auto/other/lancelot/paintcommands.cpp @@ -650,7 +650,7 @@ template <typename T> T PaintCommands::image_load(const QString &filepath) QDir dir = fi.absoluteDir(); dir.cdUp(); dir.cd("images"); - QString fileName = QString("%1/%2").arg(dir.absolutePath()).arg(fi.fileName()); + QString fileName = dir.absolutePath() + QLatin1Char('/') + fi.fileName(); t = T(fileName); if (t.isNull() && !fileName.endsWith(".png")) { fileName.append(".png"); @@ -841,10 +841,11 @@ void PaintCommands::command_import(QRegExp re) qPrintable(fi.fileName())); QFileInfo fileinfo(*file); - m_commands[m_currentCommandIndex] = QString("# import file (%1) start").arg(fileinfo.fileName()); + m_commands[m_currentCommandIndex] = QLatin1String("# import file (") + fileinfo.fileName() + + QLatin1String(") start"); QString rawContent = QString::fromUtf8(file->readAll()); QStringList importedData = rawContent.split('\n', QString::SkipEmptyParts); - importedData.append(QString("# import file (%1) end ---").arg(fileinfo.fileName())); + importedData.append(QLatin1String("# import file (") + fileinfo.fileName() + QLatin1String(") end ---")); insertAt(m_currentCommandIndex, importedData); if (m_verboseMode) { @@ -862,13 +863,13 @@ void PaintCommands::command_begin_block(QRegExp re) if (m_verboseMode) printf(" -(lance) begin_block (%s)\n", qPrintable(blockName)); - m_commands[m_currentCommandIndex] = QString("# begin block (%1)").arg(blockName); + m_commands[m_currentCommandIndex] = QLatin1String("# begin block (") + blockName + QLatin1Char(')'); QStringList newBlock; int i = m_currentCommandIndex + 1; for (; i < m_commands.count(); ++i) { const QString &nextCmd = m_commands.at(i); if (nextCmd.startsWith("end_block")) { - m_commands[i] = QString("# end block (%1)").arg(blockName); + m_commands[i] = QLatin1String("# end block (") + blockName + QLatin1Char(')'); break; } newBlock += nextCmd; @@ -905,7 +906,7 @@ void PaintCommands::command_repeat_block(QRegExp re) return; } - m_commands[m_currentCommandIndex] = QString("# repeated block (%1)").arg(blockName); + m_commands[m_currentCommandIndex] = QLatin1String("# repeated block (") + blockName + QLatin1Char(')'); insertAt(m_currentCommandIndex, block); } @@ -946,7 +947,7 @@ void PaintCommands::command_drawPixmap(QRegExp re) QDir dir = fi.absoluteDir(); dir.cdUp(); dir.cd("images"); - QString fileName = QString("%1/%2").arg(dir.absolutePath()).arg(re.cap(1)); + QString fileName = dir.absolutePath() + QLatin1Char('/') + re.cap(1); pm = QPixmap(fileName); if (pm.isNull() && !fileName.endsWith(".png")) { fileName.append(".png"); @@ -995,7 +996,7 @@ void PaintCommands::command_drawImage(QRegExp re) QDir dir = fi.absoluteDir(); dir.cdUp(); dir.cd("images"); - QString fileName = QString("%1/%2").arg(dir.absolutePath()).arg(re.cap(1)); + QString fileName = dir.absolutePath() + QLatin1Char('/') + re.cap(1); im = QImage(fileName); if (im.isNull() && !fileName.endsWith(".png")) { fileName.append(".png"); @@ -1041,7 +1042,7 @@ void PaintCommands::command_drawTiledPixmap(QRegExp re) QDir dir = fi.absoluteDir(); dir.cdUp(); dir.cd("images"); - QString fileName = QString("%1/%2").arg(dir.absolutePath()).arg(re.cap(1)); + QString fileName = dir.absolutePath() + QLatin1Char('/') + re.cap(1); pm = QPixmap(fileName); if (pm.isNull() && !fileName.endsWith(".png")) { fileName.append(".png"); diff --git a/tests/auto/other/languagechange/languagechange.pro b/tests/auto/other/languagechange/languagechange.pro index 0b9c04d2ed..7dbd47f63d 100644 --- a/tests/auto/other/languagechange/languagechange.pro +++ b/tests/auto/other/languagechange/languagechange.pro @@ -1,7 +1,5 @@ CONFIG += testcase -CONFIG += parallel_test win32:testcase.timeout = 1800 # test runtime varies greatly on Windows, QTBUG-26006 TARGET = tst_languagechange QT += widgets core-private gui-private testlib SOURCES += tst_languagechange.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/other/languagechange/tst_languagechange.cpp b/tests/auto/other/languagechange/tst_languagechange.cpp index 68d604547d..493e279e18 100644 --- a/tests/auto/other/languagechange/tst_languagechange.cpp +++ b/tests/auto/other/languagechange/tst_languagechange.cpp @@ -253,7 +253,7 @@ void tst_languageChange::retranslatability() switch (dialogType) { case InputDialog: stateMachine.start(); - QInputDialog::getInteger(0, QLatin1String("title"), QLatin1String("label")); + QInputDialog::getInt(0, QLatin1String("title"), QLatin1String("label")); break; case ColorDialog: diff --git a/tests/auto/other/macgui/macgui.pro b/tests/auto/other/macgui/macgui.pro index bf805ccd75..b557806555 100644 --- a/tests/auto/other/macgui/macgui.pro +++ b/tests/auto/other/macgui/macgui.pro @@ -7,4 +7,3 @@ HEADERS += guitest.h QT = core-private widgets-private testlib requires(mac) -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/other/macnativeevents/qnativeevents.cpp b/tests/auto/other/macnativeevents/qnativeevents.cpp index 1402182042..db8f2bd193 100644 --- a/tests/auto/other/macnativeevents/qnativeevents.cpp +++ b/tests/auto/other/macnativeevents/qnativeevents.cpp @@ -222,46 +222,46 @@ QDebug operator<<(QDebug d, const QNativeEvent &e) QTextStream &operator<<(QTextStream &s, QNativeEvent *e) { - return s << e->eventId << " " << e->modifiers << " QNativeEvent"; + return s << e->eventId << ' ' << e->modifiers << " QNativeEvent"; } QTextStream &operator<<(QTextStream &s, QNativeMouseEvent *e) { - return s << e->eventId << " " << e->globalPos.x() << " " << e->globalPos.y() << " " << e->modifiers << " " << e->toString(); + return s << e->eventId << ' ' << e->globalPos.x() << ' ' << e->globalPos.y() << ' ' << e->modifiers << ' ' << e->toString(); } QTextStream &operator<<(QTextStream &s, QNativeMouseMoveEvent *e) { - return s << e->eventId << " " << e->globalPos.x() << " " << e->globalPos.y() << " " << e->modifiers << " " << e->toString(); + return s << e->eventId << ' ' << e->globalPos.x() << ' ' << e->globalPos.y() << ' ' << e->modifiers << ' ' << e->toString(); } QTextStream &operator<<(QTextStream &s, QNativeMouseButtonEvent *e) { - return s << e->eventId << " " << e->globalPos.x() << " " << e->globalPos.y() << " " << e->button - << " " << e->clickCount << " " << e->modifiers << " " << e->toString(); + return s << e->eventId << ' ' << e->globalPos.x() << ' ' << e->globalPos.y() << ' ' << e->button + << ' ' << e->clickCount << ' ' << e->modifiers << ' ' << e->toString(); } QTextStream &operator<<(QTextStream &s, QNativeMouseDragEvent *e) { - return s << e->eventId << " " << e->globalPos.x() << " " << e->globalPos.y() << " " << e->button << " " << e->clickCount - << " " << e->modifiers << " " << e->toString(); + return s << e->eventId << ' ' << e->globalPos.x() << ' ' << e->globalPos.y() << ' ' << e->button << ' ' << e->clickCount + << ' ' << e->modifiers << ' ' << e->toString(); } QTextStream &operator<<(QTextStream &s, QNativeMouseWheelEvent *e) { - return s << e->eventId << " " << e->globalPos.x() << " " << e->globalPos.y() << " " << e->delta - << " " << e->modifiers << " " << e->toString(); + return s << e->eventId << ' ' << e->globalPos.x() << ' ' << e->globalPos.y() << ' ' << e->delta + << ' ' << e->modifiers << ' ' << e->toString(); } QTextStream &operator<<(QTextStream &s, QNativeKeyEvent *e) { - return s << e->eventId << " " << e->press << " " << e->nativeKeyCode << " " << e->character - << " " << e->modifiers << " " << e->toString(); + return s << e->eventId << ' ' << e->press << ' ' << e->nativeKeyCode << ' ' << e->character + << ' ' << e->modifiers << ' ' << e->toString(); } QTextStream &operator<<(QTextStream &s, QNativeModifierEvent *e) { - return s << e->eventId << " " << e->modifiers << " " << e->nativeKeyCode << " " << e->toString(); + return s << e->eventId << ' ' << e->modifiers << ' ' << e->nativeKeyCode << ' ' << e->toString(); } diff --git a/tests/auto/other/macplist/app/app.pro b/tests/auto/other/macplist/app/app.pro index c4dfedb104..9ccac831d0 100644 --- a/tests/auto/other/macplist/app/app.pro +++ b/tests/auto/other/macplist/app/app.pro @@ -1,4 +1,3 @@ QT += widgets SOURCES += main.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/other/macplist/test/test.pro b/tests/auto/other/macplist/test/test.pro index 6dad17ab67..5018abeca9 100644 --- a/tests/auto/other/macplist/test/test.pro +++ b/tests/auto/other/macplist/test/test.pro @@ -10,4 +10,3 @@ win32 { TARGET = ../../release/tst_macplist } } -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/other/modeltest/dynamictreemodel.cpp b/tests/auto/other/modeltest/dynamictreemodel.cpp index c7cf04231f..bdf2b604fd 100644 --- a/tests/auto/other/modeltest/dynamictreemodel.cpp +++ b/tests/auto/other/modeltest/dynamictreemodel.cpp @@ -299,7 +299,8 @@ bool ModelResetCommand::emitPreSignal(const QModelIndex &srcParent, int srcStart void ModelResetCommand::emitPostSignal() { - m_model->reset(); + m_model->beginResetModel(); + m_model->endResetModel(); } ModelResetCommandFixed::ModelResetCommandFixed(DynamicTreeModel* model, QObject* parent) diff --git a/tests/auto/other/modeltest/modeltest.pro b/tests/auto/other/modeltest/modeltest.pro index 045299e095..8e96058449 100644 --- a/tests/auto/other/modeltest/modeltest.pro +++ b/tests/auto/other/modeltest/modeltest.pro @@ -3,7 +3,3 @@ TARGET = tst_modeltest QT += widgets testlib SOURCES += tst_modeltest.cpp modeltest.cpp dynamictreemodel.cpp HEADERS += modeltest.h dynamictreemodel.h - - - -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/other/networkselftest/networkselftest.pro b/tests/auto/other/networkselftest/networkselftest.pro index 22208e02fb..c387ca2e84 100644 --- a/tests/auto/other/networkselftest/networkselftest.pro +++ b/tests/auto/other/networkselftest/networkselftest.pro @@ -5,4 +5,3 @@ SOURCES += tst_networkselftest.cpp QT = core core-private network testlib win32:CONFIG += insignificant_test # QTBUG-27571 -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/other/networkselftest/tst_networkselftest.cpp b/tests/auto/other/networkselftest/tst_networkselftest.cpp index 7ce385121c..257a7fc03d 100644 --- a/tests/auto/other/networkselftest/tst_networkselftest.cpp +++ b/tests/auto/other/networkselftest/tst_networkselftest.cpp @@ -986,8 +986,8 @@ void tst_NetworkSelfTest::smbServer() static const char contents[] = "This is 34 bytes. Do not change..."; #ifdef Q_OS_WIN // use Windows's native UNC support to try and open a file on the server - QString filepath = QString("\\\\%1\\testshare\\test.pri").arg(QtNetworkSettings::winServerName()); - FILE *f = fopen(filepath.toLatin1(), "rb"); + QByteArray filepath = "\\\\" + QtNetworkSettings::winServerName().toLatin1() + "\\testshare\\test.pri"; + FILE *f = fopen(filepath.constData(), "rb"); QVERIFY2(f, qt_error_string().toLocal8Bit()); char buf[128]; diff --git a/tests/auto/other/qaccessibility/qaccessibility.pro b/tests/auto/other/qaccessibility/qaccessibility.pro index 1d6fc6bcd1..ef3b469ba1 100644 --- a/tests/auto/other/qaccessibility/qaccessibility.pro +++ b/tests/auto/other/qaccessibility/qaccessibility.pro @@ -21,4 +21,3 @@ win32 { LIBS += -luuid !winphone: LIBS += -loleacc -loleaut32 -lole32 } -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp index 62c2c0a916..8fe4d976b3 100644 --- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp @@ -573,7 +573,7 @@ static QWidget *createWidgets() int i = 0; box->addWidget(new QComboBox(w)); - box->addWidget(new QPushButton(QString::fromLatin1("widget text %1").arg(i++), w)); + box->addWidget(new QPushButton(QLatin1String("widget text ") + QString::number(i++), w)); box->addWidget(new QHeaderView(Qt::Vertical, w)); box->addWidget(new QTreeView(w)); box->addWidget(new QTreeWidget(w)); @@ -583,25 +583,25 @@ static QWidget *createWidgets() box->addWidget(new QTableWidget(w)); box->addWidget(new QCalendarWidget(w)); box->addWidget(new QDialogButtonBox(w)); - box->addWidget(new QGroupBox(QString::fromLatin1("widget text %1").arg(i++), w)); + box->addWidget(new QGroupBox(QLatin1String("widget text ") + QString::number(i++), w)); box->addWidget(new QFrame(w)); - box->addWidget(new QLineEdit(QString::fromLatin1("widget text %1").arg(i++), w)); + box->addWidget(new QLineEdit(QLatin1String("widget text ") + QString::number(i++), w)); box->addWidget(new QProgressBar(w)); box->addWidget(new QTabWidget(w)); - box->addWidget(new QCheckBox(QString::fromLatin1("widget text %1").arg(i++), w)); - box->addWidget(new QRadioButton(QString::fromLatin1("widget text %1").arg(i++), w)); + box->addWidget(new QCheckBox(QLatin1String("widget text ") + QString::number(i++), w)); + box->addWidget(new QRadioButton(QLatin1String("widget text ") + QString::number(i++), w)); box->addWidget(new QDial(w)); box->addWidget(new QScrollBar(w)); box->addWidget(new QSlider(w)); box->addWidget(new QDateTimeEdit(w)); box->addWidget(new QDoubleSpinBox(w)); box->addWidget(new QSpinBox(w)); - box->addWidget(new QLabel(QString::fromLatin1("widget text %1").arg(i++), w)); + box->addWidget(new QLabel(QLatin1String("widget text ") + QString::number(i++), w)); box->addWidget(new QLCDNumber(w)); box->addWidget(new QStackedWidget(w)); box->addWidget(new QToolBox(w)); - box->addWidget(new QLabel(QString::fromLatin1("widget text %1").arg(i++), w)); - box->addWidget(new QTextEdit(QString::fromLatin1("widget text %1").arg(i++), w)); + box->addWidget(new QLabel(QLatin1String("widget text ") + QString::number(i++), w)); + box->addWidget(new QTextEdit(QLatin1String("widget text ") + QString::number(i++), w)); /* Not in the list * QAbstractItemView, QGraphicsView, QScrollArea, @@ -1763,7 +1763,7 @@ void tst_QAccessibility::textEditTest() } edit.show(); - QTest::qWaitForWindowShown(&edit); + QTest::qWaitForWindowExposed(&edit); QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(&edit); QCOMPARE(iface->text(QAccessible::Value), edit.toPlainText()); QVERIFY(iface->state().focusable); @@ -2175,7 +2175,7 @@ void tst_QAccessibility::lineEditTest() QLineEdit le(QStringLiteral("My characters have geometries."), toplevel); // characterRect() le.show(); - QTest::qWaitForWindowShown(&le); + QTest::qWaitForWindowExposed(&le); QAccessibleInterface *iface(QAccessible::queryAccessibleInterface(&le)); QAccessibleTextInterface* textIface = iface->textInterface(); QVERIFY(textIface); @@ -2322,9 +2322,13 @@ void tst_QAccessibility::lineEditTextFunctions_data() QTest::newRow("char after 6") << "hello" << 2 << (int) QAccessible::CharBoundary << 3 << 6 << -1 << -1 << ""; for (int i = -2; i < 6; ++i) { - QTest::newRow(QString::fromLatin1("line before %1").arg(i).toLocal8Bit().constData()) << "hello" << 0 << (int) QAccessible::LineBoundary << 3 << i << -1 << -1 << ""; - QTest::newRow(QString::fromLatin1("line at %1").arg(i).toLocal8Bit().constData()) << "hello" << 1 << (int) QAccessible::LineBoundary << 3 << i << 0 << 5 << "hello"; - QTest::newRow(QString::fromLatin1("line after %1").arg(i).toLocal8Bit().constData()) << "hello" << 2 << (int) QAccessible::LineBoundary << 3 << i << -1 << -1 << ""; + const QByteArray iB = QByteArray::number(i); + QTest::newRow(("line before " + iB).constData()) + << "hello" << 0 << (int) QAccessible::LineBoundary << 3 << i << -1 << -1 << ""; + QTest::newRow(("line at " + iB).constData()) + << "hello" << 1 << (int) QAccessible::LineBoundary << 3 << i << 0 << 5 << "hello"; + QTest::newRow(("line after " + iB).constData()) + << "hello" << 2 << (int) QAccessible::LineBoundary << 3 << i << -1 << -1 << ""; } } @@ -3576,7 +3580,7 @@ void tst_QAccessibility::comboBoxTest() // Fully decorated windows have a minimum width of 160 on Windows. combo.setMinimumWidth(200); combo.show(); - QVERIFY(QTest::qWaitForWindowShown(&combo)); + QVERIFY(QTest::qWaitForWindowExposed(&combo)); QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(&combo); QCOMPARE(verifyHierarchy(iface), 0); diff --git a/tests/auto/other/qaccessibilitymac/qaccessibilitymac.pro b/tests/auto/other/qaccessibilitymac/qaccessibilitymac.pro index 5d81567f45..ceed81c914 100644 --- a/tests/auto/other/qaccessibilitymac/qaccessibilitymac.pro +++ b/tests/auto/other/qaccessibilitymac/qaccessibilitymac.pro @@ -13,4 +13,3 @@ mac { requires(mac) -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm b/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm index 3056904dcf..5f6826e7f7 100644 --- a/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm +++ b/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm @@ -42,7 +42,7 @@ #include <QtTest> #include <unistd.h> -#import <Cocoa/Cocoa.h> +#import <AppKit/AppKit.h> #import <ApplicationServices/ApplicationServices.h> QT_USE_NAMESPACE diff --git a/tests/auto/other/qcomplextext/qcomplextext.pro b/tests/auto/other/qcomplextext/qcomplextext.pro index 28acc397bf..98dbd3b214 100644 --- a/tests/auto/other/qcomplextext/qcomplextext.pro +++ b/tests/auto/other/qcomplextext/qcomplextext.pro @@ -1,7 +1,5 @@ CONFIG += testcase -CONFIG += parallel_test TARGET = tst_qcomplextext QT += testlib QT += core-private gui-private SOURCES += tst_qcomplextext.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/other/qfocusevent/qfocusevent.pro b/tests/auto/other/qfocusevent/qfocusevent.pro index c6e31d2e50..5f799291c6 100644 --- a/tests/auto/other/qfocusevent/qfocusevent.pro +++ b/tests/auto/other/qfocusevent/qfocusevent.pro @@ -2,4 +2,3 @@ CONFIG += testcase TARGET = tst_qfocusevent QT += widgets testlib SOURCES += tst_qfocusevent.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/qnetworkaccessmanager_and_qprogressdialog.pro b/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/qnetworkaccessmanager_and_qprogressdialog.pro index e34990d513..b03a448dfb 100644 --- a/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/qnetworkaccessmanager_and_qprogressdialog.pro +++ b/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/qnetworkaccessmanager_and_qprogressdialog.pro @@ -1,6 +1,4 @@ CONFIG += testcase -CONFIG += parallel_test TARGET = tst_qnetworkaccessmanager_and_qprogressdialog SOURCES += tst_qnetworkaccessmanager_and_qprogressdialog.cpp QT += network widgets testlib -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/other/qobjectperformance/qobjectperformance.pro b/tests/auto/other/qobjectperformance/qobjectperformance.pro index 78423bee9c..189f8eeb2a 100644 --- a/tests/auto/other/qobjectperformance/qobjectperformance.pro +++ b/tests/auto/other/qobjectperformance/qobjectperformance.pro @@ -5,4 +5,3 @@ SOURCES += tst_qobjectperformance.cpp QT = core network testlib -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/other/qobjectrace/qobjectrace.pro b/tests/auto/other/qobjectrace/qobjectrace.pro index b5848edb01..94e7928585 100644 --- a/tests/auto/other/qobjectrace/qobjectrace.pro +++ b/tests/auto/other/qobjectrace/qobjectrace.pro @@ -2,6 +2,3 @@ CONFIG += testcase SOURCES += tst_qobjectrace.cpp QT = core testlib -TARGET.EPOCHEAPSIZE = 20000000 40000000 -CONFIG += parallel_test -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/other/qprocess_and_guieventloop/test.pro b/tests/auto/other/qprocess_and_guieventloop/test.pro index 54d6f194b0..50c4e1d72b 100644 --- a/tests/auto/other/qprocess_and_guieventloop/test.pro +++ b/tests/auto/other/qprocess_and_guieventloop/test.pro @@ -1,5 +1,4 @@ CONFIG += testcase -CONFIG += parallel_test QT = core gui testlib SOURCES = tst_qprocess_and_guieventloop.cpp TARGET = tst_qprocess_and_guieventloop diff --git a/tests/auto/other/qsharedpointer_and_qwidget/qsharedpointer_and_qwidget.pro b/tests/auto/other/qsharedpointer_and_qwidget/qsharedpointer_and_qwidget.pro index c7a4f3e216..722f575f80 100644 --- a/tests/auto/other/qsharedpointer_and_qwidget/qsharedpointer_and_qwidget.pro +++ b/tests/auto/other/qsharedpointer_and_qwidget/qsharedpointer_and_qwidget.pro @@ -1,7 +1,5 @@ CONFIG += testcase -CONFIG += parallel_test TARGET = tst_qsharedpointer_and_qwidget QT += widgets testlib SOURCES += tst_qsharedpointer_and_qwidget.cpp DEFINES += SRCDIR=\\\"$$PWD/\\\" -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/other/qtokenautomaton/qtokenautomaton.pro b/tests/auto/other/qtokenautomaton/qtokenautomaton.pro index 2c0b3dae9b..e4d0160f80 100644 --- a/tests/auto/other/qtokenautomaton/qtokenautomaton.pro +++ b/tests/auto/other/qtokenautomaton/qtokenautomaton.pro @@ -16,5 +16,3 @@ HEADERS += tokenizers/basic/basic.h \ tokenizers/withNamespace/withNamespace.h QT = core testlib -CONFIG += parallel_test -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/other/qvariant_common/tst_qvariant_common.h b/tests/auto/other/qvariant_common/tst_qvariant_common.h index 79a5707de8..6a7c125089 100644 --- a/tests/auto/other/qvariant_common/tst_qvariant_common.h +++ b/tests/auto/other/qvariant_common/tst_qvariant_common.h @@ -72,7 +72,7 @@ protected: currentName.chop(1); ok &= (msg.contains(", " + currentName) || msg.contains(", 0x0")); } - ok &= msg.endsWith(")"); + ok &= msg.endsWith(QLatin1Char(')')); QVERIFY2(ok, (QString::fromLatin1("Message is not correctly finished: '") + msg + '\'').toLatin1().constData()); } diff --git a/tests/auto/other/toolsupport/toolsupport.pro b/tests/auto/other/toolsupport/toolsupport.pro index 274ead2c35..7603dea79e 100644 --- a/tests/auto/other/toolsupport/toolsupport.pro +++ b/tests/auto/other/toolsupport/toolsupport.pro @@ -1,4 +1,4 @@ -CONFIG += testcase parallel_test +CONFIG += testcase TARGET = tst_toolsupport QT = testlib core-private SOURCES = $$PWD/tst_toolsupport.cpp diff --git a/tests/auto/other/toolsupport/tst_toolsupport.cpp b/tests/auto/other/toolsupport/tst_toolsupport.cpp index bbd787bf38..a5b85ef221 100644 --- a/tests/auto/other/toolsupport/tst_toolsupport.cpp +++ b/tests/auto/other/toolsupport/tst_toolsupport.cpp @@ -29,6 +29,16 @@ #include <QtTest> +// +// Note: +// +// When this test here fails and the change leading to the failure +// intentionally changed a private class, adjust the test here and bump +// the TypeInformationVersion field in src/corelib/global/qhooks.cpp +// in the same commit as the modification to the private class. +// + + // Don't do this at home. This is test code, not production. #define protected public #define private public diff --git a/tests/auto/other/windowsmobile/test/test.pro b/tests/auto/other/windowsmobile/test/test.pro index 5f744c2acb..36dd15f60e 100644 --- a/tests/auto/other/windowsmobile/test/test.pro +++ b/tests/auto/other/windowsmobile/test/test.pro @@ -1,6 +1,5 @@ CONFIG += testcase -CONFIG += parallel_test QT += widgets testlib HEADERS += ddhelper.h SOURCES += tst_windowsmobile.cpp ddhelper.cpp @@ -22,4 +21,3 @@ wincewm*: { -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 |