QSqlIndex: add Q_PROPERTY
Add Q_PROPERTY to follow the current Qt style and simplify the documentation. Task-number: QTBUG-120566 Change-Id: Iaf844eb6f60427dab7fba6ac20b16ffa11f217b8 Reviewed-by: Kai Köhne <kai.koehne@qt.io>bb10
parent
c10530fd97
commit
294da15696
|
|
@ -84,20 +84,22 @@ QSqlIndex::~QSqlIndex()
|
|||
}
|
||||
|
||||
/*!
|
||||
Sets the name of the index to \a name.
|
||||
\property QSqlIndex::name
|
||||
\since 6.8
|
||||
This property holds the name of the index.
|
||||
*/
|
||||
/*!
|
||||
\fn QString QSqlIndex::name() const
|
||||
Returns the \l name.
|
||||
*/
|
||||
/*!
|
||||
Sets \l name to \a name.
|
||||
*/
|
||||
|
||||
void QSqlIndex::setName(const QString& name)
|
||||
{
|
||||
nm = name;
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn QString QSqlIndex::name() const
|
||||
|
||||
Returns the name of the index.
|
||||
*/
|
||||
|
||||
/*!
|
||||
Appends the field \a field to the list of indexed fields. The
|
||||
field is appended with an ascending sort order.
|
||||
|
|
@ -166,15 +168,17 @@ QString QSqlIndex::createField(int i, const QString& prefix, bool verbose) const
|
|||
}
|
||||
|
||||
/*!
|
||||
\fn QString QSqlIndex::cursorName() const
|
||||
|
||||
Returns the name of the cursor which the index is associated with.
|
||||
\property QSqlIndex::cursorName
|
||||
\since 6.8
|
||||
This property holds the name of the cursor which the index
|
||||
is associated with.
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
Sets the name of the cursor that the index is associated with to
|
||||
\a cursorName.
|
||||
\fn QString QSqlIndex::cursorName() const
|
||||
Returns the \l cursorName.
|
||||
*/
|
||||
/*!
|
||||
Sets \l cursorName to \a cursorName.
|
||||
*/
|
||||
void QSqlIndex::setCursorName(const QString& cursorName)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,14 +7,20 @@
|
|||
#include <QtSql/qtsqlglobal.h>
|
||||
#include <QtSql/qsqlrecord.h>
|
||||
#include <QtCore/qlist.h>
|
||||
#include <QtCore/qmetaobject.h>
|
||||
#include <QtCore/qstring.h>
|
||||
|
||||
// clazy:excludeall=qproperty-without-notify
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
class Q_SQL_EXPORT QSqlIndex : public QSqlRecord
|
||||
{
|
||||
Q_GADGET
|
||||
public:
|
||||
Q_PROPERTY(QString name READ name WRITE setName)
|
||||
Q_PROPERTY(QString cursorName READ cursorName WRITE setCursorName)
|
||||
|
||||
explicit QSqlIndex(const QString &cursorName = QString(), const QString &name = QString());
|
||||
QSqlIndex(const QSqlIndex &other);
|
||||
QSqlIndex(QSqlIndex &&other) noexcept = default;
|
||||
|
|
|
|||
Loading…
Reference in New Issue