From 56265031b763736163f1a229a7e7e6b7aaec8a36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Nowacki?= Date: Mon, 30 Jan 2012 12:21:43 +0100 Subject: Align QVariant::UserType and QMetaType::User MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is no point in keeping separate values which should mean the same. QVariant::UserType was used also to construct a valid, null QVariant, containing an instance of unknown custom type. The concept was strange and useless as there was no operation that could be done on such QVariant. Therefore it was dropped. Please note that the patch slightly changes behavior of different functions accepting a type id as parameter. Before QVariant::UserType was an invalid type from QMetaType perspective (id 127 was not assigned to any built-in type), but QMetaType::User points to the first registered custom type. Change-Id: I5c7d541a9affdcdacf53a4eda2272bdafaa87b71 Reviewed-by: Kent Hansen Reviewed-by: Lars Knoll Reviewed-by: João Abecasis Reviewed-by: Andrew Stanley-Jones Reviewed-by: Aaron Kennedy --- dist/changes-5.0.0 | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'dist') diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index fc5bebd11d..280b5d93f9 100644 --- a/dist/changes-5.0.0 +++ b/dist/changes-5.0.0 @@ -437,6 +437,13 @@ Qt for Windows CE cause an abort(). +- QVariant + + * Definition of QVariant::UserType changed. Currently it is the same as + QMetaType::User, which means that it points to the first registered custom + type, instead of a nonexistent type. + + - QMessageBox * The static function QMessageBox::question has changed the default argument -- cgit v1.2.3 From b8cf1d6bdcaefaa610014a742808af3ab2c6fe06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Nowacki?= Date: Fri, 3 Feb 2012 12:54:25 +0100 Subject: Remove QMetaType::unregisterType(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The function hasn't been working properly. It was not well tested, for example it is undefined how QVariant should behave if it contains an instance of an unregistered type. Concept of unregistering types was inspired by plug-in system, but in most supported platforms we do not unload plug-ins. Idea of type unregistering may block optimizations in meta object system, because it would be not possible to cache a type id. QMetaType::type() could return different ids for the same name. Currently QMetaType::unregisterType() is not used in Qt. Change-Id: I878b6e8d91de99f9bcefeab73af2e2ba0bd0cba0 Reviewed-by: Prasanth Ullattil Reviewed-by: Bradley T. Hughes Reviewed-by: João Abecasis Reviewed-by: Lars Knoll Reviewed-by: Thiago Macieira Reviewed-by: Kent Hansen --- dist/changes-5.0.0 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'dist') diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index 280b5d93f9..617b2d3d95 100644 --- a/dist/changes-5.0.0 +++ b/dist/changes-5.0.0 @@ -45,7 +45,9 @@ information about a particular change. in Qt4, so these methods return a bool now. If your code used the undocumented QBool, simply replace it with bool. -- QMetaType::construct() has been renamed to QMetaType::create(). +- QMetaType: + * QMetaType::construct() has been renamed to QMetaType::create(). + * QMetaType::unregisterType() has been removed. - QTestLib: * The QTRY_VERIFY and QTRY_COMPARE macros have been moved into QTestLib. -- cgit v1.2.3 From f5e1da12f0e7bdeee4db74acc52dfabeb12a4e31 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Mon, 6 Feb 2012 17:02:32 +0100 Subject: QSqlTableModel::removeRows(): don't emit extra beforeDelete Qt 5 seems like a welcome opportunity to stop emitting this spurious beforeDelete signal. Change-Id: Ib8628343ca9b8fdd85c154a206c7e2bf2c4c9dc1 Reviewed-by: Yunqiao Yin --- dist/changes-5.0.0 | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dist') diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index 617b2d3d95..6bacccc34a 100644 --- a/dist/changes-5.0.0 +++ b/dist/changes-5.0.0 @@ -329,6 +329,8 @@ QTestLib and log formats simultaneously. +* removeRows() no longer emits extra beforeDelete signal for out of range row. + **************************************************************************** * Database Drivers * **************************************************************************** -- cgit v1.2.3 From 269ef14215d3c3f89fe6239879a5db111dc1a7b4 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Mon, 6 Feb 2012 17:19:19 +0100 Subject: QSqlTableModel::removeRows(): require valid full range of rows If an invalid range of rows is specified, it's likely to be a programming or user error. The old behavior of ignoring out of range rows seems dangerous and complicates the code. Also implement the documented behavior of returning false if changes are unsuccessful for OnFieldChange and OnRowChange. Previously the return value of submit() was ignored. Updated and improved documentation. Change-Id: Iaaf51c6d9a0c8c06fd5d186b4b88358fbeab9936 Reviewed-by: Yunqiao Yin --- dist/changes-5.0.0 | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'dist') diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index 6bacccc34a..5317137059 100644 --- a/dist/changes-5.0.0 +++ b/dist/changes-5.0.0 @@ -331,6 +331,11 @@ QTestLib * removeRows() no longer emits extra beforeDelete signal for out of range row. +* removeRows() now requires the whole range of targetted rows to be valid +before doing anything. Previously, it would remove what it could and +ignore the rest of the range. + + **************************************************************************** * Database Drivers * **************************************************************************** -- cgit v1.2.3 From f3138fa080b1c6ce7ab28c4572c3cf647b3485c1 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Mon, 6 Feb 2012 14:04:26 +0100 Subject: QSqlTableModel: do not suppress dataChanged() on inserted record Affects setData() and setRecord(). Previously dataChanged() was suppressed when editing an inserted record, except for OnManualSubmit. The motivation was probably to allow setData() to be used while handling primeInsert(). Suppressing dataChanged() is not a good idea since views other than the one which made the change will not know of the change. It is a terrible idea to call setData() or setRecord() while handling primeInsert(), so this is now expressly forbidden. setData() and setRecord() now do nothing and return false if called while rows are being inserted. Change-Id: I96738c09a6268704c5626d95b72bfb46378e3242 Reviewed-by: Oswald Buddenhagen --- dist/changes-5.0.0 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'dist') diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index 5317137059..c62d8b1163 100644 --- a/dist/changes-5.0.0 +++ b/dist/changes-5.0.0 @@ -328,6 +328,20 @@ QTestLib * [QTBUG-20615] Autotests can now log test output to multiple destinations and log formats simultaneously. +QtSql +----- +QSqlTableModel/QSqlRelationalTableModel + +* The dataChanged() signal is now emitted for changes made to an inserted +record that has not yet been committed. Previously, dataChanged() was +suppressed in this case for OnRowChange and OnFieldChange. This was probably +an attempt to avoid trouble if setData() was called while handling +primeInsert(). By emitting dataChanged(), we ensure that all views are aware +of the change. + +* While handling primeInsert() signal, the record must be manipulated using +the provided reference. Do not attempt to manipulate the records using the +model methods setData() or setRecord(). * removeRows() no longer emits extra beforeDelete signal for out of range row. -- cgit v1.2.3 From 2ba0700ebffabb6d89595724ef7efe5baf230928 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 1 Feb 2012 12:58:31 +0100 Subject: Update note about metatype fully defined requirement. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is now public API to re-allow forward declared types as metatypes. Change-Id: I6c956ea2dc96f66eccfcfa81fcbb833b58b58d61 Reviewed-by: João Abecasis Reviewed-by: Jonas Gastal --- dist/changes-5.0.0 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'dist') diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index c62d8b1163..d2e8dde9de 100644 --- a/dist/changes-5.0.0 +++ b/dist/changes-5.0.0 @@ -124,8 +124,9 @@ information about a particular change. - QMetaType - * It is no longer possible to use Q_DECLARE_METATYPE(Foo*) where Foo is only - forward declared - it must be fully defined. + * Q_DECLARE_METATYPE(Foo*) now requires that Foo is fully defined. In + cases where a forward declared type should be used as a metatype, + Q_DECLARE_OPAQUE_POINTER(Foo*) can be used to allow that. - QItemEditorFactory -- cgit v1.2.3 From a58e630b61c19eac8f0c0d931825b42eeb7ea16b Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Wed, 8 Feb 2012 00:16:46 +0100 Subject: QSqlTableModel::setRecord(): improve handling of field mapping -Only use fields where generated flag is set to true. -Require all fields to map correctly. If fields don't map, that is a sign of a programming or user error. Change-Id: Ie8474393005de6c9926b4e46985d62b194eafde2 Reviewed-by: Yunqiao Yin --- dist/changes-5.0.0 | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'dist') diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index d2e8dde9de..996bdf4b0b 100644 --- a/dist/changes-5.0.0 +++ b/dist/changes-5.0.0 @@ -350,6 +350,11 @@ model methods setData() or setRecord(). before doing anything. Previously, it would remove what it could and ignore the rest of the range. +* setRecord() and insertRecord() + -Only use fields where generated flag is set to true. This is + is consistent with the meaning of the flag. + -Require all fields to map correctly. Previously fields that didn't + map were simply ignored. **************************************************************************** * Database Drivers * -- cgit v1.2.3 From 68cee5258b3db95aaf98c456a257863a2ef7ba14 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Wed, 8 Feb 2012 00:45:47 +0100 Subject: QSqlTableModel::insertRecord(): clean up after failed setRecord() Change-Id: Ic9f314144bd3ccf4b59b9cb3f0d79f8d6f97a824 Reviewed-by: Yunqiao Yin --- dist/changes-5.0.0 | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dist') diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index 996bdf4b0b..7726843ccb 100644 --- a/dist/changes-5.0.0 +++ b/dist/changes-5.0.0 @@ -355,6 +355,8 @@ ignore the rest of the range. is consistent with the meaning of the flag. -Require all fields to map correctly. Previously fields that didn't map were simply ignored. + -For OnManualSubmit, insertRecord() no longer leaves behind an empty + row if setRecord() fails. **************************************************************************** * Database Drivers * -- cgit v1.2.3 From 89b192a082652061ae1874f6bc1816c0f01e7a55 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 10 Feb 2012 16:40:06 +0200 Subject: Add an entry about TouchCancel to the changes file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: If6d29db42ac59fcdbab82c23f30bd32e884354b2 Reviewed-by: Samuel Rødal --- dist/changes-5.0.0 | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'dist') diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index 7726843ccb..b8a4e21490 100644 --- a/dist/changes-5.0.0 +++ b/dist/changes-5.0.0 @@ -122,6 +122,11 @@ information about a particular change. * QWidget *widget() has been removed and is replaced by QObject *target() in order to avoid QWidget dependencies. + * QEvent::TouchCancel has been introduced. On systems where it makes + sense this event type can be used to differentiate between a + regular TouchEnd and abrupt touch sequence cancellations caused by + the compositor, for example when a system gesture gets recognized. + - QMetaType * Q_DECLARE_METATYPE(Foo*) now requires that Foo is fully defined. In -- cgit v1.2.3 From 9b2971cbb4ebf102198c2320a575e2fd718c182e Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Thu, 2 Feb 2012 17:08:44 +1000 Subject: testlib: Count passes, fails and skips consistently. For data-driven tests, testlib previously counted one fail or skip for each data row that failed or skipped, while it counted only one pass for a test function where all rows passed and counted no passes for a test function where some rows passed and some rows failed. A similar problem also existed for benchmark tests, which could run multiple iterations of the same test, with each fail and skip being counted but only a single pass being counted for the entire series of iterations. This commit makes testlib count one pass, fail or skip for each data row. Test functions that are not data-driven count one result for the test function, as before. Benchmark tests count one pass, fail or skip per iteration. A side-effect of this change is that the test output in plain text, xml and light xml formats now shows a result for every data row and benchmark iteration executed, allowing post-processors to correctly calculate the total number of tests executed. Previously, individual rows were not shown in the test output if they passed, making such calculations impossible. The only change to the xunitxml output format is to correct a bug where no test result was recorded for a test function if the last data row was skipped and all other rows passed -- in which case the overall result should be a pass. Note that there is also a pre-existing bug in the xunit logger, where no result is reported if all rows are skipped; that bug is unaffected by this commit. Task-number: QTBUG-21848 Task-number: QTBUG-22124 Change-Id: I7e17177e10d6e89e55b9684c159bd506f21d002b Reviewed-by: Ed Baak --- dist/changes-5.0.0 | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'dist') diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index b8a4e21490..bb4ceef0d0 100644 --- a/dist/changes-5.0.0 +++ b/dist/changes-5.0.0 @@ -50,6 +50,11 @@ information about a particular change. * QMetaType::unregisterType() has been removed. - QTestLib: + * The plain-text, xml and lightxml test output formats have been changed to + show a test result for every row of test data in data-driven tests. In + Qt4, only fails and skips were shown for individual data rows and passes + were not shown for individual data rows, preventing accurate calculation + of test run rates and pass rates. * The QTRY_VERIFY and QTRY_COMPARE macros have been moved into QTestLib. These macros formerly lived in tests/shared/util.h but are now provided by including the header. In addition, -- cgit v1.2.3 From 2ecdb8c091cbfdc2b4f81c90828fb61b96c565fe Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Thu, 9 Feb 2012 14:53:35 +0100 Subject: QSql*Model: make indexInQuery() virtual Qt 5 seems like an excellent opportunity to simplify logic and separate concerns by making indexInQuery() virtual. Note that this wasn't my idea, but was mentioned in a helpful comment. Change-Id: Ie29ead110def45297c32de3ce6d07a8eefb08d8c Reviewed-by: Yunqiao Yin --- dist/changes-5.0.0 | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'dist') diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index bb4ceef0d0..884c3083fc 100644 --- a/dist/changes-5.0.0 +++ b/dist/changes-5.0.0 @@ -213,6 +213,8 @@ information about a particular change. - QSystemLocale has been removed from the public API. +- QSqlQueryModel::indexInQuery() is now virtual. See note below under QSql. + **************************************************************************** * General * **************************************************************************** @@ -368,6 +370,10 @@ ignore the rest of the range. -For OnManualSubmit, insertRecord() no longer leaves behind an empty row if setRecord() fails. +* QSqlQueryModel::indexInQuery() is now virtual. See +QSqlTableModel::indexInQuery() as example of how to implement in a +subclass. + **************************************************************************** * Database Drivers * **************************************************************************** -- cgit v1.2.3 From 06ebe5bc8049282c1e25bb5372e0cdc7e028ae2b Mon Sep 17 00:00:00 2001 From: Jan-Arve Saether Date: Mon, 20 Feb 2012 11:19:10 +0100 Subject: Updated for accessibility Change-Id: I13b5c2f293e9c1c238c7b7c6aae9d26f5c150f24 Reviewed-by: Frederik Gladhorn --- dist/changes-5.0.0 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'dist') diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index 884c3083fc..662226d30c 100644 --- a/dist/changes-5.0.0 +++ b/dist/changes-5.0.0 @@ -93,8 +93,9 @@ information about a particular change. text(Text t, int child) -> text(Text t), rect(int child) -> rect() setText(Text t, int child, const QString &text) -> setText(Text t, const QString &text) role(int child) -> role(), state(int child) -> state() - relationTo(int child, const QAccessibleInterface *other, int otherChild) -> - relationTo(const QAccessibleInterface *other) + * parent() and child() was added in order to do hierarchical navigation. + * relations() was added as a replacement to relationTo() + * As a consequence of the above two points, navigate() was removed. * Accessible-Action related functions have been removed. QAccessibleInterface subclasses are expected to implement the QAccessibleActionInterface instead. These functions have been removed: -- cgit v1.2.3