Commit Graph

68 Commits

Author SHA1 Message Date
Ulf Hermann a97083d597 QQmlDelegateModel: Drop FINAL from some properties
The dynamic metaobject of QQmlDelegateModelAttached likes to override
them, which produces warnings.

Amends commit 9355b7173c.

Pick-to: 6.10 6.9 6.8
Change-Id: Iaf0d6627fe6c373177f7f28a750fa2baf5fa2a7e
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
2025-09-11 14:18:59 +02:00
Mitch Curtis e7b90cfc31 QQmlDataTest: drop default try timeout from 5 seconds to 1
Make debugging of failing tests less painful.

The tests that had to be changed as a result are listed
in the comments of the linked task.

Fixes: QTBUG-138662
Task-number: QTBUG-81979
Change-Id: Iee50f2d4f2160e3e9bc2c7985925583fad810811
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2025-08-07 10:45:29 +08:00
Zhao Yuhang 60297d4d1e Port away from QPair
QPair is just an alias of std::pair anyway.

Task-number: QTBUG-115841
Change-Id: I26fc90adcc775aac9955ad57304af914dc4ed48f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2025-04-12 05:39:59 +00:00
Lucie Gérard 9c5fc88388 Correct license for test files
According to QUIP-18 [1], all test files should be
LicenseRef-Qt-Commercial OR GPL-3.0-only

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I26d72e8de04d4c7c57b3b7838af5d033265de5ba
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-02-27 10:32:21 +01:00
Ulf Hermann 7cb7f6ab7f Remove remaining foreach in quick tests
Task-number: QTBUG-115808
Change-Id: I30c27cf9972257897f15d57d62ff05ad1028b35e
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-08-23 15:30:11 +02:00
Marc Mutz 8edbcdbeb4 Mark the module as free of Q_FOREACH, except where it isn't
The density of Q_FOREACH uses is high here, too high for this author,
unfamiliar with this code, to tackle in a short amount of time. But
they're concentrated in just a few TUs, so pick a different strategy:

Mark the whole module with QT_NO_FOREACH, to prevent new uses from
creeping in, and whitelist the affected TUs by #undef'ing
QT_NO_FOREACH locally, at the top of each file. For TUs that are part
of a larger executable, this requires these files to be compiled
separately, so add them to NO_PCH_SOURCES (which implies
NO_UNITY_BUILD_SOURCES, too). Created QTBUG-115808 to keep track of
this.

Task-number: QTBUG-115808
Change-Id: I29c377f939e3d747e3ce72c224c4ee722df7a95d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-08-17 18:04:35 +02:00
Ulf Hermann e9f650cad8 Models: Straighten out model and modelData properties
If there is more than one role, just return the whole model item as
modelData. This makes sure we can always require modelData. That's a
basic precondition for writing delegates that work with any model.

The test shows that model and modelData behave quite erratically in the
different cases, but much of this cannot be changed anymore. At least
they are now both available in all cases.

Furthermore, provide modelData as anonymous property of model. This way,
if you have a model that can be singular, and a role that will be an
empty string if the model is singular, you can just write:

SomeDelegate {
    required property var model
    someData: model[role]
}

Task-number: QTBUG-111176
Task-number: QTBUG-110980
Task-number: QTBUG-104752
Change-Id: Ie200be467df2098d817b85b03d2409267722b596
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-03-24 12:12:06 +01:00
Ulf Hermann ca5e691996 tst_qquickvisualdatamodel.cpp: Avoid memory leaks
Change-Id: I5ee44fec9cc214c5a7ffb916dc23ea5db10574d0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-21 11:27:18 +01:00
Marc Mutz 958cd3ee10 Port from container::count() and length() to size()
This is a semantic patch using ClangTidyTransformator as in
qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8:

  auto QtContainerClass = anyOf(
      expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o),
      expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o));
  makeRule(cxxMemberCallExpr(on(QtContainerClass),
                             callee(cxxMethodDecl(hasAnyName({"count", "length"),
                                                  parameterCountIs(0))))),
           changeTo(cat(access(o, cat("size"), "()"))),
           cat("use 'size()' instead of 'count()/length()'"))

a.k.a qt-port-to-std-compatible-api with config Scope: 'Container',
with the extended set of container classes recognized.

