Commit Graph

48 Commits

Author SHA1 Message Date
Yuhang Zhao e7c1fec763 Move Settings out of Qt.labs module
Move Settings from the Qt.labs module to the QtCore module.
And deprecate the original one in Qt.labs.

Also changed the fileName(QString) property to location(QUrl)
to better fit the Qt API.

Adjust the tests accordingly.

Task-number: QTBUG-92806
Change-Id: I1cbad1315383a9f2963583fd4d00cf3612f99f1e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-09-29 21:31:17 +08: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
Tasuku Suzuki 771b31c235 Replace paintedWidth/Height with contentWidth/Height
They were renamed in 51b7425329

Pick-to: 6.2 6.3
Task-number: QTBUG-15160
Change-Id: If30f69d47adf391d2d1c795caaf2bbe15f6bc32a
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-03-27 21:38:57 +00:00
Ivan Solovev 31f7b6222d Update elements test application to use new XmlListModel
As far as I can see, this application is not used anywhere.
But this patch at least makes it valid, so that someone could
theoretically use it.
However the example is simplified, because the new XmlListModel
does not provide the features that were previousl used there.

Task-number: QTBUG-89817
Change-Id: I0c5d724cf4807eb9596829331c10796579716c54
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-03-18 21:18:54 +01:00
Fabian Kosmale 6eb35df60e QML engine: Deprecate DefaultMethod
Assigning objects to signal handlers can be convenient, as seen in the
examples which use it together with ListView.onRemove.
However, that convenience makes it hard to reason about what actually
happens. Moreover, the only user of that functionality are the Animation
classes, and the usage of DefaultMethod is not documented anywhere.

[ChangeLog][QtQml] Assigning an object to a signal handler is deprecated.
Instead, create the object, give it an id, and call the desired slot
from the signal handler. For instance, instead of of
ListView.onRemove: SequentialAnimation {...}
use
SequentialAnimation {id: removeAnimation; ...}
ListView.onRemove: removeAnimation.start()
A warning will be printed whenever an assignment of an object to a
signal handler occurs. The warning can be controlled via the
qt.qml.defaultmethod logging category.

Change-Id: I001ddf4d7933871977f84a5e012d020fb043cc64
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-12-03 21:12:42 +01:00
Lars Knoll 7230005ef6 Remove QRegExpValidator usages
This also means the RegExpValidator QML type will be gone. Use
QRegularExpressionValidator instead.

[ChangeLog][QtQuick][RegExpValidator] The RegExpValidator QML type has
been removed. Use RegularExpressionValidator instead.

Change-Id: If25fc5a258a669dfd28e705271757caa252ce05c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-03-18 16:02:36 +01: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
Kai Koehne ea6cd0de3c Fix outdated BSD license header
Change-Id: Icc08925454445fc9497fb3bfd2c26efe90605983
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2017-10-17 11:18:11 +00:00
J-P Nurmi efa2250738 Deprecate Text::doLayout() in favor of forceLayout()
Item views and positioners all have now forceLayout(), so make the
Text element API consistent with them. The old doLayout(), which
sounds more like an internal helper method, is deprecated and marked
for removal in Qt 6.

[ChangeLog][QtQuick][Text] Deprecated doLayout() in favor of
forceLayout().

Change-Id: I051988fca13c4cd84904f7b268d51f6a96f28af3
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
2017-01-14 05:02:57 +00:00
Liang Qi 68ba8fe3cc Merge remote-tracking branch 'origin/5.6' into 5.7
This change also fixes the build of two benchmarks, tst_affectors
and tst_emission.

Conflicts:
	src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro
	src/qml/qml/ftw/qhashfield_p.h
	tests/benchmarks/particles/affectors/tst_affectors.cpp
	tests/benchmarks/particles/emission/tst_emission.cpp
	tests/benchmarks/qml/pointers/pointers.pro
	tests/benchmarks/qml/pointers/tst_pointers.cpp
	tests/benchmarks/qml/qmltime/qmltime.pro
	tests/benchmarks/qml/qquickwindow/qquickwindow.pro

Change-Id: I595309d1e183c18371cb9b07af6e4681059de3b2
2016-04-08 13:03:25 +02:00
Edward Welbourne 7d7e28ce11 Purge sRGB chunks from PNG in tests.
Subjects each *.png file that matched grep -law "sRGB" to:
pngcrush -ow -brute -rem allb -reduce

Various tools grumble about sRGB tables in PNG images; and our
handling of them doesn't pay attention to these, so purging them
makes the images smaller with no loss to the images.

