Commit Graph

157 Commits

Author SHA1 Message Date
Friedemann Kleint
2ec7f2cfed QSql tests: Remove Windows CE and clean up code.
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>
2016-03-10 15:07:02 +00:00
Liang Qi
4fe2fbcf82 Merge remote-tracking branch 'origin/5.6' into 5.7
This also reverts commit 018e670a26.

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
2016-02-18 20:50:35 +01:00
Vyacheslav Grigoryev
34472e946a QSqlDriver: use table prefix in WHERE clauses
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>
2016-02-17 23:13:58 +00:00
Liang Qi
d3e6e732c7 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	config.tests/unix/compile.test
	src/plugins/platforms/cocoa/qcocoahelpers.mm
	src/tools/qlalr/cppgenerator.cpp

Change-Id: I0103ca076a9aca7118b2fd99f0fdaf81055998c3
2016-02-02 15:57:44 +01:00
Liang Qi
a81036c3cc Merge remote-tracking branch 'origin/5.5' into 5.6
Change-Id: I7831f560165fa08882ae54efeaea1f0146c3358c
2016-01-29 11:13:41 +01:00
Samuel Gaist
a40ea0948d MySql: add failing connection test
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>
2016-01-27 23:53:25 +00:00
Jani Heikkinen
f776595cc1 Updated license headers
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>
2016-01-21 18:55:18 +00:00
Liang Qi
1ed7a67a4c Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/corelib/kernel/qcoreapplication.cpp
	src/corelib/thread/qthread_unix.cpp

Change-Id: Ia08d613c3f0bd08cb6dc3e3a57257207dfd4a099
2015-11-23 07:13:00 +01:00
Friedemann Kleint
efd8e6922c QSqlQueryModel::clear(): Call begin/endResetModel().
Call begin/endResetModel() in QSqlQueryModel and all
derived classes.

Task-number: QTBUG-49404
Change-Id: I11492d6386efb4c945c246a6379aaa6ca4502a25
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2015-11-19 07:24:13 +00:00
Friedemann Kleint
f0a559f1c8 Tests: Use QCOMPARE() with QLatin1String() for QString values.
Prefer QCOMPARE over QVERIFY for equality and use QLatin1String().

Change-Id: If226a0fc7b25be3e6774c7e36ca1e6f99234e5dd
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-10-14 08:32:42 +00:00
Friedemann Kleint
a2a00eb044 Tests: Fix single-character string literals.
Use character literals where applicable.

Change-Id: I1a026c320079ee5ca6f70be835d5a541deee2dd1
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-10-13 18:14:27 +00:00
Friedemann Kleint
76cf88157f Tests: Remove CONFIG += parallel_test.
The keyword no longer has a meaning for the new CI.

Change-Id: Ibcea4c7a82fb7f982cf4569fdff19f82066543d1
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-09-05 07:16:50 +00:00
Milian Wolff
194403a348 Remove temporary string allocations when reading prepared statement.
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>
2015-08-13 16:53:45 +00:00
Friedemann Kleint
0167ace5f0 tests/auto/sql: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).
- 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>
2015-07-29 11:35:53 +00:00
Friedemann Kleint
c067c012dc Tests: Replace Q[TRY]_VERIFY(v == true|false) by QVERIFY(v)|QVERIFY(!v).
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>
2015-07-27 12:09:19 +00:00
Liang Qi
0aa2d318b1 Merge remote-tracking branch 'origin/5.5' into dev
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
2015-07-01 11:05:26 +02:00
Olivier Delbeke
28ceb2ea5e Added SSL support for MySQL database connections
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>
2015-06-14 15:49:24 +00:00
Dmitry Shachnev
657a8cf5be Remove exec bits from files that should not be executable
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>
2015-06-07 22:50:19 +00:00
Oswald Buddenhagen
d32f47b703 fix usage of wince scope
Fix style issues along the way.