Change-Id: Idb1f75dfe2323bd1d9e8b4d58d54f1b4b80c7ed7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-10-07 23:38:48 +02:00
Lucie Gérard 0dc4fd240a Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.

Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-06-11 08:05:15 +02:00
Fabian Kosmale 2664b1988f Avoid double applyDelegateChange in QQIV::setDelegate
If a QQmlDelegateModel is used together with QQuickItemView, then we
will already call applyDelegateChange when the DelegateModel's
delegateChanged signal is emitted from QQmlDelegateModel::setDelegate.
Calling it manually in QQuickItemView's setDelegate is thus superfluous.

Fixes: QTBUG-102793
Pick-to: 6.2 6.3 5.15
Change-Id: Ifffb23661813c4e71287538ec5342215dfbbdad6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-05-04 22:34:16 +02:00
Ulf Hermann ec79af7396 DelegateModel: Use actual bindings for required properties
Tracking the change signals is brittle and error prone. We have bindings
for this case. Let's use them. We can construct a synthetic
QV4::Function that contains its own QQmlJSAotFunction. In order to pass
the property index to the function we generalize the "index" property of
QQmlJSAotFunction to contain any extra data the function may want to
use. If there is no compilation unit, we pass that instead.

Fixes: QTBUG-91649
Change-Id: I0758bcc4964a48c6818d18bfb0972e67dbc16a1f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-04-11 14:12:09 +02:00
Fabian Kosmale c71d1c363e QQmlDelegateModelAttached: Make static properties statically known
We know that the attached properties for persistedItems and items always
exist, so we can add them statically to the attached property. That way,
it is possible to define them in a declarative way/assign bindings to
them.
We still need to insert the static properties in the
QQmlDelegateModelItemMetaType, as not every code path accessing them
creates the attached object; see tst_qquickvisualdatamodel::insert,
especially the tests involving Package.

As a byproduct of this change, we now create a valid attached property
in more cases. However, the fact that the properties are only accessible
from the toplevel object of the delegate was never documented anywhere,
and we still should not create attached properties unless they are
explicitly requested.

[ChangeLog][QtQml.Models][DelegateModel] DelegateModel's attached
properties are now valid everywhere in its delegate, not only in the
toplevel object.

Note that this is impossible to achieve with the dynamically created
properties that get defined according to the groups values.

Task-number: QTBUG-86045
Change-Id: I55519b44973f4b50aa57fad418ec606dc4fe12be
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-10-13 14:03:41 +02:00
Mitch Curtis e310dadef7 Consolidate test helpers into private libraries
Previously each test would include and build sources from the shared
folder. Now we make those sources a library, build it once, then have
each test link to it instead.

We also take the opportunity to move some helpers that qtquickcontrols2
had added into the quicktestutils library where it makes sense, and
for the helpers that don't make sense to be there, move them into
quickcontrolstestutils.

We add the libraries to src/ so that they are internal modules built as
part of Qt, rather than tests. That way we can use them in a standalone
test outside of qtdeclarative.

Task-number: QTBUG-95621
Pick-to: 6.2
Change-Id: I0a2ab3976fdbff2e4414df7bdc0808f16453b80a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-09-13 21:17:04 +02:00
Volker Hilsheimer 4a77e2593f Mark overrides in tests, fix compiler warnings
Change-Id: If753558d911e50a73e351a93eed2e4df3e6592c7
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-04-01 10:14:16 +02:00
Volker Hilsheimer eac37255a8 Use QScopedPointer::reset to explicitly delete the object
Change-Id: I31371f2c535ace546b75e092308ab9ef59026458
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-03-29 17:22:06 +01:00
Andreas Buhr 7e029878c0 Fix some "can be marked override" warnings
Change-Id: I13da0d085901314950c4fa0afb5853e183652e67
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-02-23 16:50:07 +01:00
David Skoland 56bbdccbb9 Use metatype and remove unused variable
Change-Id: I709c6a74dc6a3eb0cdd3e94168921274f90df4a4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-11-18 10:15:17 +01:00
Ulf Hermann d7008c79d4 QQmlListProperty: Use qsizetype rather than int for sizes
[ChangeLog][QtQml] The QQmlListProperty callback functions use qsizetype
now as type for the size of a list. This is in line with the containers
that you might use to back the list.

Fixes: QTBUG-88269
Change-Id: Ia38403cb32f241e6c70e1a580dbeff1d6d694331
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-11-09 18:09:30 +01:00
David Faure c1d4fcb464 Fix misuses of the implicit QChar(int) constructor
None of these cases intended to end up calling it, which proves that
making it explicit (as will soon be the case) is a good idea.

Change-Id: Ie60e85b554df956fd19bf86517945feac9f44b32
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2020-11-07 11:13:11 +01:00
Mitch Curtis 31c892118c QQmlInfo: print ancestor of object if it has no QML engine
This results in the following message for objects without a QML engine:

