Qt 6.8.3 with BlackBerry 10 (QNX 8 / ARMv7) patches
 
 
 
 
 
 
Go to file
Mark Brand 83c9ebbd66 QSqlQueryModel::setQuery() don't use deprecated reset()
Previously the method attempted to reset only as a last resort.

Now reset() is deprecated and resetting must happen between emitting
modelAboutToBeReset() and modelReset(). Since this suffices in all
cases to notify views that they must reinterrogate the model, it is no
longer necessary to signal explicitly row removals and insertions
within the scope of the reset.

Additionally, fetchMore() is now called within the scope of the reset
so insert signals do not have to be emitted here either.

This improved handling of resetting in QSqlQueryModel also allows the
cache in QSqlTableModel to be cleared directly at select().

This change may actually allow views to operate more efficiently since
they no longer have to react to separate row removal and insert
signals. Views can avoid pointless deallocation and reallocation
by considering row count only after the reset is finished. The cost is
that the columns and horizontal headers must be considered in the view
at each setQuery() call. In any case, it is not clear that trying to
be smart about this in the model justifies additional complexity.

Tests had to be adjusted where they expected explicit row removal
and insert signals.

Change-Id: I4f7eac1419824361d7d9bdcc6a87092b33e80d7a
Task-Id: QTBUG-25419
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
2012-04-23 19:20:19 +02:00
bin Ignore moduledir/doc in syncqt 2012-04-17 23:16:51 +02:00
config.tests Ensure that qXXXdetection.h can be included directly 2012-04-21 11:19:39 +02:00
dist QSqlQueryModel::setQuery() don't use deprecated reset() 2012-04-23 19:20:19 +02:00
doc Doc: Fix most QDoc errors in QtXml. 2012-04-23 09:45:24 +02:00
examples Use org.example instead of com.trolltech for the D-Bus examples 2012-04-22 21:32:33 +02:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs Set default Lighthouse plugin for QNX 2012-04-23 17:04:18 +02:00
qmake fix static library names when generating .pc files for pkgconfig 2012-04-19 19:46:07 +02:00
src QSqlQueryModel::setQuery() don't use deprecated reset() 2012-04-23 19:20:19 +02:00
tests QSqlQueryModel::setQuery() don't use deprecated reset() 2012-04-23 19:20:19 +02:00
tools Fix detection of default platform plugin. 2012-04-19 16:40:29 +02:00
util Merge remote-tracking branch 'origin/master' into api_changes 2012-04-16 12:04:34 +02:00
.gitattributes Added .tag file with Git revision. 2011-05-03 16:23:49 +02:00
.gitignore Add imports directory to ignore list 2012-04-11 01:42:12 +02:00
.tag Added .tag file with Git revision. 2011-05-03 16:23:49 +02:00
INSTALL Remove Symbian specific code from qtbase. 2012-01-31 07:08:31 +01:00
LGPL_EXCEPTION.txt Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.LGPL Update contact information in license headers. 2012-01-23 04:04:33 +01:00
LICENSE.PREVIEW.COMMERCIAL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
configure Fix detection of default platform plugin. 2012-04-19 16:40:29 +02:00
configure.bat Remove Q_BYTE_ORDER and -*-endian arguments from configures 2012-03-02 14:48:00 +01:00
header.BSD Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.FDL Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.LGPL Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.LGPL-ONLY Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qtbase.pro device: Add -device and -device-option to configure 2012-03-27 05:35:57 +02:00
sync.profile Add qprocessordetection.h 2012-02-08 12:33:11 +01:00