Change-Id: I9e4dc3aec97cd32bc8ac216fadeaf7669c49647c
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2016-03-29 12:04:02 +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
Frederik Gladhorn 8d5a2f2a81 Merge remote-tracking branch 'origin/5.4' into 5.5
Change-Id: I4c338a44c1d64c2d8e637971ab3ec6982c40a685
2015-03-17 09:48:36 +01:00
Sergio Ahumada 65516b7f6c Doc: Replace qt-project.org/doc with doc.qt.io
Change-Id: Ib693ac8d48ab943a3c26a49ab4fca91f0c5f0b0e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-03-05 07:07:28 +00:00
Jani Heikkinen 20c207815a Fixed license headers
Change-Id: I4d5640ff95e1361ec7e65fb3e87d7726d8185ff5
Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
2015-02-17 13:33:18 +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
Alex Blasche 2a0d1cc379 Change Qt bugtracker URL to qt.io
Change-Id: I3dde034b2a36c324df9f4e1fd2e05a07a7237c04
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2014-12-16 11:35:55 +01: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
J-P Nurmi ce5dff18b9 ListView: add support for "pull back" header & footer
[ChangeLog][QtQuick][ListView] Introduced headerPositioning and
footerPositioning properties to control whether header and footer
are positioned inline, as overlays, or so that they slide away and
can be pulled back regardless of the content position.

Change-Id: Ifef1faf1ce6acf2b55cd1b6408e22ec2de841409
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-08-08 00:25:49 +02:00
Kai Koehne 38eb0bef31 Remove references of QML as a 'declarative' language
Though the core of QML is declarative, it incorporates JavaScript, a
multi-paradigm language on its own. It's therefore correct to call it
a multi-paradigm language, too.

Change-Id: Ia72acedafefb68ea8c49b9f6ab195ca9e73dad5f
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-05-07 08:38:36 +02:00
Friedemann Kleint b27461dcdf Replace qt.nokia.com by www.qt-project.org in tests.
Task-number: QTBUG-32390

Change-Id: If318cf9bbcaa36e6e60d693dd0cb9a58768af47b
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-07-15 15:40:43 +02:00
Sze Howe Koh 20d33b96ac Doc: Replace some references to Nokia
Link to internal QDoc pages, or to qt-project.org

Change-Id: I5d9adae711213873ab57ccfc5bb2d8f74cf5689b
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-24 19:26:37 +02:00
Sze Howe Koh 59f075df52 Doc: Qt Quick: Fix module name format (Pt 1/2)
Follow the conventions at
http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation

Attempt to differentiate between the whole module ("Qt Quick") and the
QML import ("QtQuick") by encoding the latter with monospace font. There
are places in the text where both representations are valid.

Change-Id: Id6e157a4191aaa4e23a9cd5c76abfe902fe43d33
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-23 18:29:25 +02:00
J-P Nurmi 70ce4ec6ae Add TextEdit::selectByKeyboard
The main use case is for enabling text selection by keyboard
for read-only editors.

Change-Id: Ieaa9af366fd0eaf863a104a2fdf33c9ddad38b10
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-03-15 17:59:34 +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
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
Alan Alpert 5df94d8903 Rename speed -> velocity in the particle system
Matches the convention set in the QtQuick module, for example by
ListView and Flickable.

Change-Id: I8df57ed1ced8128723d790c30c00cc1b2062787d
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-06-29 02:21:36 +02:00
Damian Jansen bd9962711e Update system tests
A few items have changed, namely:
SpriteImage property names
XmlListModel is separated from QtQuick
A fixed bug in ParticleSystem

Change-Id: Iec8fb1c6ad0a76deb6b0733caf3b893e0da0627e
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2012-06-01 03:26:06 +02:00
Damian Jansen f7e3a33cb8 Clean up visuals of elements test
Elements were not being displayed correctly on small screens,
i.e. devices. Should anchor these to the bottom, rather than center.
Also fix layout element child positions, as opacity is not used to
determine placement - use visible property instead.

Change-Id: I9fff7e64f3f03f1a4d60a242fb8f95629da6f7c9
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2012-05-30 06:01:49 +02:00
Alan Alpert 2f36e1bc94 End the deprecation period of SpriteImage
Also remove the stale files left around.

Change-Id: I2f275f23ebfb65045cc683ccd542cbc451b767fb
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-05-14 05:36:33 +02:00
Damian Jansen 73dffd7b38 AnimatedSprite system tests
Basic sprite tests to validate frame rate and source changes

Change-Id: I0279e89c55a4b5da5a0ee00a40c53ede1e27390a
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2012-05-14 03:03:41 +02:00
Damian Jansen 6b516a8305 Basic system tests for ListView sections
Change-Id: I3f33aa77a4bbe87a832066bd1f527521dfa543ff
Reviewed-by: Natalia Shubina <natalia.shubina@nokia.com>
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-03-26 02:55:20 +02:00
Damian Jansen dd952a25aa ListView system tests
Tests:
Change of model, delegate and orientation at runtime
Use of add, move and remove view transitions
Changing of view transitions at runtime

Task-number: QTBUG-21504
Change-Id: Icaeb5c0305c7db5db4c4b8c5ad5fd1d6393cc599
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-03-21 08:04:33 +01:00
Sergio Ahumada a9f1cdd64b Change bugreports.qt.nokia.com -> bugreports.qt-project.org
Change-Id: Icafc7b49e7c42368fe10939b8a134632276c0671
Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
2012-03-05 05:38:16 +01:00
Matthew Vogt b855240b78 Rename QDeclarative symbols to QQuick and QQml
Symbols beginning with QDeclarative are already exported
by the quick1 module.

