diff options
-rw-r--r-- | src/network/access/qhttp2protocolhandler.cpp | 2 | ||||
-rw-r--r-- | src/plugins/sqldrivers/oci/qsql_oci.cpp | 2 | ||||
-rw-r--r-- | src/widgets/widgets/qabstractbutton.cpp | 3 | ||||
-rw-r--r-- | tests/auto/network/access/qnetworkreply/BLACKLIST | 4 | ||||
-rw-r--r-- | tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp | 17 | ||||
-rw-r--r-- | tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp | 32 |
6 files changed, 57 insertions, 3 deletions
diff --git a/src/network/access/qhttp2protocolhandler.cpp b/src/network/access/qhttp2protocolhandler.cpp index 4b330c491a..42f1343c52 100644 --- a/src/network/access/qhttp2protocolhandler.cpp +++ b/src/network/access/qhttp2protocolhandler.cpp @@ -1103,7 +1103,7 @@ void QHttp2ProtocolHandler::updateStream(Stream &stream, const HPack::HttpHeader QByteArray binder(", "); if (name == "set-cookie") binder = "\n"; - httpReply->setHeaderField(name, value.replace('\0', binder)); + httpReplyPrivate->fields.append(qMakePair(name, value.replace('\0', binder))); } } diff --git a/src/plugins/sqldrivers/oci/qsql_oci.cpp b/src/plugins/sqldrivers/oci/qsql_oci.cpp index a4793351de..9ce2fc1b55 100644 --- a/src/plugins/sqldrivers/oci/qsql_oci.cpp +++ b/src/plugins/sqldrivers/oci/qsql_oci.cpp @@ -2603,7 +2603,7 @@ QSqlIndex QOCIDriver::primaryIndex(const QString& tablename) const QString stmt(QLatin1String("select b.column_name, b.index_name, a.table_name, a.owner " "from all_constraints a, all_ind_columns b " "where a.constraint_type='P' " - "and b.index_name = a.constraint_name " + "and b.index_name = a.index_name " "and b.index_owner = a.owner")); bool buildIndex = false; diff --git a/src/widgets/widgets/qabstractbutton.cpp b/src/widgets/widgets/qabstractbutton.cpp index dbd94e890d..5854472ff0 100644 --- a/src/widgets/widgets/qabstractbutton.cpp +++ b/src/widgets/widgets/qabstractbutton.cpp @@ -991,13 +991,14 @@ void QAbstractButton::mousePressEvent(QMouseEvent *e) void QAbstractButton::mouseReleaseEvent(QMouseEvent *e) { Q_D(QAbstractButton); - d->pressed = false; if (e->button() != Qt::LeftButton) { e->ignore(); return; } + d->pressed = false; + if (!d->down) { // refresh is required by QMacStyle to resume the default button animation d->refresh(); 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() { |