summaryrefslogtreecommitdiff
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Remove remains of qmake conversion from CMakeLists.txt filesFriedemann Kleint2023-02-105-17/+0
| | | | | | | Pick-to: 6.5 Change-Id: I8720313b2bc9cf9312a1f1a3d40171e1b2c8a257 Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-235-5/+5
| | | | | | | Task-number: QTBUG-105718 Change-Id: Ica4da2b513a5c8f58b9f955e5cdabb92bbf5f48a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-075-0/+15
| | | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: Ic3d0ab6a3e3a32ce0bab59074242c0e17c6965dd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-136-228/+12
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: Ie5a75414af5fda27f5b5f527f3543b088b674677 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* SVG Image reading: Reject oversize svgs as corruptEirik Aavitsland2021-11-081-0/+2
| | | | | | | | | | Add an upper limit for height and width at 0xffff, same as jpeg. Fixes: QTBUG-95891 Pick-to: 6.2 5.15 5.12 Change-Id: I0dbc80dab3aab9b4743548772fb63fa69ea21f8a Reviewed-by: Robert Löhning <robert.loehning@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* CMake: Use renamed qt6_add_plugin PLUGIN_TYPE optionAlexandru Croitor2021-08-102-2/+2
| | | | | | | Task-number: QTBUG-95170 Pick-to: 6.2 Change-Id: I8f384971cadd07732310541e1e7edfaa158adf89 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* CMake: Don't give plugins PUBLIC usage requirementsJoerg Bornemann2021-07-062-2/+2
| | | | | | | | | | | | | | | | | | | | The pro2cmake.py conversion script faithfully reproduced the .pro files for the plugins, which specified the libraries as public. But in CMake, the implications of this are that public usage requirements should then be propagated to consumers. We don't expect any consumers, since a plugin is created as a MODULE library in CMake, so for Windows we don't even have an import library to link with. The only exception to this is for static builds where plugins are created as STATIC libraries instead, but only in certain controlled situations do we then link to plugins. Even then, usage requirements are not expected to propagate to the consumers, so these relationships should always be specified as private. Pick-to: 6.2 Task-number: QTBUG-90819 Change-Id: Ifa2d76d6bff7b29d746455aa070a77cbd06879f0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Use checked image allocation in image readerEirik Aavitsland2021-06-081-7/+4
| | | | | | | | | Utilize imageIO's common QImage creation function that implements QImageReader's allocation limit that was introduced in Qt 6. Pick-to: 6.1 Change-Id: Ie273bd874d18aeba30fd6b37d91aa72bd3725cd0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix build without features.mimetypeTasuku Suzuki2021-04-151-2/+4
| | | | | Change-Id: I0438c040837dddc80453826b423822679f94774c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Make image handler accept UTF-16/UTF-32 encoded SVGsEirik Aavitsland2021-04-081-15/+22
| | | | | | | | | The canRead() header checks assumed 8 bit encoding. Pick-to: 6.1 6.0 5.15 Fixes: QTBUG-90744 Change-Id: Ibe934fe9ed31b89ee0fbfc4562aa66ab1b359225 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove QMake project filesJoerg Bornemann2021-02-115-34/+0
| | | | | | | | | | This includes removal of the corresponding .prev_CMakeLists.txt files. Pick-to: 6.1 Task-number: QTBUG-88742 Change-Id: I99eb79f677b4fff3f3336371d91c841de5198ffc Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Allow loading SVG files with a doctype declarationNicolas Fella2020-10-211-4/+4
| | | | | | | | | | | | | | | SVGs may have a DOCTYPE declaration (https://www.w3.org/TR/2003/REC-SVGMobile-20030114/) in their first line. This patch makes sure those SVGs are loaded properly Fixes: QTBUG-87583 Pick-to: 5.15 5.12 Change-Id: Ia3dcb519b6ee2b498dc81ef496764d99ea6c4a9a Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Regenerate projects before API changeAlexandru Croitor2020-09-222-2/+2
| | | | | | | Task-number: QTBUG-86815 Change-Id: I2b5975cc1995518f1995955d9b655ab26e764ad0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Port from devicePixelRatioF() to devicePixelRatio()Morten Johan Sørvig2020-09-141-1/+1
| | | | | Change-Id: I25e779c7a668cf9f2fb2b2c56c5d8bccba138153 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* CMake: Regenerate some of projects to be up-to-dateAlexandru Croitor2020-03-063-1/+9
| | | | | Change-Id: I7d490ab372a169de653f6be9702123ddd647c04c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devSimon Hausmann2020-03-052-10/+0
|\ | | | | | | Change-Id: I4bbe7513984fe00c90e5fa897c9eebab61d1dc5e
| * Remove overridden QSvgIOHandler::name()Shawn Rutledge2020-03-032-10/+0
| | | | | | | | | | | | | | | | We will remove the virtual base class function in Qt 6. For now, name() returns format(). Change-Id: Iee5bd4194d23178b3d8b602950cc5c01d097d44b Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Regenerate qtsvgwip/cmakeAlexandru Croitor2020-02-122-9/+8
| | | | | | | | | | | | Change-Id: I6f444b939e14263a5f9f4ac7fdfcd0f45ccaa453 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-02-121-3/+2
|\ \ | |/ | | | | Change-Id: I35cfe1a52ec4a02dccc0895e3b4a40bd2ffe7295
| * Avoid initializing QFlags with 0 or nullptrFriedemann Kleint2019-11-251-3/+2
| | | | | | | | | | | | | | It is being deprecated. Change-Id: Ia8306d3874dc21d431fcb621e1f487f55b2bed8d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Regenerate projectsAlexandru Croitor2019-11-152-8/+2
| | | | | | | | | | | | Change-Id: Ie5198bc76688e40170a8b0a401435f97898bb818 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-08-154-13/+26
|\ \ | |/ | | | | Change-Id: I886cfdcd8bd124a02c54f23b694799610f60d7bd
| * Fix compilation with disabled deprecated APIsSona Kurazyan2019-07-092-2/+4
| | | | | | | | | | | | | | | | | | | | The QImageIOHandler::name() has been deprecated since 5.13, but its overrides weren't. Enabled compilation of the overrides only when the QImageIOHandler::name() is compiled. Task-number: QTBUG-76491 Change-Id: Ida625f19d61081cfd50ae11ab50cf7829aef80a5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-06-171-1/+1
|\ \ | |/ | | | | Change-Id: Icb0da709c1cb8d2bdc2f33edfe656b7821cb148a
| * Fix deprecation warningsv5.13.0-alpha1Friedemann Kleint2019-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix: qsvgiconengine.cpp: In member function ‘virtual QPixmap QSvgIconEngine::pixmap(const QSize&, QIcon::Mode, QIcon::State)’: qsvgiconengine.cpp:200:38: warning: ‘static bool QPixmapCache::find(const QString&, QPixmap&)’ is deprecated: Use bool find(const QString &, QPixmap *) instead [-Wdeprecated-declarations] tst_qsvgrenderer.cpp:479:54: warning: ‘const QMatrix& QPainter::worldMatrix() const’ is deprecated: Use worldTransform() instead [-Wdeprecated-declarations] ... glwidget.cpp: In member function ‘void GLWidget::draw()’: glwidget.cpp:231:41: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] glwidget.cpp:232:41: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] fluidlauncher.cpp:71:65: warning: ‘const QRect QDesktopWidget::screenGeometry(int) const’ is deprecated: Use QGuiApplication::screens() [-Wdeprecated-declarations] Change-Id: Iae20d950c3118d05f91202c8020dbd81fa73b48f Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | cmake: Initial CMake build system supportKevin Funk2019-05-035-0/+43
|/ | | | | | | | Task-number: QTBUG-74135 Done-With: Alexandru Croitor <alexandru.croitor@qt.io> Done-With: Liang Qi <liang.qi@qt.io> Change-Id: I81fdc3d06f53e78182352214ef4687924dfc6fb6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Make svg icons work as pixmap iconsThorbjørn Martsum2018-06-111-25/+70
| | | | | | | | | | | | | | | | This patch makes the svg icon code similar to the code for pixmap icons. We only style the code if we fetch a different mode (+it is not normal) and we try to find icons in same order as the pixmap icons. [ChangeLog][][QIcon/QSvgIconEngine] Made SVG icons behave like pixmap icons: An explicitly-set disabled icon is no longer additionally grayed out. Task-number: QTBUG-67452 Change-Id: I94b4146bae2e9d924a96b602bf23909bd7f0e934 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Morten Kristensen <msk@nullpointer.dk> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* SVG image handler: catch and warn about QImage allocation failureEirik Aavitsland2018-05-221-1/+6
| | | | | | | | | | | QImage allocation failure, typically because of out-of-range dimensions, was not immediately caught and reported. This could lead confusing error messages as QPainter would render on a null image. Task-number: QTBUG-68229 Change-Id: If99033244728f1cea635691c6a93564976962f09 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* svgiconengine: Fix isNull() for deserialized iconsPalo Kisa2018-01-101-1/+1
| | | | | | | | | | | | | | | In 4a9470e55ce08752501868c60762268fdf2c44af there was introduced specific isNull() implementation for QSvgIconEngine. But the existing check was not sufficient for the scenarios where the QIcon is constructed by deserialization from QDataStream (from previously serialized valid svg QIcon). We also need to check the svgBuffers as the previously serialized svgFiles are silently ignored by QSvgIconEngine::read(). Change-Id: Id64ce233baead053c8b5ca61f1d416e46a8c6088 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Merge remote-tracking branch 'origin/5.9' into devv5.10.0-beta3v5.10.0-beta2v5.10.0-beta1v5.10.0-alpha1Liang Qi2017-08-151-1/+2
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I1ebd40264cf1afaf5bcbf8b2f272e153f51a5625
| * Do not reallocate memory for QImageAllan Sandfeld Jensen2017-06-201-1/+2
| | | | | | | | | | | | | | | | | | | | If the QImage given to read() already has the right size and depth, we don't need to allocate a new image. This is consistent with other image decoders and why a QImage is provided to the method in the first place. Change-Id: I4944211d4a8d4f19d000cace4a48df505d375f52 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-211-1/+1
|\ \ | |/ | | | | Change-Id: I855627bf0387be820d97bbc0226fed07fd1db64a
| * Merge remote-tracking branch 'origin/5.8' into 5.9v5.9.0-beta4v5.9.0-beta3Liang Qi2017-04-181-1/+1
| |\ | | | | | | | | | Change-Id: I4b41cae71f5a5f734a7e3bb8b95130b0cb35e0ac
| | * QSvgIconEngine: Paint correct size if device pixel ratio is fractional5.8Błażej Szczygieł2017-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Use method which returns qreal. It is available since Qt 5.6. Task-number: QTBUG-59729 Change-Id: Ifc1a101c8dd837597c35ce14f0314218d2882501 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Implement QIcon::isNull support for QtSVG IconsDavid Edmundson2017-04-042-0/+9
|/ / | | | | | | | | | | | | | | | | | | | | | | This was via a virtual hook in QIconEngine in Qt 5.7 This is especially useful for the SVG icon loader which returns no availableSizes which means we currently have no way to tell if an icon was loaded or not. Change-Id: Ic14971f94213fb2309f29bd0daa0a1c387d4da3c Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Use defaultSize according to svg standard in svg pluginLars Schmertmann2017-01-041-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | The viewBox attribute defines the svg internal coordinate system. If no width/height is set, the viewBox size is the right choice for defaultSize. Otherwise the standard prescribes that the specified height/width must be used. The old behavior ignored the width and height attributes, and this caused a lot of problems in qml. If the viewBox was very small the result was a low resolution image. If the viewBox was very large, loading took ages and the result used much more memory than needed. Both situations could be avoided by setting sourceSize. But when using the same image several times, the sourceSize must be set every time to the same value, otherwise the image cache would not work. It is cheaper to have the same high-quality source image in the cache, and scale it down when required. With the new behavior it is possible to control the default image size directly in the svg file at one place while it is still possible to set different sourceSizes if needed. Task-number: QTBUG-44863 Change-Id: I9c2fc7c122a29ebcf288b7cbd12427e081d404d5 Reviewed-by: André Klitzing <aklitzing@gmail.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-269-37/+50
|\ | | | | | | Change-Id: I43247261a4dc8badc4ad4f4d2137cdbd499f29db
| * Merge remote-tracking branch 'origin/5.6' into 5.75.7Liang Qi2016-11-247-3/+32
| |\ | | | | | | | | | Change-Id: Ibcca419da389fc7538ee050de7c59e8b400e1978
| | * Use separate metadata files for plugins if QT_NO_COMPRESS is definedAlexander Volkov2016-11-105-0/+16
| | | | | | | | | | | | | | | | | | | | | Change-Id: Ib15aa96c2ed84cf3ce9793385476f9fb3cacec8c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * Imageformat plugin: Add mime type "image/svg+xml-compressed"Alexander Volkov2016-11-101-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: I3cf5d9b6d6212128adab4682de33b192672f7c1f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * Ignore .svgz images unless compression is enabledAlexander Volkov2016-10-272-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | The imageformats plugin was trying to pass them off to QSvgRenderer, which can't handle them when QT_NO_COMPRESS is defined. Change-Id: I92241370d8fd4ed2328fb13a01306fa8a7e5ef6e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * | Remove unused methods from plugin classes5.7.1Alexander Volkov2016-11-112-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | Remove QIconEnginePlugin::keys() and QImageIOPlugin::keys(): they are not overriders since Qt 5.0. Change-Id: I9127b5b72c9c37b450c6f0d0095e47b8d5454322 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * | Add missing 'override' keyword to pluginsAlexander Volkov2016-11-114-18/+18
| | | | | | | | | | | | | | | | | | | | | Change-Id: I423b8531434d221880410cb3b40f10e6061769ff Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Fix checking for feature 'imageformatplugin' in pluginsFriedemann Kleint2016-11-241-2/+2
|/ / | | | | | | | | | | | | | | Fix warning: qtsvg/src/plugins/plugins.pro:3: Cannot find feature qfeatures Change-Id: I0484aa2b1b217f1e22dc91a5d346bfeade175ab4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7v5.7.1Liang Qi2016-09-171-1/+1
|\ \ | |/ | | | | Change-Id: I7680d625bf0afec0bfd16a97c6656aab426f39a7
| * Fix UB (signed overflow) in QSvgIconEnginePrivate::pmcKey()Marc Mutz2016-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by UBsan: qsvgiconengine.cpp:64:84: runtime error: left shift of 537133056 by 4 places cannot be represented in type 'int' Fix by casting to qint64 at the start of the shift-or chain. The total cumulative shift is by 28 places, so 64 bits should be enough to not overflow anymore. Change-Id: Ia37bc98c5af67a4de10fb9807addd369110f36d2 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QSvgIconEngine::addFile(): Use QMimeDatabase to determine file typeFriedemann Kleint2016-08-301-18/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | Introduce an enumeration to describe the file type and use QMimeDatbase to determine the type. This will detect SVG files also in the case resource aliases without suffixes are used. As a drive by, do not pass compressed SVG files to QPixmap when QT_NO_COMPRESS is defined, as this likely results in garbage. Task-number: QTBUG-55388 Change-Id: Ib8bafca60e9238412a5c7edf560d487e512b8fd0 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7v5.7.0-rc1Liang Qi2016-05-191-2/+7
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I55408b98072be007247bca4fa61f1a62ce32e7ca
| * Fix QSvgIconEngine fallback to try icon with same state firstJoni Poikelin2016-05-121-2/+7
| | | | | | | | | | | | | | | | | | | | If icon is not explicitly set, QSvgIconEngine always took Normal Off icon. Task-number: QTBUG-53328 Change-Id: I404206b0244d0009f7be1f520c2e84c0b7cd3e71 Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-072-10/+10
|\ \ | |/ | | | | Change-Id: I690e64f28de8d7a7768213f89858d3c19246fa08