summaryrefslogtreecommitdiffstats
path: root/tests/auto/sql/kernel/qsqldatabase
Commit message (Collapse)AuthorAgeFilesLines
* test: migrate QSqlDatabase test to QRegularExpressionSamuel Gaist2019-07-292-8/+9
| | | | | | | | | | This is part of the migration of qtbase from QRexExp to QRegularExpression. Task-number: QTBUG-72587 Change-Id: Id82e103d4076fed63c871385b2b0f21c04735d00 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-211-1/+1
|\ | | | | | | Change-Id: I830beea26863323ab78a5d4b093f7763d77ad3da
| * Fix a couple of SQL testsAndy Shaw2019-02-191-1/+1
| | | | | | | | | | | | | | | | One of the tests was not added to the parent subdirectory pro so this is also rectified. Change-Id: I270f1c2882260e3e3fac83d074ed6444c5dece19 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Always escape the table names when creating the SQL statementAndy Shaw2019-01-232-51/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since some databases are case sensitive if part of the query is quoted, then we should ensure that all instances of the table name are escaped unless the test is delibrately testing the non-escaped case. As a result, this commit also removes some expected failures pertaining to PostgreSQL and also adds an entry to the list of tables being dropped when a test is finished. [ChangeLog][Sql][PostgreSQL] QSqlDatabase is now stricter about table names when used with record() and primaryIndex(). If the tablename was not quoted when it was created, then the table name passed to record() and primaryIndex() needs to be in lower case so that PostgreSQL is able to find it. Fixes: QTBUG-65788 Change-Id: Id1f54cb66b761c39edf858501b730ede7eec1fd3 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Add overload of QSqlDatabase::cloneDatabase to allow cloning cross threadsAndy Shaw2018-12-231-0/+10
| | | | | | | | | | | | | | | | | | | | | | Since QSqlDatabase::database() cannot be used to access another database from another thread, then the overload is provided to make it possible to clone with just the connection name. This will handle the cloning internally safely then. Fixes: QTBUG-72545 Change-Id: I861cc5aa2c38c1e3797f6f086594a1228f05bada Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | SQLite: enable json1 extensionChristian Ehrlicher2018-10-031-0/+27
|/ | | | | | | | | | | | This patch enabled json1 support for sqlite3 by defining SQLITE_ENABLE_JSON1 [ChangeLog][QtSql][SQLite] Enable the json1-extension for the SQLite3 plugin Task-number: QTBUG-63498 Change-Id: Iaf1069ff1396c573125a5a3f490c0df5df560468 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* sqlite: Fix QSqlError handling when opening/closing databaseFlorian Bruhin2018-09-131-0/+18
| | | | | | | | | | | | | | | | | | | Both sqlite3_open_v2 and sqlite3_close are documented to return an error code: https://www.sqlite.org/c3ref/open.html https://sqlite.org/c3ref/close.html However, those were ignored (other than checking whether the operation succeeded), causing QSqlError::nativeErrorCode() to always be "-1" when there was an error while opening/closing the database. Additionally, the error string needs to be read (via sqlite3_errmsg16) in qMakeError *before* d->access is set to 0, or the databaseText() will always be "out of memory" no matter what error actually happened. Task-number: QTBUG-70506 Change-Id: I75cbf178c9711442e640afd26c4502214d20c598 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QSqlDatabase: Skip confusing thread warning on invalid QSqlDatabaseDavid Faure2018-04-061-0/+3
| | | | | | | | | If the db isn't valid, then that's the actual issue, not the fact that we're getting the same invalid db (with the same driver QSqlNullDriver) in multiple threads. Change-Id: I95490818ed78e741c3823e115f139c2cff01b0b1 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* MySQL: Fix testsAndy Shaw2018-03-171-4/+4
| | | | | | | | | | | | | This fixes the following: - tst_QSqlDatabase::recordMySQL() to account for performance improvements done for small integral types - tst_QSqlQuery::nextResult() so that NUMERIC results are seen as doubles - tst_QSqlQuery::timeStampParsing() so that MySQL accepts the CREATE TABLE statement Change-Id: I68fb1d06dac12d500bb4596463f5bdd65cc9c226 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* SQL/Postgres: Fix support for nan, inf and -infChristian Ehrlicher2018-03-071-0/+42
| | | | | | | | | | | Postgresql needs a special value for nan and +/- inf. This was considered during insert but not during select. Also remove some pre-c++11 inf/nan - handling and replace it with Qt equivalents. Change-Id: I044ca58e9cf673f4b100b05a0d8e25c8a9c29ec5 Reviewed-by: Robert Szefner <robertsz27@interia.pl> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Make it easier to specify test databases on a per system levelAndy Shaw2018-01-261-72/+52
| | | | | | | | | | | | | | | Instead of having to modify the tst_databases.h file whenever you want to add a test database, this will now read from a file to find what databases are available. This defaults to dbs.json in the same directory or the QT_TEST_DATABASES_FILE environment variable can be set to point to the file that contains the databases. The latter makes it easier for CI then to have something set up on a per configuration basis. The SQLite database stays hardcoded so this will continue to be tested as before without any additional changes. Change-Id: I7e7ccde6a6be3e490dd640b1590e3b691a6b2ab3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Return an invalid QSqlDatabase when accessing from another threadAndy Shaw2018-01-021-0/+35
| | | | | | | | | | | | | | | | QSqlDatabase objects can only be used in the thread that the connection was opened for. So if the driver was created already then we check if the thread is correct. If it is not then we output a warning and return an invalid QSqlDatabase. [ChangeLog][QtSql][QSqlDatabase] QSqlDatabase::database() will return an invalid QSqlDatabase if the calling thread does not own the requested QSqlDatabase. Task-number: QTBUG-216 Change-Id: Ib5a25aa62129e3925f9819109af05961e5178bc5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Copy the numericalPrecisionPolicy when copying the QSqlDatabaseAndy Shaw2017-12-011-0/+31
| | | | | | | | | | As the numercialPrecisionPolicy can be set and subsequently retrieved from the QSqlDatabase's driver, then when copying the QSqlDatabase, we need to set that appropriately too. Task-number: QTBUG-10452 Change-Id: I2c63748365ab4e9fbc29d8d460d80d2e2a0ee385 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove code that refers to PostgreSQL 7.2 or olderAndy Shaw2017-12-011-5/+0
| | | | | | | | | | We haven't had support for anything older than 7.3 for a long time, so this removes the code to save having to maintain it any further. Task-number: QTBUG-644 Change-Id: If0635f3bef5138a00a0e77011a70f23d0bffda32 Reviewed-by: Robert Szefner <robertsz27@interia.pl> Reviewed-by: Edward Welbourne <edward.welbourne@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-201-2/+2
|\| | | | | | | | | | | | | | | | | | | 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>
* | 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>
* 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>
* QSql tests: Remove Windows CE and clean up code.Friedemann Kleint2016-03-102-38/+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 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-212-34/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Tests: Fix single-character string literals.Friedemann Kleint2015-10-132-8/+8
|/ / | | | | | | | | | | | | Use character literals where applicable. Change-Id: I1a026c320079ee5ca6f70be835d5a541deee2dd1 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | tests/auto/sql: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-07-291-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | - 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>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-07-011-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | 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-051-2/+2
| | | | | | | | | | | | | | Fix style issues along the way. Change-Id: Ic6a6de28e198eb0b14c198b802e78845703909b9 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Added SSL support for MySQL database connectionsOlivier Delbeke2015-06-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Addition of new options SSL_KEY, SSL_CERT, SSL_CA, SSL_CAPATH and SSL_CIPHER to allow SSL-encrypted connections to MySQL databases. When needed, these options must be specified in the function call QSqlDatabase::setConnectOptions() before the call to QSqlDatabase::open(). SSL_KEY = the path name to the key file SSL_CERT = the path name to the certificate file SSL_CA = the path name to the certificate authority file SSL_CAPATH = the path name to a directory that contains trusted SSL CA certificates in PEM format. SSL_CIPHER = a list of permissible ciphers to use for SSL encryption. These options replace CLIENT_SSL (which should not be used any more). Example: db.setConnectOptions("SSL_KEY=client-key.pem;" \ "SSL_CERT=client-cert.pem;" \ "SSL_CA=server-ca.pem"); [ChangeLog][QtSql] SSL support for MySQL database connections has been added. Option CLIENT_SSL replaced by SSL_KEY, SSL_CERT, SSL_CA, SSL_CAPATH and SSL_CIPHER, so that the keys, certificates and cipher can be specified. Task-number: QtBUG-3500 Change-Id: I8197234b169a818658678d6fcc953c90e83db23e Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | Remove exec bits from files that should not be executableDmitry Shachnev2015-06-071-0/+0
|/ | | | | | | Change-Id: I66f49c6db82eadc3b11cc9b1cf01375e9596a8e6 Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Update copyright headersJani Heikkinen2015-02-112-14/+14
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Added timezone support for datetime fields in PSQLJulien Blanc2014-12-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds correct timezone support in PSQL plugin. Prior to this patch, no timezone support was provided, so only the following case worked : * using local time in both client application and postgresql server * datetime were using second precision This patch tries to take care that postgresql has two different datatypes for date time, respectively : * timestamp with time zone * timestamp without time zone Both are internally stored as UTC values, but are not parsed the same. * timestamp with time zone assumes that there is a time zone information and will parse date time accordingly, and then, convert into UTC before storing them * timestamp without time zone assumes that there is no time zone information and will silently ignore any, unless the datetime is explicitly specified as having a time zone, in case it will convert it into UTC before storing it Both are retrieved as local time values, with the following difference * timestamp with time zone includes the timezone information (2014-02-12 10:20:12+0100 for example) * timestamp without time zone does not include it The patch does the following : * parse the date retrieved by postgresql server using QDateTime functions, which work correctly * always convert the date to UTC before giving it to postgresql * force time zone so that timezone information is taken into account by postgresql * also adds the milliseconds when storing QDateTime values The following configurations are tested to work : * client and server using same timezone, timestamp with or without tz * client and server using different timezone, timestamp with tz The following configuration will *not* work : * client and server using different timezones, timestamp without tz Because data will be converted to local time by the postgresql server, so when returned it will be different from what had been serialized. Prior to this patch, it gave the illusion to work because since TZ information was lost, time was stored as local time from postgresql. Lots of inconsistencies occurred, though, in case client tz changes... I don't expect this to be an issue since having different TZ in server and client and *not* handling this is a broken setup anyway. Almost based on changes proposed by julien.blanc@nmc-company.fr [ChangeLog][QtSql] Added timezone support for datetime fields in PSQL Task-number: QTBUG-36211 Change-Id: I5650a5ef60cb3f14f0ab619825612831c7e90c12 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Adjust DBMSType to DbmsType to follow conventionsAlejandro Exojo2014-11-262-21/+21
| | | | | | | | | The enum was made public in f84b00c6d26eb7a3a6802210d2a8b12ddbf815aa, but this makes it follow the convention to camel case acronyms too before it's too late to change it. Change-Id: Ibb81e9221cb73fe0502d0a26f2d73512dd142f08 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Expose QSqlDriverPrivate dbmsType in public QSqlDriver apiMatt Broadstone2014-09-242-74/+74
| | | | | | | | | | dbmsType was previously kept as a private variable in QSqlDriverPrivate, however it's particularly useful for QODBC users. [ChangeLog][QtSql][QSqlDriver] Add support for determining DBMS type from SQL driver. Change-Id: If1c221520da9ac4ccef85a02db078679d76eac92 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Update license headers and add new license filesMatti Paaso2014-09-242-36/+20
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* winrt: Fix gethostname linker error in qsqldatabase testsAndrew Knight2014-09-191-4/+6
| | | | | | | | | | | With VS2013 Update 3, Win32 sockets are now allowed in Windows Store Apps. Upgrading VS meant that gethostname was visible to the application, but failed to link as the mkspec doesn't link to ws2_32. Adjust the workaround not to call the newly visible symbol on WinRT. Change-Id: Ide6d8759cca7acab6c466a9bf4d6b876f6ca7605 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Improve handling of temporary directories in SQL tests.Friedemann Kleint2014-04-042-8/+31
| | | | | | | | | | | | | | Initialize directory delayed in shared code and add checks to verify that it is valid. Close attached / cloned databases to prevent locks on files and leaking temporary directories caused by SQLite: QTemporaryDir: Unable to remove "...\Temp\tst_qsqldatabase-P1XkOA" most likely due to the presence of read-only files. QTemporaryDir: Unable to remove "...\Temp\tst_qsqltablemodel-P1XkOA" most likely due to the presence of read-only files. QWARN : tst_QSql::concurrentAccess() QTemporaryDir: Unable to remove "...\Temp\tst_qsql-l0VAKJ" most likely due to the presence of read-only files. Change-Id: If85bbaed04bb1a32e427d642be332996d967f796 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-071-2/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformintegration.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/android/qandroidplatformopenglcontext.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/sql/doc/src/sql-driver.qdoc src/widgets/widgets/qtoolbararealayout.cpp Change-Id: Ifd7e58760c3cb6bd8a7d1dd32ef83b7ec190d41e
| * Enable running sql model tests in parallelFrederik Gladhorn2014-01-291-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each model test gets its own temporary directory, thus there is no problem parallelizing them. This should reduce the time spent for a testrun of qtbase by around 3 minutes. When running only the sql tests it saves less since there are no other tests to run in parallel. === Timing: =================== TEST RUN COMPLETED! ============================ Total: 4 minutes 43 seconds Serial tests: 4 minutes 42 seconds Parallel tests: 1 second Estimated time spent on insignificant tests: (no time) Estimated time saved by -j4: 1 second === Totals: 12 tests, 12 passes ================================================ After: === Timing: =================== TEST RUN COMPLETED! ============================ Total: 4 minutes 7 seconds Serial tests: 50 seconds Parallel tests: 3 minutes 17 seconds Estimated time spent on insignificant tests: (no time) Estimated time saved by -j4: 1 minute 23 seconds === Totals: 12 tests, 12 passes ================================================ Change-Id: I355ceed62fae852ad8cd442848e263438afb738e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | expand tabs and related whitespace fixes in *.{cpp,h,qdoc}Oswald Buddenhagen2014-01-131-112/+112
| | | | | | | | | | | | | | | | the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Enable QSqlError to handle alphanumeric error codes.Marcel Krems2013-12-201-4/+4
| | | | | | | | | | | | | | | | | | | | Some database systems (like PostgreSQL) use alphanumeric error codes. Introduce a new method nativeErrorCode() which replaces number(). If the error code cannot be converted to int, number() will return 0. Task-number: QTBUG-142 Change-Id: Ic7fba841737674b75c0c01c2263f51d2041da497 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | WinRT: Fix various test compilationsAndrew Knight2013-10-021-2/+5
|/ | | | | | | | | | | | | - Remove irrelevant test subdirs via .pro files - Follow WinCE codepaths where applicable - Replace unsupported Win32 APIs with WinRT equivalents This does not aim to fix any failures in the tests themselves; it only makes them compile. Change-Id: Ia82bc0cc402891f8f6238d4c261ee9152b51be80 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Remove Nokia-domains in commented-out test code.Friedemann Kleint2013-07-121-21/+21
| | | | | | | Task-number: QTBUG-32390 Change-Id: Ida7d54aba9cde5c472ff6bb2696d1201ba4f2199 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Cleanup the SQL testsAndy Shaw2013-04-252-127/+129
| | | | | | | | | | This removes some XFAILS that were no longer correct and fixes some existing problems in the tests where ODBC is concerned. Change-Id: I91de526bb50ad4046ba07ddb5336aa3714966687 Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Fix sql tests in respect to Oracle databasesAndy Shaw2013-04-052-101/+114
| | | | | | | | | | Oracle has a limitation of 30 characters for a tablename so the main change is to account for this, which meant changing all the usages of qTableName(). Some other fixes are included that ensure the tests are working correctly as far as Oracle is concerned. Change-Id: I8ad8a5a33e6a70fcad235f6a7e82e91687b74fee Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Move the dbmstype to QSqlDriverPrivate so it can be used for all driversAndy Shaw2013-04-022-10/+10
| | | | | | | | | By moving it to QSqlDriverPrivate we make it easier to check what database is actually connected which is particularly useful for the autotests. Change-Id: I54d1c2c998919c1d54efb1b6ac9303070ece54aa Reviewed-by: Mark Brand <mabrand@mabrand.nl>