Change-Id: Ic6a6de28e198eb0b14c198b802e78845703909b9
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-06-05 10:29:10 +00:00
Andy Shaw
b6c14bca65 MySQL: Fix test so it expects the right integer type
Change-Id: Idd90d7881c6458fac7602bf02dad0f794d3b98c9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-03-20 13:51:34 +00:00
Andy Shaw
392d861790 MySQL: Keep the precision of the field when formatting the value
Change-Id: I4ab08be5112167a617d6d1d109754f2404a9605f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-03-20 13:51:29 +00:00
Friedemann Kleint
916af48cff PostgreSQL: Fix special floating point handling for 'float' types.
Introduce a template function to determine the special values
via macro and use that for QVariant::Double and QMetaType::Float.

Task-number: QTBUG-44381
Change-Id: I379dd82b22d467b0aebaa42f4f0f5c52472a5c47
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2015-02-18 11:01:15 +00:00
Jani Heikkinen
83a5694dc2 Update copyright headers
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>
2015-02-11 06:49:51 +00:00
Eric Lemanissier
c28718b88b Correction on bound values in case of repeated QSqlQuery::execBatch
Until now, QSqlQuery::execBatch did not call resetBindCount, which lead
the next call to QSqlQuery::addBindValue to start at non zero index.
This is problematic in case of a prepared query which is called several
times.

Task-number: QTBUG-43874
Change-Id: I1a0f46e39b74d9538009967fd98a269e05aac6f2
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2015-01-16 13:14:26 +01:00
Israel Lins
5fefec9136 Added ROUND test for PostgreSQL
The ROUND function for PostgreSQL only accept NUMERIC field as argument

Change-Id: I0c3753bfe4167cd47158e21b407cca8771816104
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2014-12-30 23:56:13 +01:00
Julien Blanc
190f64aab3 Added timezone support for datetime fields in PSQL
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>
2014-12-30 23:49:14 +01:00
Alejandro Exojo
6ea6ee7a12 Adjust DBMSType to DbmsType to follow conventions
The enum was made public in f84b00c6d2, 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>
2014-11-26 10:47:32 +01:00
Matt Broadstone
f84b00c6d2 Expose QSqlDriverPrivate dbmsType in public QSqlDriver api
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>
2014-09-24 14:44:49 +02:00
Matti Paaso
974c210835 Update license headers and add new license files
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3
- Removed LICENSE.GPL

Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
2014-09-24 12:26:19 +02:00
Andrew Knight
ed167dcb72 winrt: Fix gethostname linker error in qsqldatabase tests
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>
2014-09-19 19:15:23 +02:00
Robin Burchell
7232b022c8 tst_qsqlthread: Add debug about when threads finished.
Useful if someone is ever forced to try diagnose what goes wrong with this test.

Change-Id: I4b5e607e6329b6ebad2b40b3f65d6cacbb6b7fcf
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-08-23 13:50:27 +02:00
Robin Burchell
69b256285b tst_qsqlthread: Move manual qWait calls into QTRY_VERIFY
Reduces the average runtime of this test for me by ~600ms, but due to the
threading variance the exact reduction is hard to tell.

Change-Id: I96a9f949ae2381f69d9364e6637db0db4bd3b165
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-08-20 21:45:01 +02:00
Robin Burchell
2e2374a226 tst_qsqlthread: Replace sched_yield calls with QThread::yieldCurrentThread.
Makes the test behavior identical across all platforms.

Change-Id: I5e564598d8e61588af2b73f04b4ca7c9b899c02a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-19 18:51:44 +02:00
Frederik Gladhorn
9922dafb23 Use sched_yield instead of pthread_yield
sched_yield is standardized and on linux pthread_yield is implemented as sched_yield.
Building Qt for Android on OS X doesn't compile with the pthread version.

Change-Id: I1913afa83769805291e987f55b8f452299a43dce
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2014-05-05 22:40:49 +02:00
Frederik Gladhorn
ccc6efb6e9 Merge remote-tracking branch 'origin/release' into stable
This merge adds the opengl rename.

Change-Id: I84ea0b6abee9780ebb2cf3f64ab9e3fdf2acab3e
2014-05-01 13:08:42 +02:00
parihaaraka
f1eefd6cf9 Fix PSQL column's metadata
Fixed libpq's PQfmod() interpretation inside QPSQLResult::record()