QML AttachedObject (parent or ancestor of Attached): Binding loop
detected for property "a"

for this QML file, named AttachedObject.qml:

import QtQuick 2.0
import org.qtproject.Test 1.0

Item {
    Attached.a: Attached.a
}

This, in turn, allows the warning to be emitted via the
QQmlEngine::warnings signal, since QQmlEnginePrivate::warning() is now
passed a valid engine. This solves the awkward situation where a
binding loop warning can not be detected at all by auto tests involving
attached C++ objects (as message handlers do not receive these messages
either).

Pick-to: 5.15
Change-Id: I07589974207bd5448d22a6086a52b9230d23e298
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-07-27 14:43:48 +02:00
Ulf Hermann d51c007ecc Encapsulate QQmlContextData
This class is not a private detail of QQmlContext. And it is incredibly
hard to see who owns what in there. Let's add some civilization ...

We enforce refcounting for QQmlContextData across the code base, with
two exceptions:

1. QQmlContextPrivate may or may not own its QQmlContextData.
2. We may request a QQmlContextData owned by its parent QQmlContextData.

For these two cases we keep flags in QQmlContextData and when the
respective field (m_parent or m_publicContext) is reset, we release()
once.

Furthermore, QQmlContextData and QQmlGuardedContextData are moved to
their own files, in order to de-spaghettify qqmlcontext_p.h and
qqmlcontext.cpp.

When the QQmlEngine is deleted, any QQmlComponents drop their object
creators now, in order to release any context data held by those.
Before, the context data would be deleted, but the object creators would
retain the dangling pointer.

[ChangeLog][QML][Important Behavior Changes] QQmlContext::baseUrl() does
what the documentation says now: It prefers explicitly set baseUrls over
compilation unit URLs. Only if no baseUrl is set, the CU's URL is
returned. It used to prefer the CU's URL.

Change-Id: Ieeb5dcb07b45d891526191321386d5443b8f5738
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-03-23 12:00:33 +01:00
Ulf Hermann a2f7de70d6 QQmlDelegateModel: Read values from the correct object
If we have a proxyObject, we need to use that one for reading proxy
values. Otherwise the read operation will crash.

Fixes: QTBUG-80420
Change-Id: I88cd5499802bff1aea2e43da9ab61d6565ab7ede
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2019-12-03 10:03:52 +01:00
Ulf Hermann b7030c2efb QQmlDelegateModel: Use cache item's index for resolving delegates
The raw index doesn't take the filter group into account.

Fixes: QTBUG-78297
Change-Id: Ie6514c8acdc380fe3f8f267d02335afc357abd17
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Joshua GPBeta <studiocghibli@gmail.com>
2019-11-23 17:19:59 +01:00
Shawn Rutledge 2d9cf3ef0f When a DelegateModel delegate changes, refill the view
It looked a bit odd that the DelegateModel delegate property was not a
notifying property.  Adding the delegateChanged signal makes it easier
to update the view when this happens.  The previous approach of removing
all delegates and adding all new ones resulted in the view losing its
currentIndex and often scrolling to a different place.  It's also nice
to reduce the number of d-> indirections by adding the
QQuickItemViewPrivate::applyDelegateChange() function, so that we just
need one indirection to call it, and then it updates all the internal
stuff in one place.

Done-with: Frederik Gladhorn
Done-with: Joni Poikelin
Fixes: QTBUG-63477
Change-Id: I2d17fd11ff4a2fcb20968a7182dd2c403abb715a
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-10-09 18:58:18 +02:00
Ulf Hermann 325e6305b4 Move model types into their own library
The model types are not part of the core QML runtime and should only be
loaded if you explicitly import them. We cannot enforce that in Qt5 as
some of them are available from the QtQml import, but we can change it
in Qt6.

Change-Id: I1e49e84d748e352537ec2d4af901c034c91d038f
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
2019-05-02 09:26:04 +00:00
Ulf Hermann dbc811e164 DelegateModel: Zero foreign context objects when they are deleted
If we keep plain pointers to objects we don't own, we need to zero them
when something else deletes them.

Fixes: QTBUG-73733
Change-Id: Ib4f3e144f10f70ab6cf44af4ffa62725470d3972
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2019-02-14 08:01:28 +00:00
Shawn Rutledge b22cb209e7 Replace obsolete VisualDataModel, *Group and VisualItemModel in tests
VisualDataModel, VisualDataGroup, and VisualItemModel
are replaced with DelegateModel, DelegateModelGroup, and ObjectModel
respectively (since 7cad0e52c5).

