Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/sql/models/qsqlquerymodel.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    280280        if (val.isValid())
    281281            return val;
    282         if (role == Qt::DisplayRole && d->rec.count() > section)
     282
     283        // See if it's an inserted column (iiq.column() != -1)
     284        QModelIndex dItem = indexInQuery(createIndex(0, section));
     285
     286        if (role == Qt::DisplayRole && d->rec.count() > section && dItem.column() != -1)
    283287            return d->rec.fieldName(section);
    284288    }
     
    306310    lastError() can be used to retrieve verbose information if there
    307311    was an error setting the query.
     312
     313    \note Calling setQuery() will remove any inserted columns.
    308314
    309315    \sa query(), QSqlQuery::isActive(), QSqlQuery::setForwardOnly(), lastError()
     
    371377
    372378    Executes the query \a query for the given database connection \a
    373     db. If no database is specified, the default connection is used.
     379    db. If no database (or an invalid database) is specified, the
     380    default connection is used.
    374381
    375382    lastError() can be used to retrieve verbose information if there
Note: See TracChangeset for help on using the changeset viewer.