diff options
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() { |