Task-number: QTBUG-12477
Change-Id: I0e4c94ca1b06fd6a8e5b5702235cdd6d9736f8bf
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2014-04-29 14:42:26 +02:00
Israel Lins Albuquerque
3e6e70bddd [QSqlQuery] misbehavior of seek in special query positions
When QSqlQuery::at() == QSql::BeforeFirstRow and seek(1, true) (seek to
next record) is called the expected result is go to first row.
When QSqlQuery::at() == QSql::AfterLastRow and seek(-1, true) (seek to
previous record) is called the expected result is go to last row.

But in all cases the first and last are skipped.

Change-Id: I584138b3d397ce1c790bf89688ee92289a99611c
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2014-04-26 20:22:42 +02:00
Olivier Goffart
89ecac4607 QSqlError: Mark deprecated functiond with QT_DEPRECATED
And move the default argument from the deprecated constructor to
the new one

Also make sure that the error number is consistent across the
two constructor

Change-Id: I3721266b39ab493f0add35b2d1f892b2f6094992
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-04-25 06:37:06 +02:00
Friedemann Kleint
9a4beb4d36 Improve handling of temporary directories in SQL tests.
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>
2014-04-04 16:55:01 +02:00
Israel Lins Albuquerque
075c876f9a [QtSql]QIBASE]add support for prepared queries in numRowsAffected
Prepared queries need to be handled as procedures.

Change-Id: I4b4d7743fe45c416ca83ceb942aa48d79731f2f8
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2014-03-29 08:46:00 +01:00
Tobias Koenig
1f6e461533 Fix positional binding values order in QSqlQuery
Adapt the stringification code, that is used to produce the
keys for QSqlQuery::boundValues() return value, to keep the
right order of the binding values.

Task-number: QTBUG-12186
Change-Id: Ic11a455bfd9ffd1418b1b021ce5cf78cae9b4504
[ChangeLog][QtSql] Fixed the order of values with positional binding in a QSqlQuery
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2014-03-20 10:36:34 +01:00
Frederik Gladhorn
a1fe728fa5 Merge remote-tracking branch 'origin/stable' into dev
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
2014-02-07 13:07:25 +01:00
Frederik Gladhorn
85a2653737 Enable running sql model tests in parallel
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>
2014-01-29 06:40:49 +01:00
Kai Koehne
278152fffd Replace win32-g++ with mingw scope
Commit 773dd01 introduced a general mingw platform scope, which
is cleaner and more flexible than matching the spec name.

Change-Id: Ie3a9cb791a83f7c8a51bc4e23069190c452ab521
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-01-17 12:08:24 +01:00
Oswald Buddenhagen
882bf3475c expand tabs and related whitespace fixes in *.{cpp,h,qdoc}
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>
2014-01-13 22:46:50 +01:00
Frederik Gladhorn
f0fbff4c90 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I2defae1904154283446b069d151c3ef57302ec7b
2013-12-24 00:56:59 +01:00
Marcel Krems
106316198d Enable QSqlError to handle alphanumeric error codes.
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>
2013-12-20 16:27:41 +01:00
Israel Lins Albuquerque
5193c14536 fix parsing of bound SQL statements for PostgreSQL
PostgreSQL allows bound variables inside square braces.

Task-number: QTBUG-34541

Change-Id: I4f069b3f1078d4cdf172fbac9e0d7d23d20d167a
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-12-16 15:35:30 +01:00
Tasuku Suzuki
c3c424b384 QSqlQuery::isNull string overload
Introduce isNull overload to take field name as a parameter.

This is corresponding to the commit
7e6e141234

Change-Id: I122f79707d26eaa09c2f38dc31aeee1dac7de33b
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-12-01 23:14:15 +01:00
Tasuku Suzuki
109bf980b3 Fix a bug in QSqlQuery::isNull documentation
the method returns true if there is not such field.

Change-Id: I25db8de4561d3e0604f3e64edc1810140ba4aad2
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-10-22 17:05:47 +02:00