diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-02-20 19:36:45 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-09-17 06:47:01 +0000 |
commit | 1b98ce1986ae96a0966f9ea075e327d641790343 (patch) | |
tree | bf987f90e887705d5c08be4b28587c9f11469c61 /src/sql | |
parent | 18ed6f20ad4327fa2ffbb687ac2f3ca7429c4348 (diff) |
QSqlRelation: mark shared-come-qt6
... and plaster API with nothrow (well, one function).
Change-Id: I36fd64c6fda5390954c82bba307c720d3b3215df
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/sql')
-rw-r--r-- | src/sql/models/qsqlrelationaltablemodel.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/sql/models/qsqlrelationaltablemodel.h b/src/sql/models/qsqlrelationaltablemodel.h index 4da460389c..f8b08b089f 100644 --- a/src/sql/models/qsqlrelationaltablemodel.h +++ b/src/sql/models/qsqlrelationaltablemodel.h @@ -43,6 +43,8 @@ #include <QtSql/qtsqlglobal.h> #include <QtSql/qsqltablemodel.h> +#include <QtCore/qtypeinfo.h> + QT_BEGIN_NAMESPACE @@ -53,17 +55,26 @@ public: QSqlRelation(const QString &aTableName, const QString &indexCol, const QString &displayCol) : tName(aTableName), iColumn(indexCol), dColumn(displayCol) {} + + void swap(QSqlRelation &other) Q_DECL_NOTHROW + { + qSwap(tName, other.tName); + qSwap(iColumn, other.iColumn); + qSwap(dColumn, other.dColumn); + } + inline QString tableName() const { return tName; } inline QString indexColumn() const { return iColumn; } inline QString displayColumn() const { return dColumn; } - inline bool isValid() const + bool isValid() const Q_DECL_NOTHROW { return !(tName.isEmpty() || iColumn.isEmpty() || dColumn.isEmpty()); } private: QString tName, iColumn, dColumn; }; +Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QSqlRelation) class QSqlRelationalTableModelPrivate; |