diff options
author | Liang Qi <liang.qi@qt.io> | 2017-11-17 08:50:42 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-11-17 08:59:14 +0100 |
commit | c4885b21d6d18364d931cb103bd5a7306748d9b8 (patch) | |
tree | 5ca6eb8e67d22580d598e7bd3a9ab8984e88bcec /tests/auto | |
parent | 2caebf42a70cceb21b46b08e341c3cbf928b1fc8 (diff) | |
parent | f6c9f0312888317c0cd6a85cd3f238bb4e0295c5 (diff) |
Merge remote-tracking branch 'origin/5.9' into 5.10
Also blacklist tst_QNetworkReply::ioHttpRedirectErrors(too-many-redirects)
on RHEL 6.6 in CI.
Conflicts:
tests/auto/network/access/qnetworkreply/BLACKLIST
tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
Task-number: QTBUG-64569
Change-Id: I7514fc0660c18fd3a3e1d0d0af3f15d879e3c6f4
Diffstat (limited to 'tests/auto')
3 files changed, 53 insertions, 0 deletions
diff --git a/tests/auto/network/access/qnetworkreply/BLACKLIST b/tests/auto/network/access/qnetworkreply/BLACKLIST index acea0a5aad..d6fc717e37 100644 --- a/tests/auto/network/access/qnetworkreply/BLACKLIST +++ b/tests/auto/network/access/qnetworkreply/BLACKLIST @@ -30,9 +30,13 @@ linux [ioHttpRedirectPostPut] linux windows +[putToFtp] +windows ci [putWithServerClosingConnectionImmediately] windows [qtbug28035browserDoesNotLoadQtProjectOrgCorrectly] windows [getFromUnreachableIp] windows msvc-2017 +[ioHttpRedirectErrors:too-many-redirects] +rhel-6.6 ci diff --git a/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp b/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp index 81206a5856..7bfa29ec8e 100644 --- a/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp +++ b/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp @@ -100,6 +100,9 @@ void tst_QSqlDriver::cleanupTestCase() foreach (const QString &dbName, dbs.dbNames) { QSqlDatabase db = QSqlDatabase::database(dbName); tst_Databases::safeDropTable(db, qTableName("relTEST1", __FILE__, db)); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); + if (dbType == QSqlDriver::Oracle) + tst_Databases::safeDropTable(db, qTableName("clobTable", __FILE__, db)); } dbs.close(); } @@ -214,6 +217,20 @@ void tst_QSqlDriver::primaryIndex() QCOMPARE(index.count(), 1); //mysql will always find the table name regardless of casing else QCOMPARE(index.count(), 0); + + // Test getting a primary index for a table with a clob in it - QTBUG-64427 + if (dbType == QSqlDriver::Oracle) { + const QString clobTable(qTableName("clobTable", __FILE__, db)); + QSqlQuery qry(db); + QVERIFY_SQL(qry, exec("CREATE TABLE " + clobTable + " (id INTEGER, clobField CLOB)")); + QVERIFY_SQL(qry, exec("CREATE UNIQUE INDEX " + clobTable + "IDX ON " + clobTable + " (id)")); + QVERIFY_SQL(qry, exec("ALTER TABLE " + clobTable + " ADD CONSTRAINT " + clobTable + + "PK PRIMARY KEY(id)")); + QVERIFY_SQL(qry, exec("ALTER TABLE " + clobTable + " MODIFY (id NOT NULL ENABLE)")); + const QSqlIndex primaryIndex = db.driver()->primaryIndex(clobTable); + QCOMPARE(primaryIndex.count(), 1); + QCOMPARE(primaryIndex.fieldName(0), QStringLiteral("ID")); + } } void tst_QSqlDriver::formatValue() diff --git a/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp b/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp index 9efa8cf47e..bc7756d32f 100644 --- a/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp +++ b/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp @@ -68,6 +68,7 @@ private slots: void shortcutEvents(); void stopRepeatTimer(); + void mouseReleased(); // QTBUG-53244 #ifdef QT_KEYPAD_NAVIGATION void keyNavigation(); #endif @@ -563,6 +564,37 @@ void tst_QAbstractButton::stopRepeatTimer() QCOMPARE(button.timerEventCount(), 0); } +void tst_QAbstractButton::mouseReleased() // QTBUG-53244 +{ + MyButton button(nullptr); + button.setObjectName("button"); + button.setGeometry(0, 0, 20, 20); + QSignalSpy spyPress(&button, &QAbstractButton::pressed); + QSignalSpy spyRelease(&button, &QAbstractButton::released); + + QTest::mousePress(&button, Qt::LeftButton); + QCOMPARE(spyPress.count(), 1); + QCOMPARE(button.isDown(), true); + QCOMPARE(spyRelease.count(), 0); + + QTest::mouseClick(&button, Qt::RightButton); + QCOMPARE(spyPress.count(), 1); + QCOMPARE(button.isDown(), true); + QCOMPARE(spyRelease.count(), 0); + + QPointF posOutOfWidget = QPointF(30, 30); + QMouseEvent me(QEvent::MouseMove, + posOutOfWidget, Qt::NoButton, + Qt::MouseButtons(Qt::LeftButton), + Qt::NoModifier); // mouse press and move + + qApp->sendEvent(&button, &me); + // should emit released signal once mouse is dragging out of boundary + QCOMPARE(spyPress.count(), 1); + QCOMPARE(button.isDown(), false); + QCOMPARE(spyRelease.count(), 1); +} + #ifdef QT_KEYPAD_NAVIGATION void tst_QAbstractButton::keyNavigation() { |