| 1 | // Copyright (C) 2022 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #define QT_SQL_BUILD_REMOVED_API |
| 5 | |
| 6 | #include "qtsqlglobal.h" |
| 7 | |
| 8 | QT_USE_NAMESPACE |
| 9 | |
| 10 | #if QT_SQL_REMOVED_SINCE(6, 4) |
| 11 | |
| 12 | #endif // QT_SQL_REMOVED_SINCE(6, 4) |
| 13 | |
| 14 | #if QT_SQL_REMOVED_SINCE(6, 5) |
| 15 | |
| 16 | #if QT_CONFIG(sqlmodel) |
| 17 | |
| 18 | #include "qsqlquerymodel.h" |
| 19 | #include "qsqlquery.h" |
| 20 | |
| 21 | QSqlQuery QSqlQueryModel::query() const |
| 22 | { |
| 23 | QT_IGNORE_DEPRECATIONS(return query(QT6_CALL_NEW_OVERLOAD);) |
| 24 | } |
| 25 | |
| 26 | #include "qsqltablemodel.h" |
| 27 | |
| 28 | void QSqlTableModel::setQuery(const QSqlQuery &query) |
| 29 | { |
| 30 | QT_IGNORE_DEPRECATIONS(QSqlQueryModel::setQuery(query);) |
| 31 | } |
| 32 | |
| 33 | #endif // QT_CONFIG(sqlmodel) |
| 34 | |
| 35 | #endif // QT_SQL_REMOVED_SINCE(6, 5) |
| 36 | |
| 37 | #if QT_SQL_REMOVED_SINCE(6, 6) |
| 38 | |
| 39 | #include "qsqlresult.h" |
| 40 | #include <QtSql/private/qsqlresult_p.h> |
| 41 | |
| 42 | // #include <qotherheader.h> |
| 43 | // // implement removed functions from qotherheader.h |
| 44 | // order sections alphabetically to reduce chances of merge conflicts |
| 45 | |
| 46 | QList<QVariant> &QSqlResult::boundValues() const |
| 47 | { |
| 48 | Q_D(const QSqlResult); |
| 49 | return const_cast<QSqlResultPrivate *>(d)->values; |
| 50 | } |
| 51 | |
| 52 | #endif // QT_SQL_REMOVED_SINCE(6, 6) |
| 53 | |
| 54 | #if QT_SQL_REMOVED_SINCE(6, 8) |
| 55 | |
| 56 | #include "qsqlrecord.h" |
| 57 | #include "qsqlfield.h" |
| 58 | |
| 59 | // #include <qotherheader.h> |
| 60 | // // implement removed functions from qotherheader.h |
| 61 | // order sections alphabetically to reduce chances of merge conflicts |
| 62 | |
| 63 | bool QSqlRecord::contains(const QString &name) const |
| 64 | { |
| 65 | return contains(name: QStringView(name)); |
| 66 | } |
| 67 | |
| 68 | QSqlField QSqlRecord::field(const QString &name) const |
| 69 | { |
| 70 | return field(name: QStringView(name)); |
| 71 | } |
| 72 | |
| 73 | int QSqlRecord::indexOf(const QString &name) const |
| 74 | { |
| 75 | return indexOf(name: QStringView(name)); |
| 76 | } |
| 77 | |
| 78 | bool QSqlRecord::isGenerated(const QString &name) const |
| 79 | { |
| 80 | return isGenerated(name: QStringView(name)); |
| 81 | } |
| 82 | |
| 83 | bool QSqlRecord::isNull(const QString &name) const |
| 84 | { |
| 85 | return isNull(name: QStringView(name)); |
| 86 | } |
| 87 | |
| 88 | void QSqlRecord::setGenerated(const QString &name, bool generated) |
| 89 | { |
| 90 | setGenerated(name: QStringView(name), generated); |
| 91 | } |
| 92 | |
| 93 | void QSqlRecord::setNull(const QString &name) |
| 94 | { |
| 95 | setNull(QStringView(name)); |
| 96 | } |
| 97 | |
| 98 | void QSqlRecord::setValue(const QString &name, const QVariant &val) |
| 99 | { |
| 100 | setValue(name: QStringView(name), val); |
| 101 | } |
| 102 | |
| 103 | QVariant QSqlRecord::value(const QString &name) const |
| 104 | { |
| 105 | return value(name: QStringView(name)); |
| 106 | } |
| 107 | |
| 108 | |
| 109 | #include "qsqlquery.h" |
| 110 | |
| 111 | bool QSqlQuery::isNull(const QString &name) const |
| 112 | { |
| 113 | return isNull(name: QStringView(name)); |
| 114 | } |
| 115 | |
| 116 | QVariant QSqlQuery::value(const QString &name) const |
| 117 | { |
| 118 | return value(name: QStringView(name)); |
| 119 | } |
| 120 | |
| 121 | #endif // QT_SQL_REMOVED_SINCE(6, 8) |
| 122 | |