| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't know in advance if a URL is part of the source code and should
be relative to the current element, or if it is part of the application
data and should not be touched.
[ChangeLog][QtQml][Important Behavior Changes] URLs are not resolved or
intercepted anymore when assigning them to a "url" property. Instead
they are resolved and possibly intercepted when used to access an actual
resource.
Fixes: QTBUG-76879
Change-Id: Iaa2385aff2c13aa71a12e57385d9afb5dc60a073
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
We may want to have, for example, a QQmlFileSelector and a
component-specific interceptor that chooses a theme or similar.
Also, make the API public. We want to propose this as alternative to
dynamically registering QML files via qmlRegisterType(QUrl, ...).
Change-Id: I4a535d3ea556da6710fde816579ec188b3f57099
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Adds a ColorSpace type mapped to QColorSpace, and adds a property to
Image nodes to read and change it, converting the image if necessary
on read.
Fixes: QTBUG-80616
Change-Id: Ie80c8bc045f66de01de3a5d2c4a9974f07d2871d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since we set sourceSize, we expect to use that coordinate system in
sourceClipRect too. Therefore we use QImageReader::setScaledClipRect(),
not setClipRect().
[ChangeLog][QtQuick][Image] Image now has a sourceClipRect property
to render a clipped image from a region of the sourceSize.
Change-Id: If08277df772c2ab1063dd88572e49de41b97bca4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
For vector image formats that could take a long time to render (such as
SVG and PDF), we need to be able to request smaller regions of the page.
The region needs to be specified in original units (i.e. points in a PDF
or pixels in an SVG).
Change-Id: I9c9eecb22d929f6e7b2636a2a44f50c8eea4c6b2
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
These two methods share a whole lot of duplicated logic, and already
show signs of divergence due to maintenance going to the one and
not the other.
This patch removes the duplication.
Change-Id: I6a83dd7f354a94547e44198ec679b323f2c5240e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AnimatedImage already had these properties, but some typically non-animated
image formats such as PDF, TIFF and ICO can also support multiple pages.
In either case, the currentFrame property can be used to select a specific
frame or page. However an AnimatedImage uses a QMovie to do that, whereas
a plain Image uses QQuickPixmap. So the accessors need to be virtual in
order to have these different implementations.
[ChangeLog][QtQuick][Image] Image and BorderImage now have currentFrame
and frameCount properties which can be used to step through the frames of
multi-page image formats such as TIFF, WEBP and ICO.
Task-number: QTBUG-77506
Change-Id: Id4d95a99a26a862957e44b1bd8ffe06d7eababef
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
|
|
|
|
|
|
|
|
| |
QQuickImageBasePrivate::updateDevicePixelRatio() assumes that only
SVG or an image provider can provide a scalable image. Now that PDF
will be supported, we can add it to the list.
Change-Id: I9a6df7c58cb9db0e8d4d159c138bedd481281d92
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
|
|
|
|
|
|
| |
Fixes: QTBUG-55027
Task-number: QTBUG-76879
Change-Id: Id0c7b33cf22827ebc984c4ee848ef4f63c359b20
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\
| |
| |
| | |
Change-Id: I71275a2076c3d32ee2896571be882067320a2e9e
|
| |
| |
| |
| |
| | |
Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
7568922fa240e6e9440e9c6e93bf8ec00c06ec17 already made this faster (by making it
not string-based, and used when it was required).
We can do one better after d870ea28656a2155c39a1aabefa1c56871a017e4, by
avoiding the connection altogether, and explicitly only updating when
the DPI changes.
This doesn't affect qmlbench performance a great deal AFAICT (presumably
because ItemSceneChange events don't just fall out of the sky); but it will help
when they do happen, and it will also no longer allocate memory (for the
connection).
Change-Id: I043f6e22565554cee9ce6346fa7feefadfff0c7a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QQuickImageBase currently sets its d->devicePixelRatio member in three
scenarios:
- The URL uses the image: scheme (an image provider)
- The URL is an svg/svgz
- The URL contains the "@2x" syntax
In all other cases, it sets d->devicePixelRatio to 1.0. QQuickIconImage
derives from QQuickImageBase, and can display theme icons in addition
to regular images. Theme icons have their own directory structure that
determines what is and is not a high DPI image:
https://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
In particular, they use e.g. a 22x22@2 directory to indicate that
the icons contained within it are high DPI images, as opposed to
storing that information in the file name.
To account for these images, QQuickIconImage must be able to affect
the decision making progress that determines whether or not an image
is loaded at a higher DPI. This patch adds a virtual function to
QQuickImageBasePrivate that allows subclasses to have some control over
this.
Change-Id: Id45e0580c8e2ea9a96a41c54ef5fa765ce5922cf
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that qmlInfo actually reports info messages, we want to change
existing callers to use warning-level messages to preserve the original
message level.
This was done through:
perl -p -i -e "s/qmlInfo\(/qmlWarning\(/" **/*.{cpp,h,qdoc}
.. with a little care taken to only add the hunks that should be changed.
Change-Id: I511cee11ce0a26ec1048cd2b84c7536b812a0d89
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
It also introduces a private QQuickImageProviderWithOptions to allow
passing options to image providers so that they can return more
fine-tuned images. This private class will disappear in Qt6 and the
functionality will be merged into QQuickImageProvider.
Change-Id: I619065d889d21d3a9e1f8e45fdb6076b9657c7ed
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
| |
For CoW types, prefer const methods to avoid needless detach()ing.
Change-Id: I270cdc6eb8c5946f5c20b379bbb7c60f0ba518eb
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/quick/items/qquickimagebase.cpp
src/imports/layouts/plugin.cpp
Change-Id: I5f48474df4034a1347ec74795c85d369a55b6b21
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Commit 834f9c76 accidentally inverted a validity
test by going from !isEmpty() to !isValid().
Change to isValid() which preserves the previous logic:
a set sourceSize is automatically scaled by the target
devicePixelRatio.
Verified with:
tests/manual/highdpi/imageprovider.qml
tests/manual/highdpi/svg.qml
Change-Id: Ie979d566418c365d4d7fc5e5c3e6a795a891db51
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|
| |
| |
| |
| |
| |
| |
| | |
... in string comparisons. It's more efficient.
Change-Id: I51b4f5dd79ddb8a448e59ebfc537b86b78730dfb
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|/
|
|
|
|
|
|
|
|
|
| |
From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new LGPL header instead of LGPL21 one
(in those files which will be under LGPL v3)
Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the qt_findAtNxFile function from QtGui.
Note: this changes the behavior slightly if the file name
contains '@2x' not at the end of the file name. We now check
that it contains '@2x.' including the dot.
Change-Id: I7e6a97d2d9c5aa0706538badf22a13e4c41824c0
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Where possible, use qEnvironmentVariableIsSet()/
qEnvironmentVariableIsEmpty() instead of checking on the
return value of qgetenv().
Where the value is required, add a check using one of
qEnvironmentVariableIsSet()/Empty().
Move QSGAtlasTexture::qsg_envInt() to qsgrenderer.cpp
for reuse as qt_sg_envInt() and add qt_sg_envFloat().
Change-Id: I4c93f16c228d4f537154f389a0fa1427654485f7
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
src/quickwidgets/qquickwidget.cpp
Change-Id: I3e2326bc86a9d3adaafbe3830b75ce9afa81c45b
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When moving a Qt Quick application containing Image delegates in a view
(e.g. ListView, GridView, etc.) between multiple screens, it's possible
that the amount of visible delegates changes due to potential
differences in the screens' sizes.
For example, moving an application using the Window + left/right arrow
keys on Windows causes the window to snap to the side of the screen.
If one screen is smaller than the other, moving the application back
and forth in this manner will cause some delegates to be destroyed, as
they are no longer visible in the smaller screen.
However, between receiving the Component.destruction signal in QML and
being actually destroyed in C++, the Images may try to reload their
pixmaps (when the cache property is set to false, for example). Since
the views had (correctly) already hidden those delegates and hence
they had no associated QQmlEngine, the load() function would crash
because of the assumption that there was a valid engine.
This patch checks that there is a valid QQmlEngine with which to load
pixmaps before doing so.
Change-Id: I8a3f0ec5220fddfd79758985c1eb2b55b0baae47
Task-number: QTBUG-45991
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This copies less data, which is faster. Increases creation/delegates_image from
560 ops/frame to 600 ops/frame for me.
Change-Id: I9c230bb9fa82fd631020881fb741857285589bca
Suggested-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
src/qml/qml/qqmlengine.cpp
src/quick/items/qquickitemsmodule.cpp
tools/qml/main.cpp
Change-Id: Ida8daf6b4d7e675385f2f5514c446e52dedaf136
|
| |
| |
| |
| |
| |
| |
| |
| | |
Setting up the signal leads to a significant memory and performance
overhead. This patch improves the benchmark by almost 10%.
Change-Id: Ib0a76ba42fdce1ca707044a8f8b6bdc6405f20c3
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This avoids the penalty of creating a QFile along with a private, engine, etc
when we're going to do nothing with it. This raises the delegates_image creation
benchmark from ~450 to ~500 per frame for me.)
Change-Id: I7665a55a3ee23102325f5d5f330967743b0c8538
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
* Don't convert QUrl to QString twice (that massively blows up transient
allocations and is very slow)
* Don't do anything at all if a sourceSize isn't set (checking it is super
cheap)
This fixes the performance regression (introduced in 428b92583ee2102c7ef16776a9b7785df7ff4e2c)
in the delegates_image creation benchmark (from ~520 up to ~540 items per frame).
Change-Id: I1cd350e42e763b7a771ff207d23e3e411810b268
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the user relies on the Image implicitSize to do the layout
but still sets sourceSize to the image, the sourceSize might
be (0, 0) instead of (-1, -1).
readImage checks that the size is > 0 to use the requestedSize
and this would cause us not to use the requestedSize, but still
divide by the devicePixelRatio in QQuickImageBase::pixmapChange,
which would give a different implicitSize on retina display.
Make sure that we get the same implicitSize on both by only
keeping the targetDevicePixelRatio if sourceSize is > (0, 0)
like readImage does.
Task-number: QTBUG-38991
Change-Id: Ib93f57efa47d096f88883845985b44f62db4ad74
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds the option to follow EXIF orientation. This was previuosly
automatically applied to TIFF images, but not JPEGs except in
Qt 5.4.1.
[ChangeLog][Image] An autoTransform property has been added to
control whether metadata image transforms such as EXIF orientation
are automatically applied. By default it enabled for TIFF images
and disabled for JPEG.
Change-Id: I8a4cf204985b2a7d158a0e046e52db7cda970d20
Task-number: QTBUG-37946
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
LICENSE.GPLv2
examples/qml/networkaccessmanagerfactory/view.qml
src/qml/jsruntime/qv4runtime.cpp
src/qml/jsruntime/qv4stringobject.cpp
Change-Id: I5d12f436d60995e51d5c2f59d364e9cbc24f8e32
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When using images in QRC and giving the 1x and 2x image files
respective aliases but without any file extension
(for example 'myimage' and 'myimage@2x'),
then Image would fail to find the 2x variant.
Task-number: QTBUG-44049
Change-Id: I20d0cb2eb48b909775b0ba737b850bc1b6697b35
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
types/qqmlmodelindexvaluetype.cpp: In static member function 'static QString QQmlModelIndexValueType::propertiesString(const QModelIndex&)':
types/qqmlmodelindexvaluetype.cpp:47:56: warning: 'QString::QString(const char*)' is deprecated (declared at qstring.h:649) [-Wdeprecated-declarations]
items/qquickimagebase.cpp: In member function 'virtual void QQuickImageBase::load()':
items/qquickimagebase.cpp:213:49: warning: 'QString::QString(const char*)' is deprecated (declared at qstring.h:649) [-Wdeprecated-declarations]
items/qquickimagebase.cpp:213:88: warning: 'QString::QString(const char*)' is deprecated (declared at qstring.h:649) [-Wdeprecated-declarations]
Change-Id: I03266aba589ade8228bc286cd3f3f237cd06a780
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Scale sourceSize by the target devicePixelRatio before
passing it to the providers.
Task-number: QTBUG-38127
Task-number: QTBUG-38991
Change-Id: I1746e0859b4e63eb0d28d1a1c8aac610b68a9eb9
Reviewed-by: Jocelyn Turcotte <jturcotte@woboq.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
|
|/
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
String-based connect is relatively slow, and should be avoided in core
items. This improves performance of the
tst_librarymetrics_performance::instantiation_cached(043) image - empty
test case (approximately halving the time).
Task-number: QTBUG-43096
Change-Id: I02485c515435eceacc95c55f877fc8566e7406d7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having a retina and non-retina screen connected resulted in getting
no output from QQuickRenderControl and QQuickWidget on the
non-retina screen.
This is caused by the fact that Quick is blindly calling
QWindow::devicePixelRatio(). This approach is wrong when using
QQuickRenderControl since the QQuickWindow does not have an actual
native window and so devicePixelRatio() merely returns some default value
which will definitely be wrong for one of the screens.
The patch fixes the problem by introducing
QQuickWindow::effectiveDevicePixelRatio(), which, via
QQuickRenderControl::renderWindowFor, supports the redirected case too.
Task-number: QTBUG-42114
Change-Id: I057e01f0a00758dde438fc9b10af3a435b06bb0b
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a QGuiApplication is destructing, a screen change occurs causing
QQuickImageBase to reload images ultimately resulting in "QPixmap: Must
construct a QGuiApplication before a QPixmap". This patch fixes the
issue (except for systems which multiple screens, which is a separate
issue).
Task-number: QTBUG-40539
Change-Id: I4bafc9790741204e90190a4491ac7a9393d0d0a7
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are cases where @2x images are in use but
where you don't want the associated behavior:
- You are implementing an image editor
- You are inheriting a resource set which has @2x
images, but don't want that behavior with Qt.
Add support for disabling @2x behavior with QT_HIGHDPI_DISABLE_2X_IMAGE_LOADING.
Change-Id: Ia570dfe556e0571a19e5ebdc626c4a7e626721b9
Task-id: QTBUG-38485
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
|
|
|
|
|
|
|
|
| |
items\qquickimagebase.cpp(322) : warning C4996: 'QString::QString': was declared deprecated
items\qquickimagebase.cpp(342) : warning C4996: 'QString::QString': was declared deprecated
Change-Id: I550a13680d54ef2c3734151f56ea56ac8b9f3b9b
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make QQuickBaseImage::load() load "@2x" image files
on high-dpi displays. Reload images on screen change
in order to load the correct version depending on
screen dpi. Modify QQuickImageBase::updatePaintNode()
to work with @2x images.
QQuickBaseImage::load() now looks at the target
window's devicePixelRatio and checks for the presence
of a "@2x" file on disk. If found the @2x version
will be used.
Unlike QPixmap, QQuickPixmap has no special knowledge
of "@2x" files. They pixmap system will be asked to
load "@2x" files and will cache them and report the
(device) pixel size, like any other pixmap.
Add auto-test and manual test.
Task-number: QTBUG-32862, QTBUG-33069
Change-Id: I1f57a10075e499f6eee61df5421e1986521c6ab0
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
|
|
|
|
|
| |
Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: If2fa95d9715a55d3f07ecf5f232e4f4b9a44a6fb
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
|
|
|
|
|
|
| |
Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76
Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
If the QDeclarativePixmap on a previously valid Image is cleared, and the
scenegraph updates before the networked pixmap request returns, the
scenegraph can crash when trying to paint a now invalid texture.
Task-number: QTBUG-27795
Change-Id: I83436f846a3e965b324ff6ebf057708fe8c3b82a
Reviewed-by: Alan Alpert <aalpert@rim.com>
|
|
|
|
|
|
|
| |
Change copyrights and license headers from Nokia to Digia
Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
StatusChanged signals are now always emitted.
Other properties only emit when altered.
AnimatedImage local and remote loading was also unified in this fix.
BorderImage duplicated loading code is streamlined.
Task-number: QTBUG-26405
Change-Id: Ib412d5879e0007229a8098e1fa960003051508de
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The only case where this really did anything was in resetSourceSize() to avoid
resetting if it had not been set already, but this logic is already in
setSourceSize too, so it's really not useful.
Done-with: John Brooks <john.brooks@dereferenced.net>
Change-Id: Idb86686ea5ab711ceb2390e3703e0e04f7d537bb
Reviewed-by: John Brooks <john.brooks@dereferenced.net>
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
|