summaryrefslogtreecommitdiffstats
path: root/src/sql/kernel/qsqldatabase.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QSqlDatabase: make evident the name of the driver that failed to loadThiago Macieira2025-04-141-3/+3
| | | | | | | | | | | | | | Tell me this isn't confusing: Got keys from plugin meta data ("QMYSQL3", "QMYSQL", "QMARIADB") QSqlDatabase: driver not loaded QSqlDatabase: available drivers: QSQLITE QMARIADB QMYSQL QMYSQL3 This also merges the two messages into a single line, which is nicer for rich logging environments. Pick-to: 6.8 6.9 Change-Id: Ieb80c6571213dddc518bfffdb6c86632df8f932c Reviewed-by: Christian Ehrlicher <[email protected]>
* Short live QCoreApplication::instanceExists()Thiago Macieira2025-02-261-3/+3
| | | | | | | | | | | | | | | | | | This is a thread-safe version of QCoreApplication::instance() != nullptr for Qt 6.x, because QCoreApplication::self is not atomic and thus reading it from outside the main thread could be a data race. That's not to say it always is: if by construction the code can only run in the main thread or while QCoreApplication definitely exists, that's safe. Therefore, this commit focuses on places that are meant to be used in multi-threaded environment (ruling out most of QtGui and QtWidgets) or where the code was going to dereference the returned pointer anyway. Change-Id: I6fc556c5fe5cbe0b5902fffdfb6b3bb345b0ee50 Reviewed-by: Marc Mutz <[email protected]>
* QSqlDatabase: fix historical mistake of defaultConnection being non-constThiago Macieira2025-02-071-2/+0
| | | | | | | | | | | | | | | | | | | | | | This was likely never intended, and was a mistake in the API design, missing the second const after the pointer. It should have been: static const char *const defaultConnection; This commit fixes that mistake by replacing the variable with a constexpr one that can't be modified. We can actually do better by moving the name to the header, so it will get emitted in each library, application, or plugin instead of trying to load from QtSql. [ChangeLog][Potentially Source-Incompatible Changes] The static QSqlDatabase::connectionName member variable has changed from a non-const pointer to a constexpr array. Modifying the pointer was most likely a mistake in code and would produce a misbehaving application. Change-Id: Icf2eddc865c2d6dde0c7fffda06e55e215e5f26d Reviewed-by: Marc Mutz <[email protected]> Reviewed-by: Christian Ehrlicher <[email protected]>
* QSqlDriver: return the connection name of the assoicated QSqlDatabaseChristian Ehrlicher2024-12-201-1/+6
| | | | | | | | | | | | | | | A QSqlDriver instance is directly bound to a QSqlDatabase object. But there was no way to get the QSqlDatabase out of a QSqlQuery/QSqlDriver. Fix it by storing the connection name also in the driver during creation and add a getter for it. [ChangeLog][QtSql][QSqlDriver] Added connectionName() which returns the connection name of the associated QSqlDatabase instance. Pick-to: 6.9 Task-number: QTBUG-123603 Change-Id: If78b85413cf6ca965ff6bf9f3600cb54169b5569 Reviewed-by: Volker Hilsheimer <[email protected]>
* Logging: Add a macro for static logging categoryUlf Hermann2024-06-051-1/+1
| | | | | | | | | | | | Since name clashes between logging categories are so common, having a way to explicitly avoid them is important. So far, we are depending on internals of Q_LOGGING_CATEGORY to place the "static" in the right location. That's less than ideal. Task-number: QTBUG-67692 Change-Id: Ifeda5297d1d1220a57118b3bf7c7310e4ddd4f93 Reviewed-by: Tor Arne Vestbø <[email protected]> Reviewed-by: Thiago Macieira <[email protected]>
* QSqlDatabase: Rename currentThread() to thread()Christian Ehrlicher2024-05-311-1/+1
| | | | | | | | ... to be in sync with QObject naming. This amends b4c63b89dfe136d0579bf1b6422c4d878cdd74ab. Change-Id: I25301f65aa880205d8c0cfd6f4bfa9fdba34a01c Reviewed-by: Volker Hilsheimer <[email protected]>
* Add -Wweak-vtables to headerscleanJesus Fernandez2024-05-191-0/+2
| | | | | | | | | | | | | | | | | | | This requires some fixes in several classes that are also included in this patch. The QTestEvent hierarchy is all-inline and changes layout depending on QT_GUI_LIB and QT_WIDGETS_LIB, so we can't just export it. Suppress the warning in that header for now. Created QTBUG-104486 to track a fix for the real issue. The QFutureInterface hierarchy is also all-inline, but templates, so doesn't trigger, except the <void> specialization. Created QTBUG-125115 to track a fix for the real issue. Done-with: Marc Mutz <[email protected]> Task-number: QTBUG-45582 Change-Id: I96b3e109aa989b70e0d4809b90bd53a369e50d55 Reviewed-by: Fabian Kosmale <[email protected]>
* QSqlDatabase: add moveToThread()/currentThread()Christian Ehrlicher2024-04-251-0/+49
| | | | | | | | | | | | | Add QSqlDatabase::moveToThread() to be able to move the driver instance to another thread. [ChangeLog][Sql][QSqLDatabase] QSqlDatabase gained two new functions moveToThread() and currentThread() to be able to use it in another thread than the one it was created in. Fixes: QTBUG-39957 Change-Id: I9cb51358f73a3a2fa72813bfdbe059279d388bd7 Reviewed-by: Thiago Macieira <[email protected]>
* SQL: avoid potential detach in QtSqlGlobals dtorVladimir Belyavsky2024-04-211-1/+1
| | | | | | | | | Wrap `connections` to std::as_const() to avoid unexpected detach due to use of QHash::asKeyValueRange() in range-based for loop. Change-Id: I2bf69782dc9dc63df0b3f9dfe395427909fba310 Reviewed-by: Christian Ehrlicher <[email protected]> Reviewed-by: Thiago Macieira <[email protected]>
* SQL/QSqlDatabase: use categorized loggerChristian Ehrlicher2024-04-181-13/+15
| | | | | | | Use the categorized logger qt.sql.qsqldatabase Change-Id: I25216d0809ff0316371a62913b56e1f56ab37ab4 Reviewed-by: Axel Spoerl <[email protected]>
* Doc: Fix QDoc warnings for overloadsPaul Wicking2024-02-141-0/+1
| | | | | Change-Id: I9a77b6ea0026748c7f97f73b327118f7a9212d52 Reviewed-by: Topi Reiniö <[email protected]>
* QtSql: #include mocsThiago Macieira2024-02-101-0/+2
| | | | | | Pick-to: 6.7 Change-Id: I50e2158aeade4256ad1dfffd17b1f286a9001ae8 Reviewed-by: Edward Welbourne <[email protected]>
* QSqlDatabase: add Q_PROPERTYChristian Ehrlicher2024-02-051-8/+11
| | | | | | | | | Add Q_PROPERTY to follow the current Qt style and simplify the documentation. Task-number: QTBUG-120566 Change-Id: I23103a921cd391f24ce0ffd915a4ae2f98686d21 Reviewed-by: Nicholas Bennett <[email protected]>
* SQL: remove outdated \since tagsChristian Ehrlicher2024-01-241-4/+0
| | | | | | | | | There is no need to know if a function was added in Qt4 or earlier so remove all \since 4.x tags. Amends 747581e0bf491376e39d56f6ce3ce72f0bb9c434 Change-Id: I470bc785b1e31685caec561dafaec0ba97208d99 Reviewed-by: Leena Miettinen <[email protected]>
* SQL: remove outdated \since tagsChristian Ehrlicher2024-01-211-2/+0
| | | | | | | | There is no need to know if a function was added in Qt4 or earlier so remove all \since 4.x tags Change-Id: I5cf4e89a3e30c13fac076f1ae7abb33a625e366c Reviewed-by: Kai Köhne <[email protected]>
* QSqlDatabase: check if QCoreApplication::instance() existsChristian Ehrlicher2023-10-121-0/+20
| | | | | | | | | | | Check if QCoreApplication::instance() and print a warning if not instead creating and assertion later on. Fixes: QTBUG-117621 Change-Id: Iffb4f7097edbbaf19cb584bff6e5ba1535bf88a0 Reviewed-by: Friedemann Kleint <[email protected]> Reviewed-by: Volker Hilsheimer <[email protected]> Reviewed-by: Qt CI Bot <[email protected]>
* SQLDatabase: merge two global statics into oneChristian Ehrlicher2023-07-231-84/+51
| | | | | | | Merge the two global statics into one. Change-Id: I8a93ba848abe31527551313c8a4a449d05e3d680 Reviewed-by: Andy Shaw <[email protected]>
* SQL: Make QSqlDatabase::DriverDict creation thread-safeChristian Ehrlicher2023-05-241-15/+14
| | | | | | | | | | Make the QSqlDatabase::DriverDict thread-safe and make sure it's properly cleaned up on destruction. Pick-to: 6.5 6.2 5.15 Fixes: QTBUG-112961 Change-Id: I1ff70e477579231754ef829fdede944d6042894d Reviewed-by: Volker Hilsheimer <[email protected]>
* QSqlDatabase: use a QReadWriteLock to access DriverDictChristian Ehrlicher2023-05-231-0/+3
| | | | | | | | | | | | | DriverDict might be accessed from different threads so we have to make sure it's thread-safe. Use the already existing QReadWriteLock from QConnectionDict for later merging of these two global instances. The two instances do not interfere each other (DriverDict is a dictionary for custom registered sql drivers, QConnectionDict contains all current active database connections) so the dual-use of the mutex is fine. Pick-to: 6.5 6.2 5.15 Change-Id: I84c77df666e72e826d0d3d291cecd5417bbd1baf Reviewed-by: Volker Hilsheimer <[email protected]>
* QSQLDatabase: avoid some code duplicationChristian Ehrlicher2023-04-141-15/+11
| | | | | | | | | Avoid some code duplication and enhance the documentation about thread-safeness of QSQLDatabase::cloneDatabase() Fixes: QTBUG-60505 Change-Id: I6ca6b9f47d818d49ca51395da14051e40317cef6 Reviewed-by: Volker Hilsheimer <[email protected]>
* SQL/SQLDatabase: do not copy q within QSqlDatabasePrivate::copy()Christian Ehrlicher2023-03-161-9/+5
| | | | | | | | | | Copying the QSqlDatabase pointer inside QSqlDatabasePrivate::copy() is not a good idea since it must point to the owning instance and not another one. Since it's not used anywhere we can safely remove it. Change-Id: Ie45b594305059afd9b8d8b25d4864dd77769acf7 Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Volker Hilsheimer <[email protected]>
* QSqlDatabase: deprecate QSqlDatabase::exec()Christian Ehrlicher2023-03-061-4/+3
| | | | | | | | The note that QSqlDatabase::exec() is deprecated was added more than 12 years ago so it's time to also mark the function as such. Change-Id: Ic5e7c31b3ff5b21e16e2640548cba1a4baaeeb1c Reviewed-by: Volker Hilsheimer <[email protected]>
* A QtSql driver for Mimer SQLFredrik Ålund2023-02-201-0/+6
| | | | | | | | | | | | | | | | | The QtSql for Mimer SQL sqldriver makes it possible to work with the Mimer SQL database on different plattforms. There are drivers for several other databases in QtSql and a driver for Mimer SQL will benefit many users. To build the Mimer SQL driver, download Mimer SQL from https://developer.mimer.com [ChangeLog][QtSql] Added a QtSql plugin to work with the Mimer SQL database Fixes: QTBUG-111219 Change-Id: Id6ba5de4de01189d0516ffbfa89efcb0d013115f Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Volker Hilsheimer <[email protected]>
* SQL: use qsizetype and range-based for loops where possibleChristian Ehrlicher2023-01-201-9/+8
| | | | | | | | Some public functions are still using int instead qsizetype which can't be changed until Qt7. Change-Id: Ib6f210c344acce9f3836e8a5493a741eb8b2b385 Reviewed-by: Marc Mutz <[email protected]>
* SQL: include cleanupChristian Ehrlicher2023-01-181-3/+0
| | | | | | | | Removed some unused includes in the sql sources Change-Id: Ifbe1df401e0f4042650f8ce9902cb9977d2aa484 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Marc Mutz <[email protected]>
* QSqlDatabase: remove a pointless const_castGiuseppe D'Angelo2022-12-231-1/+1
| | | | | | | | | | | | The history of that one line of code is... interesting, to say the least. `defaultConnection` was originally declared as `char *`, which happened to work on older MSVC versions. Then it gained a workaround for other platforms by conditionally marking it const, with a const_cast to keep the code working on MSVC. Now it is unconditionally declared as a const char *, but the const_cast is still there. Get rid of it. Change-Id: Ibfb6728e05f15f540137c94f2d278bd5db988b63 Reviewed-by: Thiago Macieira <[email protected]>
* SQL: rework the connection options documentationChristian Ehrlicher2022-12-221-92/+2
| | | | | | | | | Move the documentation of the connection options to the SQL Drivers page and try to add a small but useful documention to each option. Fixes: QTBUG-109507 Change-Id: Id1d51d7a666ac0f15cde8d73bff153dad271d34b Reviewed-by: Andy Shaw <[email protected]>
* SQL/MySQL: add connect option MYSQL_OPT_LOCAL_INFILEChristian Ehrlicher2022-12-081-0/+1
| | | | | | | | | Add the connect option MYSQL_OPT_LOCAL_INFILE to be able to specify the client-side LOCAL capability for LOAD DATA operations Fixes: QTBUG-104916 Change-Id: I9914250059e7dc1a705941d3b409fa624e105ecd Reviewed-by: Andy Shaw <[email protected]>
* SQL/MySQL: rework driver option parsingChristian Ehrlicher2022-10-221-5/+12
| | | | | | | | | | Rework the parsing of client option to make it easier to add new options. Add the two options MYSQL_OPT_SSL_CRL and MYSQL_OPT_SSL_CRLPATH and deprecate the SSL_foo options without the MYSQL_OPT_ prefix. Change-Id: Ibaf5f553d77d9c102ca2bfef2fe68be0572f594b Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Volker Hilsheimer <[email protected]>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Lars Knoll <[email protected]> Reviewed-by: Jörg Bornemann <[email protected]>
* Sql: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-04-191-2/+3
| | | | | | Task-number: QTBUG-98434 Change-Id: Ie12ca82fd912617eabe4f602c08914f12878cb32 Reviewed-by: Volker Hilsheimer <[email protected]>
* Sql: stop using QLatin1Char constructor for creating char literalsSona Kurazyan2022-04-191-1/+1
| | | | | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Change-Id: I03477e645a94948cac3e3e2abca52aa4e3e2efff Reviewed-by: Volker Hilsheimer <[email protected]>
* QSql/QSqlite: return extended error codes by defaultChristian Ehrlicher2021-01-111-0/+1
| | | | | | | | | | | | | SQlite allows to return fine-granulated error codes but this behavior is not enabled by default (due to backwards compatibility concerns). Enable them for the SQLite driver by default but provide an option to disable them when needed. [ChangeLog][QtSql][QSQLITE] The plugin now returns the extended error codes by default. Change-Id: I59cec9aea46eb03f1e7ca02903d769c003a1ae30 Reviewed-by: Andy Shaw <[email protected]>
* Adjust code format, add space after 'if'Zhang Sheng2020-11-161-2/+2
| | | | | | Change-Id: Ice081c891ff7f4b766f49dd4bd5cf18c30237acf Reviewed-by: Allan Sandfeld Jensen <[email protected]> Reviewed-by: hjk <[email protected]>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-081-5/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/doc/src/cube.qdoc src/corelib/global/qlibraryinfo.cpp src/corelib/text/qbytearray_p.h src/corelib/text/qlocale_data_p.h src/corelib/time/qhijricalendar_data_p.h src/corelib/time/qjalalicalendar_data_p.h src/corelib/time/qromancalendar_data_p.h src/network/ssl/qsslcertificate.h src/widgets/doc/src/graphicsview.qdoc src/widgets/widgets/qcombobox.cpp src/widgets/widgets/qcombobox.h tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro tests/manual/diaglib/debugproxystyle.cpp tests/manual/diaglib/qwidgetdump.cpp tests/manual/diaglib/qwindowdump.cpp tests/manual/diaglib/textdump.cpp util/locale_database/cldr2qlocalexml.py util/locale_database/qlocalexml.py util/locale_database/qlocalexml2cpp.py Resolution of util/locale_database/ are based on: https://codereview.qt-project.org/c/qt/qtbase/+/294250 and src/corelib/{text,time}/*_data_p.h were then regenerated by running those scripts. Updated CMakeLists.txt in each of tests/auto/corelib/serialization/qcborstreamreader/ tests/auto/corelib/serialization/qcborvalue/ tests/auto/gui/kernel/ and generated new ones in each of tests/auto/gui/kernel/qaddpostroutine/ tests/auto/gui/kernel/qhighdpiscaling/ tests/libfuzzer/corelib/text/qregularexpression/optimize/ tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/ tests/libfuzzer/gui/text/qtextdocument/sethtml/ tests/libfuzzer/gui/text/qtextdocument/setmarkdown/ tests/libfuzzer/gui/text/qtextlayout/beginlayout/ by running util/cmake/pro2cmake.py on their changed .pro files. Changed target name in tests/auto/gui/kernel/qaction/qaction.pro tests/auto/gui/kernel/qaction/qactiongroup.pro tests/auto/gui/kernel/qshortcut/qshortcut.pro to ensure unique target names for CMake Changed tst_QComboBox::currentIndex to not test the currentIndexChanged(QString), as that one does not exist in Qt 6 anymore. Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
| * Doc: make Qt Sql snippets compilableNico Vertriest2020-03-201-5/+3
| | | | | | | | | | | | | | Task-number: QTBUG-81496 Change-Id: Id6206e9179c2e8157c99e777a3de35bd83d49e34 Reviewed-by: Topi Reiniö <[email protected]> Reviewed-by: Paul Wicking <[email protected]>
* | QtSQL: remove SQLite2 and TDS driver for Qt6Christian Ehrlicher2020-02-071-16/+1
|/ | | | | | | | | | They were deprecated in Qt4 (TDS) and 5.14 (SQLITE2) so they can be removed now in Qt6 [ChangeLog][QtSql] Removed obsolete TDS and Sqlite2 drivers Change-Id: I55118fb03106564d519a99ab55f9b5cf528179f3 Reviewed-by: Andy Shaw <[email protected]>
* Tidy nullptr usageAllan Sandfeld Jensen2019-12-061-3/+3
| | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <[email protected]> Reviewed-by: Lars Knoll <[email protected]>
* Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-231-0/+8
|\ | | | | | | | | | | | | Conflicts: src/widgets/styles/qstylesheetstyle.cpp Change-Id: If11da7799075cc2d5768da5603c5fc46773c4eae
| * Add SQLite specific documentation when specifying a database nameAndy Shaw2019-09-211-0/+8
| | | | | | | | | | | | Fixes: QTBUG-67847 Change-Id: I3c640233526260b596e8224dc48f713a3f0cff56 Reviewed-by: Paul Wicking <[email protected]>
* | Port from QAtomic::load() to loadRelaxed()Giuseppe D'Angelo2019-06-201-1/+1
|/ | | | | | | | | | | | | | | Semi-automated, just needed ~20 manual fixes: $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)load\(\)/$1loadRelaxed\(\)/g' -i \{\} + $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)store\(/$1storeRelaxed\(/g' -i \{\} + It can be easily improved (e.g. for store check that there are no commas after the opening parens). The most common offender is QLibrary::load, and some code using std::atomic directly. Change-Id: I07c38a3c8ed32c924ef4999e85c7e45cf48f0f6c Reviewed-by: Marc Mutz <[email protected]>
* Always escape the table names when creating the SQL statementAndy Shaw2019-01-231-0/+10
| | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
* Add overload of QSqlDatabase::cloneDatabase to allow cloning cross threadsAndy Shaw2018-12-231-0/+34
| | | | | | | | | | | 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 <[email protected]>
* QSqlDatabase: Skip confusing thread warning on invalid QSqlDatabaseDavid Faure2018-04-061-2/+4
| | | | | | | | | 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 <[email protected]>
* doc: Add missing template clause in \fn commandMartin Smith2018-01-121-1/+1
| | | | | | | | The template clause was missing in the \fn command for a member function of a template class. Change-Id: Ie1a8f8372d3183f05f02e518b363a7bac735abbb Reviewed-by: Topi Reiniö <[email protected]>
* QtSql: Raise minimum supported MSVC version to 2015Friedemann Kleint2018-01-041-5/+1
| | | | | | | | Remove code for older versions and streamline #ifdefs. Task-number: QTBUG-51673 Change-Id: I1d0f89784f8fb698828e11ce39086501971f1756 Reviewed-by: Andy Shaw <[email protected]>
* Return an invalid QSqlDatabase when accessing from another threadAndy Shaw2018-01-021-0/+6
| | | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
* Copy the numericalPrecisionPolicy when copying the QSqlDatabaseAndy Shaw2017-12-011-0/+4
| | | | | | | | | | 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 <[email protected]>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-09-201-0/+8
|\ | | | | | | | | | | | | | | | | | | 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
| * Add documentation about not having QSqlDatabase objects kept aroundAndy Shaw2017-09-081-0/+8
| | | | | | | | | | | | Task-number: QTBUG-35977 Change-Id: I8601b3f7379a5fe94898a2f5ff63558a896a4de2 Reviewed-by: Venugopal Shivashankar <[email protected]>