diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-11-27 05:25:32 +1000 |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-11-27 05:25:32 +1000 |
commit | 7bd5cf4029141df144e407c4655db98af55d8f31 (patch) | |
tree | 7b038717391da188524329514903f989c347f9b7 /doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp | |
parent | 2b18e27c041f17bbc8989aa0ef5363df34edb8e6 (diff) | |
parent | b34884821c9a1e514d831f6aa3dbc1d2156fc755 (diff) | |
download | qt4-tools-7bd5cf4029141df144e407c4655db98af55d8f31.tar.gz |
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt-qa-team
* 'master' of git://scm.dev.nokia.troll.no/qt/qt-qa-team: (675 commits)
Fix QDateEdit calendar pop-up having wrong date
Repaint QProgressBar when minimum or maximum changed
Fix QProgressBar causing timer event spam
Fix memory leak in QCursorData
fix gdb_dwarf_index.prf for applications, take two
Compile fix for Mac OS X 10.7 with 10.6 sdk
Update supported platforms and remove commercial page.
networking: regenerate effective TLD table for cookies
fix gdb_dwarf_index.prf for executables
WINSCW def file update so that qtgui can pick up virtual from qtcore
Add mobile-reduced ts-files for Symbian.
Create cleanup stack in idleDetectorThread
Preventing zero-timer lockups when Symbian's active scheduler used
QNAM: Fix authentication cache when the password is in the URL
Qt Designer: Fix static linking on Mac.
SSL: blacklist intermediate certificates that issued weak certs
Fix memory leak in S60Style
Fix to QtOpenGL crash on Symbian
Give better error message when using unsupported lookbehinds in QRegExp
Clear error due to FRAMEBUFFER_SRGB_CAPABLE_EXT
...
Diffstat (limited to 'doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp')
-rw-r--r-- | doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp b/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp index d49b6e0e19..1a3772f663 100644 --- a/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp +++ b/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp @@ -41,7 +41,7 @@ //! [0] QSqlDatabase db = ...; QVariant v = db.driver()->handle(); -if (v.isValid() && qstrcmp(v.typeName(), "sqlite3*")==0) { +if (v.isValid() && qstrcmp(v.typeName(), "sqlite3*") == 0) { // v.data() returns a pointer to the handle sqlite3 *handle = *static_cast<sqlite3 **>(v.data()); if (handle != 0) { // check that it is not NULL @@ -52,12 +52,12 @@ if (v.isValid() && qstrcmp(v.typeName(), "sqlite3*")==0) { //! [1] -if (v.typeName() == "PGconn*") { +if (qstrcmp(v.typeName(), "PGconn*") == 0) { PGconn *handle = *static_cast<PGconn **>(v.data()); if (handle != 0) ... } -if (v.typeName() == "MYSQL*") { +if (qstrcmp(v.typeName(), "MYSQL*") == 0) { MYSQL *handle = *static_cast<MYSQL **>(v.data()); if (handle != 0) ... } |