summaryrefslogtreecommitdiffstats
path: root/tests/auto/sql
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-092-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qwindow.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowssystemtrayicon.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp tests/auto/widgets/kernel/qaction/tst_qaction.cpp Change-Id: Ifa515dc0ece7eb1471b00c1214149629a7e6a233
| * Set correct datatype for column 'more_data' in PostgreSQLRobert Szefner2017-11-081-0/+2
| | | | | | | | | | | | | | Task-number: QTBUG-63861 Change-Id: Ice9e788841046482bf5c4653eb859d00bc6b1c59 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * Run oraArrayBind() test only for Oracle DBMSRobert Szefner2017-11-061-1/+1
| | | | | | | | | | | | | | | | | | | | This test contains Oracle specific queries and will fail for other DBMS. Currently it doesn't fail, because it is skipped for drivers that doesn't support BatchOperations and only QOCI supports batch operations. Change-Id: I8f1e7c7244726fa11c841023dec186553747a6b5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-301-1/+1
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowswindow.cpp tests/auto/widgets/kernel/qaction/tst_qaction.cpp Change-Id: Ia017a825ed2ca2d53ac586f4ae48df6f65818d40
| * Fix psql_schemas testRobert Szefner2017-10-261-1/+1
| | | | | | | | | | | | | | | | Ignore case when comparing table names in PostgreSQL Task-number: QTBUG-63861 Change-Id: Iaf56dff11ee79f96fd3b136e1576f2578328ac79 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-09-202-3/+9
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/util/qcompleter.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmdisubwindow.cpp Change-Id: If0e96981af07ce36ac68f2e69211bc2120f93973
| * Fix recordOCI() test to treat clob/nclob as QByteArrayAndy Shaw2017-09-181-2/+2
| | | | | | | | | | Change-Id: I0315b23dad66f98fc681c624d4afa8b5abb54a7b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * OCI: Use correct type for getting doublesAndy Shaw2017-09-181-1/+7
| | | | | | | | | | | | | | Change-Id: Iffb81a37a517e58d48757d82f93f20e8c5100033 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-311-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro qmake/library/qmakebuiltins.cpp src/corelib/global/qglobal.cpp Re-apply b525ec2 to qrandom.cpp(code movement in 030782e) src/corelib/global/qnamespace.qdoc src/corelib/global/qrandom.cpp src/gui/kernel/qwindow.cpp Re-apply a3d59c7 to QWindowPrivate::setVisible() (code movement in d7a9e08) src/network/ssl/qsslkey_openssl.cpp src/plugins/platforms/android/androidjniinput.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/widgets/widgets/qmenu.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp Change-Id: If7ab427804408877a93cbe02079fca58e568bfd3
| * Fix invalid placeholder name in tst_qsqlthread.cppSérgio Martins2017-08-231-1/+1
| | | | | | | | | | Change-Id: I88c0c48888b86b58d85223ad1dc4cafdaea01d77 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Add a test that we can read SQL time-stampsEdward Welbourne2017-08-041-0/+21
| | | | | | | | | | | | | | | | | | Based on a test-case from Israel Lins Albuquerque, that my planned fixes to our parsing of ISODate date-times would break. Change-Id: I5658df9c7daed59d43aa5574df25d4d9eac4677d Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.9' into devOswald Buddenhagen2017-08-021-0/+38
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/widgets/qdockarealayout.cpp src/widgets/widgets/qmainwindow.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmainwindowlayout_p.h tests/auto/corelib/tools/qlocale/tst_qlocale.cpp tests/auto/other/macnativeevents/BLACKLIST tests/auto/widgets/widgets/qmenu/BLACKLIST Change-Id: Ic8e724b80a65e7b1af25511b0e674d209265e567
| * Fix storing of QDateTime timespec for SqliteJoni Poikelin2017-07-311-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 9e64fc9e1cebf1e11694c4f536881128f5aee288 caused a regression which stored all QDateTime entries as if they were in localtime, which causes them to be offset by the amount of local timezone offset. This is fixed by adding "Z" if the time should be in UTC or using "+/-hh:mm" if it should use fixed UTC offset or specific timezone. Task-number: QTBUG-57138 Change-Id: Ie60905dfb3a517db442b636ca41daf8348753d84 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | QSqlField: Add a means to see what the tablename is for a given fieldAndy Shaw2017-07-122-7/+47
| | | | | | | | | | | | | | | | | | | | | | | | When you are using a query that pulls from a number of different tables then it can be ambiguous as to which table a particular field belongs to. So this will make it possible to determine the table that a given field belongs to if it is set. Task-number: QTBUG-7170 Change-Id: I49b7890c0523d81272a153df3860df800ff853d5 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-291-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/common/msvc-desktop.conf mkspecs/win32-g++/qmake.conf mkspecs/win32-icc/qmake.conf src/platformsupport/fontdatabases/mac/coretext.pri src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm Change-Id: I74a6f7705c9547ed8bbac7260eb4645543e32655
| * Stabilize tst_QSqlThread::readWriteThreadingFrederik Gladhorn2017-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | According to the test metrics this test failed 10 times in the last two days. Interestingly the log shows that usually 5.5 seconds would have let it pass. Change-Id: I38f21f35bd6624f1d3de1e1e811a4d107136a241 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* | Add move special member functions to QSqlErrorJesus Fernandez2017-04-281-0/+21
| | | | | | | | | | | | | | | | | | | | Also mark as shared-come-qt6 and add member-swap. [ChangeLog][QtSql][QSqlError] Added swap(). Coverity-Id: 168223 Change-Id: Iaad4dee383900b9d11856e860b0647780a81a505 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Use unique table name for the sqlite_enableRegexp testAndy Shaw2017-03-271-2/+3
| | | | | | | | | | | | | | | | This change amends 2a3297c7269c9a3a9e6b4129c76366bac5c9d7cb. Task-number: QTBUG-59317 Change-Id: Ia08b83785f67105a1c7e71c1f4081f1bc755d756 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-201-1/+1
|\| | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfilesystemengine_win.cpp src/gui/text/qdistancefield.cpp src/plugins/platforms/xcb/qxcbconnection.h Change-Id: I1be4a6f440ccb7599991159e3cb9de60990e4b1e
| * Deprecate QString::nullMarc Mutz2017-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a Qt 3 compatibility vehicle, and as such inherits the now-alien property to distinguish empty and null strings. Particularly worrisome is the following asymmetry: QString("") == QString::null // false QString("") == QString(QString::null) // true Instead of fixing this behavior, recognize that people might use it as a weird way to call isNull(), albeit one that once was idiomatic, and simply deprecate everything that deals with QString::null. [ChangeLog][QtCore][QString] QString::null is now deprecated. When used to construct a QString, use QString() instead. When used to compare to a QString, replace with QString::isNull(). Change-Id: I9f7e84a92522c75666da15f49324c500ae93af42 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
* | REGEXP for SQLiteLorenz Haas2017-02-221-0/+31
|/ | | | | | | | | | | | | | | | | | | | | | Since SQLite does not define a regexp function by default, provide a Qt based implementation which can be enabled using QSQLITE_ENABLE_REGEXP as an connect option. This way statements like SELECT * FROM table WHERE col REGEXP '^[a-d]'; work out of the box. [ChangeLog][QtSql] Add QSQLITE_ENABLE_REGEXP connect option for QSQLiteDriver. If set a Qt based regexp() implementation is provided allowing to use REGEXP in SQL statements. Task-number: QTBUG-18084 Change-Id: I7f0e926fe4c5d6baea509f75497f46a61ca86679 Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Sebastian Sauer <sebastian.sauer@kdab.com> Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* tst_qsqlquery.cpp: Refactor runIntegralTypesMysqlTest()Friedemann Kleint2016-12-051-16/+28
| | | | | | | | | | | | | | | | | | | Change 3370ab9119df09ca14f7d4641c555e60c1b3f478 introduced warnings from MSVC: tst_qsqlquery.cpp(4005): warning C4805: '==': unsafe mix of type 'const bool' and type 'int' in operation tst_qsqlquery.cpp(4059): note: see reference to function template instantiation 'void runIntegralTypesMysqlTest<bool>(QSqlDatabase &,const QString &,const QString &,const bool,const T,const T)' being compiled with [ T=bool ] tst_qsqlquery.cpp(4006): warning C4805: '==': unsafe mix of type 'const bool' and type 'int' in operation tst_qsqlquery.cpp(4006): warning C4804: '/': unsafe use of type 'bool' in operation tst_qsqlquery.cpp(4026): warning C4804: '+=': unsafe use of type 'bool' in operation Extract an overload taking a QVector of values and use that for the bool case instead of looping over min/max to generate a sequence of values for bool. Change-Id: I72583774e788b8df899f22ed1a64278217e664f6 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* tst_qsql.cpp: Remove deprecated module includeFriedemann Kleint2016-11-251-1/+0
| | | | | | | | Fix warning: include/QtSql/qsql.h:4:4: warning: #warning Header <QtSql/qsql.h> is deprecated. Please include <QtSql/qtsqlglobal.h> instead. [-Wcpp] Change-Id: I254c6ac9ddb0f49a7f4dc8b3de44fd1010f6243e Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-211-14/+31
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5971b88e is not needed in new configure. This merge also reverts "fix QMAKE_DEFAULT_*DIRS resolution with apple SDK", 2c9d15d7, because it breaks iOS build with new configure system. Conflicts: mkspecs/features/default_pre.prf mkspecs/features/mac/toolchain.prf mkspecs/features/toolchain.prf src/dbus/qdbusconnection.cpp src/plugins/sqldrivers/mysql/qsql_mysql.cpp src/sql/drivers/mysql/qsql_mysql.cpp src/widgets/widgets/qmenubar.cpp src/widgets/widgets/qmenubar_p.h tools/configure/configureapp.cpp tools/configure/environment.cpp tools/configure/environment.h Change-Id: I995533dd334211ebd25912db05b639d6f908aaec
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-161-14/+31
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp Change-Id: I0af32ee55936d523cbd259b6fe82eb9c409f9074
| | * Never return char variants when reading prepared MySQL statementsMilian Wolff2016-09-121-14/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has undesired effects when converting a QSqlRecord to JSON. A char(0) e.g. has special semantics that are undesired when reading a Tinyint column. I don't think that returning bool for the special case of a Tinyint(1) is required. This also did not happen before, and is also not happening when not using a prepared statement. Instead, a plain int/uint QVariant is returned. This patch extends tst_QSqlQuery::integralTypesMysql to also cover reading and writing booleans from/to a MySQL table column of type Tinyint(1). Additionally, the reading is now also done with a prepared statement and we also check the raw variant value. The broken behavior fixed by this patch was introduced by me in commit 194403a3483b7317cc9511bc8b2ab307775643c5. Change-Id: I028a3abd83fdd2b42d98d478950d205e5b6bbeb5 Task-number: QTBUG-53397 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-211-0/+39
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qsysinfo.h src/corelib/kernel/qcoreapplication_win.cpp src/gui/text/qdistancefield.cpp src/gui/text/qdistancefield_p.h src/plugins/platforms/windows/qwindowsglcontext.cpp src/plugins/platforms/windows/qwindowsglcontext.h Change-Id: Ib3500acc2b28553bde06758cd9a2e19eb7fe2978
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-201-0/+39
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And blacklisted a few tests in tst_QUdpSocket. Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtNative.java src/corelib/global/qglobal.cpp src/corelib/global/qsystemdetection.h src/corelib/io/qfileselector.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp tests/auto/network/socket/qudpsocket/BLACKLIST Task-number: QTBUG-54205 Change-Id: I11dd1c90186eb1b847d45be87a26041f61d89ef6
| | * Fix UNSIGNED values in QMYSQLJesus Fernandez2016-06-141-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unsigned flag in columns was ignored when creating the list of bound values in a mysql table. So the result iteration with QSqlQuery::next stops after the first wrong truncated value. [ChangeLog][QtSql] Fixed QSqlQuery::prepare value truncation error when using UNSIGNED values in a MySQL database. Task-number: QTBUG-53969 Task-number: QTBUG-53237 Change-Id: I10d977993445f2794f1dd8c88b2e83517ef524f3 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | | Adding notification feature to SQLite driverKarim Pinter2016-04-211-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This modification enables to use notification feature of SQLite with Qt SQL driver, enables to subscribe for notifications and also to remove notifications. close() is added to destructor to unregister notifications in case it is used in multiple threads. [ChangeLog][QtSql][SQLite] Adding notification feature to SQLite driver Change-Id: I8b98787f5214a406357646a98711a8ff6045a0dd Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-03-221-50/+32
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/common/wince/qplatformdefs.h src/plugins/platforms/directfb/qdirectfbbackingstore.cpp src/plugins/platforms/xcb/qxcbbackingstore.cpp Change-Id: Ied4d31264a9afca9514b51a7eb1494c28712793c
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-211-50/+32
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/styles/qgtkstyle_p.cpp tests/auto/corelib/io/qtextstream/test/test.pro tests/auto/corelib/plugin/plugin.pro Change-Id: I512bc1b36acf3933ed2b96c00f476ee3819c1f4b
| | * tst_QSqlQuery: fix UBs (invalid downcasts, member calls)Marc Mutz2016-03-151-50/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing code derived a helper class from QSqlResult and overloaded two protected functions as public ones so the test could call them after casting QSqlResults to that helper class. Both the cast (which is a C-style cast, but with combined static_cast and const_cast semanics) and the following member function call are undefined behavior. Fix by making the test class a friend of QSqlResult, and dropping the casts. Change-Id: I09de2e2b46976d01cfce25892aec6ad36881d3eb Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | | QSql tests: Remove Windows CE and clean up code.Friedemann Kleint2016-03-109-108/+4
|/ / | | | | | | | | | | | | | | | | | | | | Use the newly introduced QSysInfo::machineHostName() to determine the host name in the shared header, removing the need to link against the winsocket library. All Windows-specific .pro sections can then be removed. Task-number: QTBUG-51673 Change-Id: Iba990b886b16addd210639871065abde6de96516 Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-181-40/+40
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also reverts commit 018e670a26ff5a61b949100ae080f5e654e7bee8. The change was introduced in 5.6. After the refactoring, 14960f52, in 5.7 branch and a merge, it is not needed any more. Conflicts: .qmake.conf src/corelib/io/qstandardpaths_mac.mm src/corelib/tools/qsharedpointer_impl.h tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp Change-Id: If4fdff0ebf2b9b5df9f9db93ea0022d5ee3da2a4
| * QSqlDriver: use table prefix in WHERE clausesVyacheslav Grigoryev2016-02-171-40/+40
| | | | | | | | | | | | | | | | | | | | | | If the WHERE clause is used in a query involving multiple tables, such as generated by QSqlRelationalTableModel, the table prefix may be necessary to disambiguate column references. It is harmless if not needed. Task-number: QTBUG-43320 Change-Id: I39e1ab7359bf748afa8bcd8578220e3abb3ee24a Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-021-0/+9
|\| | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test src/plugins/platforms/cocoa/qcocoahelpers.mm src/tools/qlalr/cppgenerator.cpp Change-Id: I0103ca076a9aca7118b2fd99f0fdaf81055998c3
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2016-01-291-0/+9
| |\ | | | | | | | | | Change-Id: I7831f560165fa08882ae54efeaea1f0146c3358c
| | * MySql: add failing connection testSamuel Gaist2016-01-271-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test ensure that a connection made to either an invalid host or an unreachable host fails properly. Task-number: QTBUG-47452 Change-Id: If31d23d815e496fc21ef2e1e19c34c2723bd3504 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Updated license headersJani Heikkinen2016-01-2114-238/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-11-231-2/+11
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qcoreapplication.cpp src/corelib/thread/qthread_unix.cpp Change-Id: Ia08d613c3f0bd08cb6dc3e3a57257207dfd4a099
| * | QSqlQueryModel::clear(): Call begin/endResetModel().Friedemann Kleint2015-11-191-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Call begin/endResetModel() in QSqlQueryModel and all derived classes. Task-number: QTBUG-49404 Change-Id: I11492d6386efb4c945c246a6379aaa6ca4502a25 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | | Tests: Use QCOMPARE() with QLatin1String() for QString values.Friedemann Kleint2015-10-142-10/+10
| | | | | | | | | | | | | | | | | | | | | Prefer QCOMPARE over QVERIFY for equality and use QLatin1String(). Change-Id: If226a0fc7b25be3e6774c7e36ca1e6f99234e5dd Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | | Tests: Fix single-character string literals.Friedemann Kleint2015-10-136-28/+28
| | | | | | | | | | | | | | | | | | | | | Use character literals where applicable. Change-Id: I1a026c320079ee5ca6f70be835d5a541deee2dd1 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | Tests: Remove CONFIG += parallel_test.Friedemann Kleint2015-09-058-8/+0
|/ / | | | | | | | | | | | | The keyword no longer has a meaning for the new CI. Change-Id: Ibcea4c7a82fb7f982cf4569fdff19f82066543d1 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Remove temporary string allocations when reading prepared statement.Milian Wolff2015-08-131-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead, we use the binary MySQL encoding and copy the data directly into the QVariant of the desired type. This gets rid of the temporary string allocations and greatly improves the performance of the added benchmark. On my machine, the results are: Before: 0.562 msecs per iteration (total: 563, iterations: 1000) 1,922,479.330 instructions per iteration (total: 1,922,479,330, iterations: 1000) After: 0.381 msecs per iteration (total: 381, iterations: 1000) 774,132.957 instructions per iteration (total: 774,132,958, iterations: 1000) Note that the same could be applied to floating point data types in the future. Additionally, special support for MYSQL_TIME structure coult be added to get rid of the string conversions there. To ensure everything keeps working, a new auto test is added as well that verifies the select statements and insertions of integral data into a MySql table works as intended. [ChangeLog][QtSql] Improve performance when reading integer values from MySQL databases via prepared statements. Change-Id: I21dd9277661971ded934546f09535014b63f8eb8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | tests/auto/sql: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-07-294-38/+38
| | | | | | | | | | | | | | | | | | | | | | | | - Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Change-Id: I4e4a319c5918d697a33f6d6032c36b8c9660ca05 Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
* | Tests: Replace Q[TRY]_VERIFY(v == true|false) by QVERIFY(v)|QVERIFY(!v).Friedemann Kleint2015-07-271-2/+2
| | | | | | | | | | | | | | | | Preparing the replacement of Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) for non-boolean types. Change-Id: Iab6ec2f0a89a3adc79e18304573994965013dab5 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-07-018-10/+10
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qglobal.h src/corelib/global/qsysinfo.h src/corelib/global/qsystemdetection.h src/corelib/kernel/qobjectdefs.h src/plugins/plugins.pro tests/auto/widgets/itemviews/qlistview/qlistview.pro Change-Id: Ib55aa79d707c4c1453fb9d697f6cf92211ed665c
| * fix usage of wince scopeOswald Buddenhagen2015-06-058-10/+10
| | | | | | | | | | | | | | Fix style issues along the way. Change-Id: Ic6a6de28e198eb0b14c198b802e78845703909b9 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>