summaryrefslogtreecommitdiffstats
path: root/src/sql
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-231-4/+4
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Doc: Fix QSqlField documentation for deprecated constructorVolker Hilsheimer2020-09-222-31/+4
| | | | | | | | Also, merge constructor overloads, and remove superfluous explicit from a non-converting constructor. Change-Id: I60d0e646d1aaeb8ea66b7598076c3e3ba356c12e Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Correct link errors qtbaseNico Vertriest2020-09-211-1/+1
| | | | | | Task-number: QTBUG-86295 Change-Id: I27f6bbdadffb08a8794520a14dfe0e2334979575 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Add links to Qt 6 changes files from module indexPaul Wicking2020-09-181-0/+4
| | | | | | Task-number: QTBUG-84051 Change-Id: Iac25df135c9d73a990b41243e08cd38ea78296a4 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Doc: Add porting guide documentsPaul Wicking2020-09-161-0/+2
| | | | | | | | Also add existing such docs to the new document group Task-number: QTBUG-84051 Change-Id: I76f033f0846e09943f249d2beeb1606869eef382 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Interbase: Handle EXECUTE BLOCK statements correctlyAndy Shaw2020-09-131-0/+7
| | | | | | | | | | | | Since an EXECUTE BLOCK statement can have a mix of ? and :var syntax then a special case for this needs to be added so that it does not try to convert the :var parts into positional placeholders as they need to kept as-is when preparing such a statement. Pick-to: 5.15 Fixes: QTBUG-83152 Change-Id: Iff891207ad6dea1681a1b3a335acbbbb668b465d Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Make QStringList an alias to QList<QString>Lars Knoll2020-09-121-1/+0
| | | | | | | | | | | | | | | | | | Fix our API, so that QStringList and QList<QString> are the same thing. This required a bit of refactoring in QList and moving the indexOf(), lastIndexOf() and contains() method into QListSpecialMethods. In addition, we need to ensure that the QStringList(const QString&) constructor is still available for compatibility with Qt 5. Once those two are done, all methods in QStringList can be moved into QListSpecialMethods<QString>. Change-Id: Ib8afbf5b6d9df4d0d47051252233506f62335fa3 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtSql: enhance documentationChristian Ehrlicher2020-09-121-0/+8
| | | | | | | | | Be a little bit more specific what needs to be done when compiling the sql driver without compiling the whole Qt Change-Id: I3e8010d4cc84a83108340e525e620abf6b6e89c1 Pick-to: 5.15 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Interbase: Add support for the boolean typeAndy Shaw2020-09-111-1/+1
| | | | | | | | | | | | | This is added to Interbase in v7 and Firebird in v3 which has been available for sometime now. This means the minimum supported for Interbase is now v7. [ChangeLog][QtSQL][Interbase] The minimum required version for Interbase is now v7. Fixes: QTBUG-83401 Change-Id: I9927fd962f25c935be8ed5d2b7c76c00fb88cd8c Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Doc: Compile snippets only when running testsPaul Wicking2020-09-103-15/+25
| | | | | | | | | | Turn snippets projects into subdirs with libraries to avoid messy dependencies. Fixes: QTBUG-86497 Pick-to: 5.15 Change-Id: Idb2c43f97d56c9b8d9992617ef716bde40fff5b7 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Derive some item delegates from QStyledItemDelegateLars Knoll2020-09-101-28/+27
| | | | | | | | | | | Address a ### Qt6 comment from change 283008e123e5eacb83869682528b2024186634f8, and start using QStyledItemDelegate in more places, so those get proper look and feel. Change-Id: I39767ba99b7942faada1fba0ac241deb35563b63 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* QSqlError: Remove unused members, kept for binary compatibilityMarcel Krems2020-08-302-16/+3
| | | | | | | Also optimize the construction of QSqlErrorPrivate. Change-Id: I791ebe0b66fab43e74093186a798ef9656f97dbd Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix a number of qdoc warningsFriedemann Kleint2020-08-201-9/+0
| | | | | | | | | | | - Remove obsolete functions and enumeration values - Remove QObject * parameter from QMetaProperty accessors - Fix renamed enumerations in QSsl - Fix list items to be \li - Fix function signatures and variable names Change-Id: I37c7e6bf2c8ff92bc7b82620bae0a27796f866ab Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix deprecation warnings in QtSql code snippetsFriedemann Kleint2020-08-201-2/+2
| | | | | | | | Use QMetaType for constructing a QSqlField, fixing: ccode/sqldatabase/sqldatabase.cpp:91:41: warning: ‘QSqlField::QSqlField(const QString&, QVariant::Type)’ is deprecated: Use the constructor using a QMetaType instead [-Wdeprecated-declarations] Change-Id: If420ad3d7f5d9dce05ad892cddf84a1b77a45b3f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Re-implement configure/qmake's command line handling in CMakeJoerg Bornemann2020-08-171-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | We extend configurejson2cmake to read the "commandline" information from configure.json. This data is then translated to CMake function calls and written it into commandline.cmake files. We extend QtProcessConfigureArgs.cmake to pick up those commandline.cmake files to feed our command line handling code, which is a re-implementation of the command line handling in qt_configure.prf. The command line handler sets INPUT_xxx variables, similar to configure/qmake's config.input.xxx variables. The INPUT_xxx values are translated - to -DFEATURE_xxx=ON/OFF arguments if the input represents a feature, - to corresponding CMake variables if such a variable is known, - or to -DINPUT_xxx=yyy CMake arguments. Configure arguments that have an entry in cmake/configure-cmake-mapping.md are actually implemented. Other arguments are likely to need more work. Task-number: QTBUG-85373 Change-Id: Ia96baa673fc1fb88e73ba05a1afb473aa074b37d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Deprecate QVariant::Type uses in QSqlFieldLars Knoll2020-08-154-26/+86
| | | | | | | | Add metaType()/setMetaType() methods to be used instead of the type() methods taking a QVariant::Type. Change-Id: Ieaba35b73f8061cd83288dd6b50d58322db3c7ed Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Remove QVariant(int type, void *data, ...) constructorLars Knoll2020-08-151-1/+1
| | | | | | | | It was marked internal anyway. Use the constructor taking a QMetaType instead. Change-Id: I15b9cd0911aac063a0f0fe0352fa2c84b7f7c691 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Introduce maximumIdentifierLength to return database limits for namesAndy Shaw2020-08-113-2/+18
| | | | | | | | | Since Interbase/Firebird has a limit for column and table names then this function can be used by QSqlRelationalTableModel to make sure that the aliases created are within that limit. Change-Id: I0cb1c65b34befcb3690ccad3f081556dd2691344 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Another round of 0->nullptr cleanupAllan Sandfeld Jensen2020-07-311-1/+1
| | | | | Change-Id: Ic8db7dc252f8fea46eb5a4f334726d6c7f4645a6 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Doc: Update sql-driver to reflect current minimum versions neededAndy Shaw2020-07-202-24/+13
| | | | | | Fixes: QTBUG-85172 Change-Id: I82a8e008deec29dd217097b8427cb84b80c3a1c9 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: make cleanup on error more prominant in SQL driver instructionsSamuel Gaist2020-07-131-1/+1
| | | | | | | | | | | | | The concerned paragraph is one that is very important as there are a lot of people building the MySQL and PostgreSQL plugins that are not successful on the first try. However, this text not being emphazized, many if not all miss the fact that just re-running qmake will give them the same result if the cleanup is not applied. This patch makes this point more visible. Pick-to: 5.15 Change-Id: Ib2b97e128a5dab3dc6d771b16b5315e4ad95a9b7 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Use QList instead of QVector in qtbaseJarek Kobus2020-07-076-14/+12
| | | | | | | | Fixes all other QVector occurrences Task-number: QTBUG-84469 Change-Id: I5f9311298d341a9a3061a6a640539583d1618939 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Doc: Update docs with cmake package informationNico Vertriest2020-06-301-0/+1
| | | | | | Task-number: QTBUG-85179 Change-Id: I70dda9b906ecd0b8d8f4d88b0562af8e6c428143 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Use QList instead of QVector in sqlJarek Kobus2020-06-2510-16/+16
| | | | | | Task-number: QTBUG-84469 Change-Id: I942aec7d949331a52d7f12fa2725d8d9707f605f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Simplify QSqlResultPrivate::fieldSerial()Andy Shaw2020-06-231-15/+1
| | | | | | | | | | Now that the bound values are kept in placeholder order we can depend on that and not have to ensure that fieldSerial() would give us something that is in alphabetical order should it end up being sorted. Change-Id: I3a3e443bef150a06f455e18e3502235b1ae4d242 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Change boundValues() to return a QVariantListAndy Shaw2020-06-224-32/+83
| | | | | | | | | | | | | This enables the order of boundValues to be consistent as with a QMap it could have been reordered which can be a problem for positional bindings. [ChangeLog][QtSQL] Changed signature of QSqlQuery::boundValues() to return a QVariantList Fixes: QTBUG-51609 Change-Id: I1c80fa8522fa7352723420b6fc9ec466406315fb Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move implementation of QVector/List back to qlist.hLars Knoll2020-06-202-2/+3
| | | | | | | | | | | | | And name the main class QList. That's also the one we document. This gives less porting pain for our users, and a lot less churn in our API, as we use QList in Qt 5 in 95% of our API. In addition, it gives more consistent naming with QStringList and QByteArrayList and disambiguates QList vs QVector(2|3|4)D. Fixes: QTBUG-84468 Change-Id: I3cba9d1d3179969d8bf9320b31be2230d021d1a9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QtSql: remove unused includesChristian Ehrlicher2020-06-202-5/+0
| | | | | Change-Id: I6d47daa8fe17bf4be3b100f1a04d63dee4851daa Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Port QtSql from QStringRef to QStringViewLars Knoll2020-06-111-4/+4
| | | | | | Task-number: QTBUG-84319 Change-Id: Icc9b955dae1aa13b16c01e26192cb82f828903b1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* MetaObject: Store the QMetaType of the methodsFabian Kosmale2020-06-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This does the analog of 46f407126ef3e94d59254012cdc34d6a4ad2faf2 for the methods we care about (signals, slots, Q_INVOKABLEs). In addition to the actual QMetaType, we store an array with offsets so that we later can do a mapping from methodIndex to metatype. The newly added QMetaMethod::{return,parameter}MetaType methods can then be used to retrieve the metatypes. This does however require that all involved types are complete. This is unfortunately not a feasible requirement. Thus, we only populate the metatype array on a best effort basis. For any incomplete type, we store QMetaType::Unknown. Then, when accessing the metatype, we fall back to the old string based code base if it's Unknown. Squashes "moc: support incomplete types" and "Fix compile failures after QMetaMethod change" Fixes: QTBUG-82932 Change-Id: I6b7a587cc364b7cad0c158d6de54e8a204289ad4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Document how to use CMake for Qt SQLKai Koehne2020-05-266-83/+21
| | | | | | | Task-number: QTBUG-73058 Change-Id: I07fa128853531ec09852647436d9302abac1c12c Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Models: remove version check for clearItemData()Christian Ehrlicher2020-05-232-4/+0
| | | | | | | The version checks for clearItemData() are no longer needed now. Change-Id: I5052188fb96cf637128662f3442d339820f0f41d Reviewed-by: David Faure <david.faure@kdab.com>
* Licenses: Remove reference to change in Qt 5.4Kai Koehne2020-05-221-3/+2
| | | | | | | Qt 5.4 is not documented anymore since quite some time. Change-Id: I6811ead502178f7acbed8cf450e42d7fd33ae29b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Sweep Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6 -> Q_DECLARE_SHAREDMarc Mutz2020-05-192-2/+2
| | | | | | | | | | | | This is Qt 6, so Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6 is the same as Q_DECLARE_SHARED. Let's hope we'll collectively get better at detecting missing Q_DECLARE_SHARED so we won't need a Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT7 in the future. Change-Id: I3da9faff4c66b64a3b257309012a2a10a6c6d027 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Sweep of int-ish → char-ish types near calls to QString::fromU*()Marc Mutz2020-05-121-3/+3
| | | | | | | | | | | | The fromUtf16(ushort*) and fromUcs4(uint*) overloads are going to be deprecated. Use the newer fromUtf16(char16_t*) and fromUcs4(char32_t*) overloads. As a drive-by, use std::end()/std::size() where applicable. Change-Id: I5a93e38cae4a2e33d49c90d06c5f14f7cb7ce90c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Enable warnings-are-errors also for snippetsKai Koehne2020-05-071-0/+1
| | | | | | Pick-to: 5.15 Change-Id: I6b3645924e4f090c7887ce0d6296a71dc8f8159d Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Snippets: Fix gcc warning about unused variableKai Koehne2020-05-071-0/+1
| | | | | | Pick-to: 5.15 Change-Id: I4396556038a545beedf599be1a2c61cbde99903a Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-0821-171/+814
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Fix coverity warnings in SQL snippetsPaul Wicking2020-03-262-8/+10
| | | | | | | | | | | | Fixes: QTBUG-83008 Change-Id: I126bc04719cd221a3d80ae825fca44e63aeec934 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * Doc: make Qt Sql snippets compilableNico Vertriest2020-03-2021-163/+804
| | | | | | | | | | | | | | Task-number: QTBUG-81496 Change-Id: Id6206e9179c2e8157c99e777a3de35bd83d49e34 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | QSqlError: Remove deprecated methodsMarcel Krems2020-04-062-128/+0
| | | | | | | | | | | | Change-Id: I4eb9918e65bc7990effb8a643332ba232e975893 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | Merge remote-tracking branch 'origin/5.15' into devSimon Hausmann2020-03-161-5/+0
|\| | | | | | | | | | | | | Conflicts: src/corelib/kernel/qmetatype.cpp Change-Id: I88eb0d3e9c9a38abf7241a51e370c655ae74e38a
| * Doc: Remove \contentspage commandsTopi Reinio2020-03-151-5/+0
| | | | | | | | | | | | | | | | The command is deprecated and has no effect apart from generating a documentation warning. Change-Id: I30871bfd6975f8268930cce99993a8579242fdb8 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | CMake: Regenerate configure.cmake files to get reportsAlexandru Croitor2020-03-091-0/+3
| | | | | | | | | | Change-Id: Ifa1646c7e471b3eaba552498ee1dc24f6ab864de Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devLars Knoll2020-02-281-5/+9
|\| | | | | | | Change-Id: I469b0501cc65fc5ce4d797a69ae89405cc69c7f8
| * Merge remote-tracking branch 'origin/5.14' into 5.15Lars Knoll2020-02-271-5/+9
| |\ | | | | | | | | | Change-Id: I4212d070d5752275085e754b96f0392113604dba
| | * Doc: List alternative ways to get the MySQL C ConnectorSze Howe Koh2020-02-271-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | The C Connector does not appear to be offered as a component in the MySQL 8.0.19.0 installer. Task-number: QTBUG-82187 Change-Id: I4b1ef83cca68e7bf6dd032ba35c0784354d7fed3 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-02-261-4/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/bearermonitor/CMakeLists.txt examples/network/CMakeLists.txt src/corelib/tools/qlinkedlist.h src/sql/kernel/qsqldriver_p.h src/sql/kernel/qsqlresult_p.h src/widgets/kernel/qwidget.cpp src/widgets/kernel/qwidget_p.h tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp tests/auto/tools/moc/allmocs_baseline_in.json Change-Id: I21a3c34570ae79ea9d30107fae71759d7eac17d9
| * | QtSql: cleanup QSqlDriverPrivate and QSqlResultPrivateChristian Ehrlicher2020-02-192-25/+14
| | | | | | | | | | | | | | | | | | | | | | | | Cleanup QSqlDriverPrivate/QSqlResultPrivate and their derived classes in ODBC, MySql, PostgreSQL and SQLite. Change-Id: I52e69c00cf981b81dde7c3a0370f86f06ef756bb Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | QtSql: remove compat SQL plugin namesChristian Ehrlicher2020-02-132-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the compat SQL plugin names (QMYSQL3, QOCI8, QODBC3, QPSQL7) since they are not needed and just confuse the user [ChangeLog][QtSql] The compat plugin names QMYSQL3, QOCI8, QODBC3 and QPSQL7 are no longer available. Change-Id: I6d88f449ef3e18881a6970fb374ba0ab074ef302 Reviewed-by: Andy Shaw <andy.shaw@qt.io>