git grep -l 'VisualDataModel' | xargs sed -i 's/VisualDataModel/DelegateModel/g'
git grep -l 'VisualDataGroup' | xargs sed -i 's/VisualDataGroup/DelegateModelGroup/g'
git grep -l 'VisualItemModel' | xargs sed -i 's/VisualItemModel/ObjectModel/g'

Change-Id: Ie91b37b204f08a5d1f1f38594fb22ed70a6e2080
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-10-05 21:58:05 +00:00
Richard Moe Gustavsen cadae7a431 QQmlAdaptorModel: prepare js list models for recycling support
This patch will enable delegate item recycling for js list models.
So if you e.g set "model: [1, 2, 3, 4]" on a TableView, the delegates
can be recycled.

The patch will override the notify function. This function is called from
QQmlDelegateModel whenever the modelData that the delegate item
depends on, changes. This again is needed to trigger all the modelData
bindings in the item to update.

Note that this function will only be used for recycling items. The model
classes don't listen for changes done to js list models, meaning that
the function will otherwise never be called (which is why it was never
implemented, I guess).

Auto testing this will be included with the patches that implements
delegate recycling for TableView.

Change-Id: I49185bdbaaacc3ccbd94c99cc66d9a1998452f68
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-07-30 13:10:02 +00:00
Shawn Rutledge 499ec43937 use nullptr consistently (clang-tidy)
From now on we prefer nullptr instead of 0 to clarify cases where
we are assigning or testing a pointer rather than a numeric zero.

Also, replaced cases where 0 was passed as Qt::KeyboardModifiers
with Qt::NoModifier (clang-tidy replaced them with nullptr, which
waas wrong, so it was just as well to make the tests more readable
rather than to revert those lines).

Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-02-26 07:13:18 +00:00
Ulf Hermann 65606ea155 Remove double indirection between QJSEngine and QV4::ExecutionEngine
As QJSEngine's handle() method is internal, we can redefine it to return
a pointer to an ExecutionEngine. That makes many things easier.

Change-Id: Ie3df99e0bad5f00ad4fe73182896cd135fa82994
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-02-02 09:37:40 +00:00
Richard Moe Gustavsen 60d589ccdd QQmlIntanceModel: use QQmlIncubator::IncubationMode instead of bool to specify incubation mode
The current implementation would pass a boolean to signal if asynchronous
or synchronous incubation should be used to create an item. The problem with this approach
is that passing 'synchronous" would translate to QQmlIncubation::AsynchronousIfNested
later down the chain. This meant that even if the caller requested synchronous incubation, it
could end up with asynchronous incubation anyway, e.g if an async parent incubator was active at
the time of the call. And this can easily come as an unhandled supprise for the caller, and as
such, cause unforseen bugs.

This patch is a first of a set of patches that is done to fix the bug reported in the task below.
It will not change any behavior, it is written to preserve the logic exactly as it were, just
as a preparation for subsequent patches. It makes it explicit at the call location what
incubation mode will be used, and especially make it clear whenever the AsynchronousIfNested
flag is in play.

Task-number: QTBUG-61537
Change-Id: I8b3ba5438ebb2cd59983a098bd8ceeeb844da87b
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-11-30 07:35:35 +00:00
Liang Qi 345226aa3e Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: Ib45654e3e79087da4754377f0d78b70c44ed4695
2016-09-16 23:21:16 +02:00
Martin Jones 2a7bfd6b37 Destroy an incubating delegate if it is removed before incubation completes
Removing an item from a model after its delegate has started incubation,
but before it has completed results is an orphaned item.

Task-number: QTBUG-55901
Change-Id: I3d3136dc05a950ca38d53687ae7d38a6d0c7ec35
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
2016-09-15 00:00:20 +00:00
Jani Heikkinen 38ec3bd755 Updated license headers
From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some
exceptions, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/

Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one
(in those files which will be under GPL 3 with exceptions)

Change-Id: I04760a0801837cfc516d1c7c02d4f503f6bb70b6
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-20 11:46:25 +00:00
Friedemann Kleint 06f11da5e1 Tests: Remove QT_DISABLE_DEPRECATED_BEFORE=0 for simple cases.
Fix usage of API that is marked deprecated.

Change-Id: Ia887437f99b9ce207891ca19bc49294acb7d629d
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-09-02 04:19:22 +00:00
Friedemann Kleint e6846850a5 tests/quick: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).
- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer).
- Replace Q[TRY]_VERIFY(smartPointer == 0)  by
          Q[TRY]_VERIFY(smartPointer.isNull()).