Users can apply the bin/rename-qtdeclarative-symbols.sh
script to modify client code using the previous names of the
renamed symbols.

Task-number: QTBUG-23737
Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-24 04:51:31 +01:00
Andrew den Exter 5b9e19ff59 Add support for resizing fonts to fit Text dimensions.
This adds a mode where if the content of a Text item doesn't fit
within its bounds the font size is reduced during layout until it
does or a minimum font size is reached.

Task-number: QTBUG-22832
Change-Id: I6198ef03899e2f21b32e313548966ef4b0e3bff1
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
2012-02-06 04:13:08 +01:00
Jason McDonald 45b14259fc Remove "All rights reserved" line from license headers.
As in the past, to avoid rewriting various autotests that contain
line-number information, an extra blank line has been inserted at the
end of the license text to ensure that this commit does not change the
total number of lines in the license header.

Change-Id: If39bd256b0fa85eba17ea30f8ab87ea27d758908
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-30 23:52:43 +01:00
Jason McDonald e6b224aa28 Update obsolete contact address.
Replace Nokia contact email address with Qt Project website.

Change-Id: I6a730abc0c396fb545a48b2d6938abedac2e3f1c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2012-01-23 06:28:53 +01:00
Jason McDonald da0839735c Update copyright year in license headers.
Change-Id: I0a8d99909cac867dce72da70b1bbcb649989a51b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-05 09:12:53 +01:00
Andrew den Exter 59e607a2ce Add wrapMode and verticalAlignment properties to TextInput.
Wrap mode provides an alternative to horizontal scrolling when the width
of the text exceeds the width of the TextInput. With auto scroll
wrapping introdoces an implicit verticalAlignment so support setting it
explicitly as well.

Task-number: QTBUG-22305
Task-number: QTBUG-16203
Change-Id: I1bd3a5335edb3ac48df3d5ccd8ae7274caa91883
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-12-20 07:33:37 +01:00
Damian Jansen 2c19fa1a57 System test for TextEdit
Basic tests for the QtQuick TextEdit element

Change-Id: I532a6b4d3d433ac853248780ee9a6ac03c2f7275
Reviewed-by: Natalia Shubina <natalia.shubina@nokia.com>
Reviewed-by: Daniel Kovacic <daniel.kovacic@nokia.com>
2011-10-31 06:58:08 +01:00
Damian Jansen c5ad9fda81 TextInput system tests
Basic tests for the TextInput element

Change-Id: I0531044fa7f901dcd80a10d39b537688926ac03f
Reviewed-by: Daniel Kovacic <daniel.kovacic@nokia.com>
Reviewed-by: Natalia Shubina <natalia.shubina@nokia.com>
2011-10-28 03:04:29 +02:00
Damian Jansen f57967aa84 Text system tests
Basic tests for the QtQuick Text element

Change-Id: I25156055867d9fd4aa6b0b1bad789444894b7960
Reviewed-by: Daniel Kovacic <daniel.kovacic@nokia.com>
Reviewed-by: Natalia Shubina <natalia.shubina@nokia.com>
2011-10-28 03:04:20 +02:00
Alan Alpert 6e6cc55e66 Add state changing properties to QQuickSpriteImage
Also adds a manual test for them.

Change-Id: I5f7effe43f5784eccf7221f2bd72da480792bf89
Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
2011-10-26 09:01:28 +02:00
Yann Bodson 6fcaca378b Improvements to text layouting in QML
Allow more control over the text layouting process in QML.

Give access to every text line through a hook, this gives the
opportunity to position and resize a line as it is being laid out.
It is then possible to lay out the text in columns or around other
objects.

Task-number: QTBUG-21367
Change-Id: I56dc0c1c4b575dc06360c135098024d0324d3656
Reviewed-on: http://codereview.qt-project.org/5351
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
Sanity-Review: Yann Bodson <yann.bodson@nokia.com>
2011-10-12 00:24:34 +02:00
Damian Jansen fac7ee6085 Add Particles basic acceptance manual tests.
Change-Id: I9be3f3257d74e6a3535f8137083e5dad31965c87
Reviewed-on: http://codereview.qt-project.org/5906
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2011-10-06 10:44:27 +02:00
Jason McDonald 26489b1ea3 Fix missing/outdated license headers.
Change-Id: I381398b0c4f80db689a59797e2faeab5b14503eb
Reviewed-on: http://codereview.qt-project.org/5491
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-26 08:22:02 +02:00
Damian Jansen b0539f0ed9 QtQuick 2.0 elements system test
Added an application to browse elements. A very basic acceptance
test method that each can be performed in under a minute.
Added the .qtt for formal usage.
Also moved qsgimage system test.

Change-Id: Iada9804e2efe1339a072935647962e54aa3b4c6f
Reviewed-on: http://codereview.qt-project.org/4380
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2011-09-19 04:32:55 +02:00