QSqlDriver: add Q_PROPERTY
Add Q_PROPERTY to follow the current Qt style and simplify the documentation. Task-number: QTBUG-120566 Change-Id: Ibbafde35bb5600453ed3a3de36b6bf2b5c560e5f Reviewed-by: Kai Köhne <kai.koehne@qt.io>bb10
parent
9806f54a58
commit
6dfc988ea0
|
|
@ -728,16 +728,7 @@ QStringList QSqlDriver::subscribedToNotifications() const
|
|||
}
|
||||
|
||||
/*!
|
||||
\since 4.6
|
||||
|
||||
Sets the default numerical precision policy used by queries created
|
||||
by this driver to \a precisionPolicy.
|
||||
|
||||
Note: Setting the default precision policy to \a precisionPolicy
|
||||
doesn't affect any currently active queries.
|
||||
|
||||
\sa QSql::NumericalPrecisionPolicy, numericalPrecisionPolicy(),
|
||||
QSqlQuery::setNumericalPrecisionPolicy(), QSqlQuery::numericalPrecisionPolicy()
|
||||
Sets \l numericalPrecisionPolicy to \a precisionPolicy.
|
||||
*/
|
||||
void QSqlDriver::setNumericalPrecisionPolicy(QSql::NumericalPrecisionPolicy precisionPolicy)
|
||||
{
|
||||
|
|
@ -746,13 +737,18 @@ void QSqlDriver::setNumericalPrecisionPolicy(QSql::NumericalPrecisionPolicy prec
|
|||
}
|
||||
|
||||
/*!
|
||||
\since 4.6
|
||||
\property QSqlDriver::numericalPrecisionPolicy
|
||||
\since 6.8
|
||||
|
||||
Returns the current default precision policy for the database connection.
|
||||
This property holds the precision policy for the database connection.
|
||||
\note Setting the precision policy doesn't affect any currently active queries.
|
||||
|
||||
\sa QSql::NumericalPrecisionPolicy, setNumericalPrecisionPolicy(),
|
||||
\sa QSql::NumericalPrecisionPolicy,
|
||||
QSqlQuery::numericalPrecisionPolicy(), QSqlQuery::setNumericalPrecisionPolicy()
|
||||
*/
|
||||
/*!
|
||||
Returns the \l numericalPrecisionPolicy.
|
||||
*/
|
||||
QSql::NumericalPrecisionPolicy QSqlDriver::numericalPrecisionPolicy() const
|
||||
{
|
||||
Q_D(const QSqlDriver);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include <QtCore/qstring.h>
|
||||
#include <QtCore/qstringlist.h>
|
||||
|
||||
// clazy:excludeall=qproperty-without-notify
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
|
|
@ -54,6 +55,8 @@ public:
|
|||
MimerSQL,
|
||||
};
|
||||
|
||||
Q_PROPERTY(QSql::NumericalPrecisionPolicy numericalPrecisionPolicy READ numericalPrecisionPolicy WRITE setNumericalPrecisionPolicy)
|
||||
|
||||
explicit QSqlDriver(QObject *parent = nullptr);
|
||||
~QSqlDriver();
|
||||
virtual bool isOpen() const;
|
||||
|
|
|
|||
Loading…
Reference in New Issue