diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2012-10-16 10:43:36 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2012-10-16 10:46:48 +0200 |
commit | 8fc4f99e468a279e6bb8442adad6b6a46d1be1c3 (patch) | |
tree | dfd0540ecac0bc86594e9e997d7e979e40dacc6d /src/sql | |
parent | d3921cce47f834dd37cf0bb4085ba242dbbe2412 (diff) | |
parent | f7241e8cb949ecf2d86fae2a759a8e1fdb148a26 (diff) |
Merge remote-tracking branch 'gerrit/master' into newdocs
Change-Id: If2168c519daf45390af04af9ef9722770453a493
Diffstat (limited to 'src/sql')
-rw-r--r-- | src/sql/kernel/qsql.qdoc | 12 | ||||
-rw-r--r-- | src/sql/models/qsqltablemodel.h | 6 |
2 files changed, 7 insertions, 11 deletions
diff --git a/src/sql/kernel/qsql.qdoc b/src/sql/kernel/qsql.qdoc index 3354244c67..3b0e848af1 100644 --- a/src/sql/kernel/qsql.qdoc +++ b/src/sql/kernel/qsql.qdoc @@ -81,19 +81,15 @@ /*! \enum QSql::NumericalPrecisionPolicy - This enum type describes at which precision levels numercial values are read from - a database. - - Some databases support numerical values with a precision that is not storable in a - C++ basic data type. The default behavior is to bind these values as a QString. - This enum can be used to override this behavior. + Numerical values in a database can have precisions greater than their corresponding + C++ types. This enum lists the policies for representing such values in the application. \value LowPrecisionInt32 Force 32bit integer values. In case of floating point numbers, the fractional part is silently discarded. \value LowPrecisionInt64 Force 64bit integer values. In case of floating point numbers, the fractional part is silently discarded. - \value LowPrecisionDouble Force \c double values. - \value HighPrecision The default behavior - try to preserve maximum precision. + \value LowPrecisionDouble Force \c double values. This is the default policy. + \value HighPrecision Strings will be used to preserve precision. Note: The actual behaviour if an overflow occurs is driver specific. The Oracle database just returns an error in this case. diff --git a/src/sql/models/qsqltablemodel.h b/src/sql/models/qsqltablemodel.h index 0b038e1d70..df1946fb9f 100644 --- a/src/sql/models/qsqltablemodel.h +++ b/src/sql/models/qsqltablemodel.h @@ -66,9 +66,6 @@ public: explicit QSqlTableModel(QObject *parent = 0, QSqlDatabase db = QSqlDatabase()); virtual ~QSqlTableModel(); - virtual bool select(); - virtual bool selectRow(int row); - virtual void setTable(const QString &tableName); QString tableName() const; @@ -111,6 +108,9 @@ public: virtual void revertRow(int row); public Q_SLOTS: + virtual bool select(); + virtual bool selectRow(int row); + bool submit(); void revert(); |