- Replace Q[TRY]_VERIFY(a == b) by  Q[TRY]_COMPARE(a, b) and
  add casts where necessary. The values will then be logged
  should a test fail.

Change-Id: Ib9f4c2486af23c47990be4b9e004b965de226dcc
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
2015-07-27 18:45:21 +00:00
Jani Heikkinen c5796292ad Update copyright headers
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.

Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9
Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
2015-02-12 10:28:11 +00:00
Jani Heikkinen e7ceacda70 Update license headers and add new licenses
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3 & LICENSE.GPLv2
- Removed LICENSE.GPL

Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-08-25 11:28:46 +02:00
Alan Alpert 53e3174686 No longer apply pending changes when accessing ItemView properties
Applying changes in the getters can lead to binding loops, and is
currently inconsistently applied. Removing the applyPendingChanges calls
from remaining getters, and adding a forceLayout() function for cases
where the immediate-apply behavior is needed.

Task-number:  QTBUG-30555
Parts-of-patch-by: Albert Astals Cid
Change-Id: I64632601e02f2a53060296ab7739577a749d916f
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
2013-04-26 21:17:42 +02:00
Alan Alpert 700910d938 Add QtQml.Models module
The moved Model classes can now be exposed in a QtQml import.

To keep the QtQml import resticted to more core functionality, they are
being exposed in a plugin module.

Change-Id: I0a84642a72c7c9bbf9b6ffd2a6c33549f8e61c29
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-03-12 23:25:48 +01:00
Alan Alpert 7cad0e52c5 Move the model classes from QtQuick to QtQml
This is needed for proper support of non-GUI instantiators in QtQml.
Only private C++ classes are affected. Aside from name changes, model
classes now operate on QObjects instead of QQuickItems, leading to minor
changes in the implementation of QtQuick classes using them.

The old QML type names will still be registered in the QtQuick import
for the forseeable future, but pointing to the new classes. The new QML
types will be added in a second commit.

Classes Affected:
QQuickVisualDataGroup -> QQmlDataGroup
QQuickVisualDataModel -> QQmlDelegateModel
QQuickVisualItemModel -> QQmlObjectModel
QQuickVisualModel -> QQmlInstanceModel
QQuickChangeSet -> QQmlChangeSet
QQuickListAccessor -> QQmlListAccessor
QQuickListCompositor -> QQmlListCompositor
QQuickPackage -> QQuickPackage (just moved for now)

Change-Id: Ia19e630e53bfa9e5d459e289596cd11df1ea3930
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
2013-01-24 17:14:23 +01:00
Sergio Ahumada 83deab8d1b Update copyright year in Digia's license headers
Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76
Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-01-10 19:52:37 +01:00
Marco Bubke 3e9caba478 Change qml list interface
Change-Id: I185c6f4cef6105544504324c1616b5995c219fe3
Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
2012-10-23 13:24:54 +02:00
Alan Alpert f21e9ba6ef Remove interim compatibility measures
Also update some variables in qtdeclarative which failed to update
rootItem->contentItem.

Change-Id: Id34e29546a22a74a7ae2ad90ee3a8def6fc541d3
Reviewed-by: Alan Alpert <416365416c@gmail.com>
2012-10-16 07:24:06 +02:00
Iikka Eklund 46010aa7a2 Change copyrights from Nokia to Digia
Change copyrights and license headers from Nokia to Digia

Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-09-23 08:22:24 +02:00
Andrew den Exter 19e14d8e2a Fix assert when a VisualDataModels context has been invalidated.
Verify the context is valid before attempting to access its engine. The
context should normally be valid but there is a small window between
a delegate item being released and the DeferredDelete event being
processed when it is not.

Task-number: QTBUG-26949
Change-Id: I79f3affaed8904cbe0974476010b68305666cd29
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-08-24 02:52:30 +02:00
Andrew den Exter 2fe0f03d4d Add tests for writing to model role properties.
Change-Id: I91375e9caecc130fb3a86f5a48d19e000fa6fcac
Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
2012-08-02 02:43:54 +02:00
Andrew den Exter 46c5c25723 Test the VisualDataModel hasModelChildren property
Change-Id: I9ea71ca5c7d6a0f161cc92583c187d591d26826a
Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
2012-08-02 02:43:48 +02:00
Andrew den Exter 8b04007bf0 Add tests for VisualDataModel watched roles.
Change-Id: Idc84d0f833fe2ec4ed29bbda62def17ec20a3a8b
Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
2012-08-02 02:43:43 +02:00