Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/sql/kernel/qsqlquery.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information ([email protected])
     4** All rights reserved.
     5** Contact: Nokia Corporation ([email protected])
    56**
    67** This file is part of the QtSql module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you
     37** @nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    6262    QAtomicInt ref;
    6363    QSqlResult* sqlResult;
    64     QSql::NumericalPrecisionPolicy precisionPolicy;
    6564
    6665    static QSqlQueryPrivate* shared_null();
     
    8281*/
    8382QSqlQueryPrivate::QSqlQueryPrivate(QSqlResult* result)
    84     : ref(1), sqlResult(result), precisionPolicy(QSql::HighPrecision)
     83    : ref(1), sqlResult(result)
    8584{
    8685    if (!sqlResult)
     
    103102    \ingroup database
    104103    \ingroup shared
    105     \mainclass
     104
    106105    \inmodule QtSql
    107106
     
    352351        bool fo = isForwardOnly();
    353352        *this = QSqlQuery(driver()->createResult());
    354         d->sqlResult->setNumericalPrecisionPolicy(d->precisionPolicy);
     353        d->sqlResult->setNumericalPrecisionPolicy(d->);
    355354        setForwardOnly(fo);
    356355    } else {
     
    359358        d->sqlResult->setLastError(QSqlError());
    360359        d->sqlResult->setAt(QSql::BeforeFirstRow);
    361         d->sqlResult->setNumericalPrecisionPolicy(d->precisionPolicy);
     360        d->sqlResult->setNumericalPrecisionPolicy(d->);
    362361    }
    363362    d->sqlResult->setQuery(query.trimmed());
     
    813812  efficient since results do not need to be cached. It will also
    814813  improve performance on some databases. For this to be true, you must
    815   call \c setForwardMode() before the query is prepared or executed.
     814  call \c setForward() before the query is prepared or executed.
    816815  Note that the constructor that takes a query and a database may
    817816  execute the query.
     
    819818  Forward only mode is off by default.
    820819
    821   \sa isForwardOnly(), next(), seek()
     820  Setting forward only to false is a suggestion to the database engine,
     821  which has the final say on whether a result set is forward only or
     822  scrollable. isForwardOnly() will always return the correct status of
     823  the result set.
     824
     825  \sa isForwardOnly(), next(), seek(), QSqlResult::setForwardOnly()
    822826*/
    823827void QSqlQuery::setForwardOnly(bool forward)
     
    892896        *this = QSqlQuery(driver()->createResult());
    893897        setForwardOnly(fo);
    894         d->sqlResult->setNumericalPrecisionPolicy(d->precisionPolicy);
     898        d->sqlResult->setNumericalPrecisionPolicy(d->);
    895899    } else {
    896900        d->sqlResult->setActive(false);
    897901        d->sqlResult->setLastError(QSqlError());
    898902        d->sqlResult->setAt(QSql::BeforeFirstRow);
    899         d->sqlResult->setNumericalPrecisionPolicy(d->precisionPolicy);
     903        d->sqlResult->setNumericalPrecisionPolicy(d->);
    900904    }
    901905    if (!driver()) {
     
    11271131  precision specified by \a precisionPolicy.
    11281132
    1129   The Oracle driver, for example, retrieves numerical values as
    1130   strings by default to prevent the loss of precision. If the high
    1131   precision doesn't matter, use this method to increase execution
    1132   speed by bypassing string conversions.
     1133  The Oracle driver, for example, numerical values as
     1134  strings
     1135 
     1136  string conversions.
    11331137
    11341138  Note: Drivers that don't support fetching numerical values with low
     
    11451149void QSqlQuery::setNumericalPrecisionPolicy(QSql::NumericalPrecisionPolicy precisionPolicy)
    11461150{
    1147     d->precisionPolicy = precisionPolicy;
     1151    d->;
    11481152}
    11491153
     
    11551159QSql::NumericalPrecisionPolicy QSqlQuery::numericalPrecisionPolicy() const
    11561160{
    1157     return d->precisionPolicy;
     1161    return d->;
    11581162}
    11591163
     
    11961200  result set and must be navigated to a valid record before data
    11971201  values can be retrieved. If a new result set isn't available the
    1198   function returns false and the the query is set to inactive. In any
     1202  function returns false and the query is set to inactive. In any
    11991203  case the old result set will be discarded.
    12001204
Note: See TracChangeset for help on using the changeset viewer.