summaryrefslogtreecommitdiffstats
path: root/src/gui/util
Commit message (Collapse)AuthorAgeFilesLines
* QTextureFileReader: add support for astc format filesEirik Aavitsland2019-02-274-3/+249
| | | | | | | The standard astc encoder has its own file format. Change-Id: I9a2f7b1fa20ba344b79637bafb50ff2bd0596747 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-02-088-7/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/templates/AndroidManifest.xml src/network/ssl/qsslsocket_mac.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/corelib/kernel/qtimer/BLACKLIST tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp tests/auto/testlib/selftests/expected_blacklisted.lightxml tests/auto/testlib/selftests/expected_blacklisted.tap tests/auto/testlib/selftests/expected_blacklisted.teamcity tests/auto/testlib/selftests/expected_blacklisted.txt tests/auto/testlib/selftests/expected_blacklisted.xml tests/auto/testlib/selftests/expected_blacklisted.xunitxml tests/auto/testlib/selftests/expected_float.tap tests/auto/testlib/selftests/expected_float.teamcity tests/auto/testlib/selftests/expected_float.txt tests/auto/testlib/selftests/expected_float.xunitxml Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Done-With: Edward Welbourne <edward.welbourne@qt.io> Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: If93cc432a56ae3ac1b6533d0028e4dc497415a52
| * Include relevant example code in documentation of setUrlHandlerVolker Hilsheimer2019-02-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | By only looking at the function prototype, it's tempting to assume that the handler needs to be registered with the usual SLOT macro. That is not the case. The code snippet is already included in the class description, but it doesn't hurt to repeat it here. Change-Id: If24fdca41a4bd976ebd1156c9e1106469388265c Fixes: QTBUG-50484 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * QtGui: Unify license headersKai Koehne2019-01-297-7/+7
| | | | | | | | | | Change-Id: I0a2553b95b099fdfa83d42e71bdf9a192a6588c7 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | Gui: Q_GADGET is missing in qlayoutpolicy_p.hTobias Hunger2018-10-311-0/+1
|/ | | | | Change-Id: I1244c507da7e4afeb16093112f52b191fd16fb0d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: Move literal code block to a separate fileCristian Maureira-Fredes2018-10-151-24/+4
| | | | | | | | | | | We need to override this snippet for the documentation we generate for Qt for Python, and it is easier to have it on a separate file. Task-number: PYSIDE-801 Task-number: PYSIDE-691 Change-Id: Ideb5b6af25024279f167137d3b65660bb9c96a7e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Texture file support: add mipmap reading to ktx handlerv5.12.0-alpha1Eirik Aavitsland2018-09-121-10/+20
| | | | | Change-Id: Ic2c10b3e64d63d2272a8a3922d2b3f99dfd45bdb Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Graph loader can load prototypes stored in the graphJuan Jose Casafranca2018-09-083-2/+22
| | | | | | Change-Id: Ib0bbfe5b0257bf355e83cc5287fa52b1e0cc3ed6 Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Implement exact match expression builder for QRegularExpressionSamuel Gaist2018-08-191-1/+1
| | | | | | | | | | | | | | | | | QRegularExpression doesn't offer a direct equivalent of QRegExp's exact match. There are several places in the Qt sources that use this feature. This patch implements a small helper function that builds the expression as recommended in the documentation and updates the related code. [ChangeLog][Core][Tools] QRegularExpression now provides anchoredPattern() which is a helper function to build regular expressions used for exact matching. Change-Id: Idbbf142c4c5cb9b62abf8229f4ce85fd4409e5d0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix potential out of bounds read in qpkmhandlerEirik Aavitsland2018-08-061-1/+1
| | | | | | | Off-by-one bug in the validity test of the texture type field. Change-Id: I46ded85a0ad93166aa886e71f0c391f27e79f64f Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* QTextureFileData: Fix build with -no-openglJüri Valdmann2018-08-061-0/+1
| | | | | | | Need to include <QSize> for operator<<(QDebug, const QSize &). Change-Id: I4857e9b43918243af66cc09ff352619595c081c9 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Make local symbols of some leaked namesThiago Macieira2018-08-031-1/+1
| | | | | | | | | Unnamed namespaces and static are great tools. Use them. Change-Id: Ie01831ddac5446fdbdeefffd15468b3acb3ced79 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add API for reading and decoding graphical texture filesEirik Aavitsland2018-07-2410-2/+1137
| | | | | | | | | | | | | | Add a framework for reading and decoding stored graphical texture file formats. Includes decoders for the PKM and KTX formats. This is basically the same texture file reading that was added to qtdeclarative for 5.11, but has been refactored to be independent of the scenegraph and opengl. Task-number: QTBUG-67026 Change-Id: I87d8117550d8a2112f4f58c03e9ac6b3249cbc5a Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* iOS: Document how to handle URL requests from external applicationsTor Arne Vestbø2018-07-091-0/+22
| | | | | Change-Id: Ideeb0b06b6c7fc792e2102eb71296e99f3023842 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QIntValidator: Intermediate for number if digits equal or less than maxTuomas Heimonen2018-06-291-4/+14
| | | | | | | | | | | | | | Input value which is over the highest acceptable value, but consisting of a number of digits equal to or less than the max value should be considered intermediate. [ChangeLog][QtGui][QIntValidator] Input value with over the highest acceptable value, but with equal or less amount of digits than the maximum value is now considered intermediate. Task-number: QTBUG-59650 Change-Id: I71a77c9c266f0f3b62c71ac6cb995019385c1cf5 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* QDoubleValidator: Allow intermediate values as close as possible to one ↵Andy Shaw2018-04-171-5/+13
| | | | | | | | | | | | | | | | | | considered invalid The documentation states that if you have a range of 0.00-2.00 with the number of decimals set to 2 then any number up to 9.99 would be considered intermediate. This is because the number of digits still matches both before and after the decimal point. If it is 10.0 or 9.999 then it is still considered invalid. In the case of 9.999 being invalid in this case, the documentation is corrected as this was incorrectly indicated as Intermediate, as the code indicates it as Invalid. Change-Id: I07b433e856f355916a1240deafdf4ef58e680639 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Enable BuiltIn input in the shader graph builderJuan Jose Casafranca2018-04-102-0/+5
| | | | | | | | BuiltIn inputs shouldnt be translated into a code input. We comment the input line for this variables Change-Id: I3b7d2fd06afc6a122d90a999fc5a5246fc93234e Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Pass on local html links with a fragment to openUrl()Andy Shaw2018-04-061-2/+5
| | | | | | | | | | | | If a file link to a html file has a fragment part included then this will be lost when passed to QDesktopServices::openUrl() as this is not kept in the conversion of the QUrl. So by checking the filename in the case of a fragment existing in the url, we can be sure that the information is passed on correctly for html files. Task-number: QTBUG-14460 Change-Id: I8167d8c164713dd999603ba9e74150f4f1a4abea Reviewed-by: David Faure <david.faure@kdab.com>
* Modernize the "regularexpression" featureUlf Hermann2018-03-202-5/+7
| | | | | | | | | | | | | Use QT_CONFIG(regularexpression), disentangle it from QT_BOOTSTRAPPED, switch it off in the bootstrap build, remove the #ifdefs from qregularexpression.{h|cpp}, and add QT_REQUIRE_CONFIG(regularexpression) to the header. qregularexpression.{h|cpp} are already correctly excluded in tools.pri if !qtConfig(regularexpression). Change-Id: I21de154a6a118b76f99003d3acb72ac1e220d302 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-022-8/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf sc/corelib/io/qfsfileengine_p.h src/corelib/io/qstorageinfo_unix.cpp src/platformsupport/eglconvenience/qeglpbuffer_p.h src/platformsupport/input/libinput/qlibinputkeyboard.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/ios/qiosscreen.h src/plugins/platforms/ios/qioswindow.h src/plugins/platforms/ios/quiview.mm src/printsupport/dialogs/qpagesetupdialog_unix_p.h src/printsupport/dialogs/qprintpreviewdialog.cpp src/printsupport/widgets/qcupsjobwidget_p.h src/widgets/widgets/qmenu.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
| * Fix shader graph metatypes for static buildsLaszlo Agocs2017-11-112-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | Cannot rely on Q_COREAPP_STARTUP_FUNCTION inside Qt since static builds have to be fully supported. Due to not registering those types, the shader builder silently generated incompilable shader code in static builds. This is critical especially on platforms where static builds are the only choice (INTEGRITY). Task-number: QTBUG-64365 Change-Id: I8820ded239ac160ab00c7fc34918fd3f273f0afb Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devAllan Sandfeld Jensen2017-10-242-3/+5
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsmousehandler.cpp src/plugins/platforms/xcb/qxcbimage.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/manual/qtabletevent/regular_widgets/main.cpp Done-with: Friedemann Kleint<Friedemann.Kleint@qt.io> Done-with: Mårten Nordheim<marten.nordheim@qt.io> Change-Id: I5b2499513a92c590ed0756f7d2e93c35a64b7f30
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-162-3/+5
| |\ | | | | | | | | | Change-Id: I3cf73c53cf131d0babfb558c2507bed0e0fc5f08
| | * Replace 'an unique' with 'a unique'Kai Koehne2017-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | Unique begins with a "y" sound, hence a unique is correct. Change-Id: I9eb6b4d4c9ddab45af931e97c041c24edf163eca Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| | * Prevent changing the width for layout item's rectMika Salmela2017-10-061-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For gridlayout items the x position is rounded, but the QRectF changes the width to keep the right edge. The width is yet calculated exactly for the text so we need to preserve it. Task-number: QTBUG-61244 Change-Id: I823ba742c9ab299740232b5d9b4ad5713e1782c4 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-171-0/+13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/fortuneclient/client.cpp examples/network/fortuneserver/server.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h src/plugins/platforms/cocoa/qcocoabackingstore.h src/plugins/platforms/cocoa/qcocoaintegration.h src/plugins/platforms/cocoa/qcocoascreen.h src/plugins/platforms/ios/qiosbackingstore.h src/plugins/sqldrivers/oci/qsql_oci.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Ia6dd2c52d4a691b671cf9a2ffca70deccece8f10
| * | Avoid using deprecated APIs on iOS 10.0+Lars Schmertmann2017-10-061-0/+13
| | | | | | | | | | | | | | | Change-Id: Ic9dc6a24ef793a29c2652ad37bc11120e2e6ceef Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-191-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-191-5/+5
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | GLSL 1.00 ES must be selected using "#version 100"Kevin Ottens2017-08-041-1/+1
| | | | | | | | | | | | | | | | I was mistaken before, the "es" part for that version isn't optional, it *must* be omitted. Change-Id: I9e83d2317523fb0a905e40b95a56033cf693b93b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Implement graph layers support in QShaderGeneratorKevin Ottens2017-08-022-5/+13
| | | | | | | | | | Change-Id: I823f7866bc5e1f3b262f1aacf4c341dabda7305d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add support for layers in QShaderGraphLoader formatKevin Ottens2017-08-021-0/+14
| | | | | | | | | | Change-Id: I5038600e73523ac7eb37a88ddff1f942af18f18e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Implement graph layers support in QShaderGraphKevin Ottens2017-08-022-8/+34
| | | | | | | | | | | | | | | | | | | | | | When creating the statements, it is now possible to pass a list of enabled layer names. Every node or edge which is not in the list of enabled layers will be pruned from the graph prior to traversal. Note that an empty layer list for a node or an edge means it is on all layers. Change-Id: I61a4df7d395b4beb42ee55ce08fef8ebe04263c9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add the layer concept to QShaderNode and QShaderGraph::EdgeKevin Ottens2017-08-023-0/+15
| | | | | | | | | | | | | | This will be used in further commits Change-Id: I49977f1ea482b97dc0a159f69a0d2eda3865ec44 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add support for QShaderLanguage enums in QShaderGeneratorKevin Ottens2017-08-021-5/+227
| | | | | | | | | | Change-Id: I93306d783309cda09fedae3713afde851df3e9a3 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Extend the parameter support in QShaderGraphLoader for richer typesKevin Ottens2017-08-021-1/+25
| | | | | | | | | | | | | | In particular, go through QMetaType/QMetaEnum to deal with enums. Change-Id: I2e847ba328eb46609b86b3dfd6c4dbf532d78b7d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Extend the parameter support in QShaderNodeLoader for richer typesKevin Ottens2017-08-021-1/+25
| | | | | | | | | | | | | | In particular, go through QMetaType/QMetaEnum to deal with enums. Change-Id: Idbe16c913c1d471a4a91d219f77876e498c192d9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | [Shader Graph Gen.] Introduce QShaderLanguageKevin Ottens2017-08-023-0/+221
| | | | | | | | | | | | | | | | This is a new namespace with helper enums to have richer parameters available to QShaderNode. Will be used in further commits. Change-Id: I9a61481c1e89ddd08327211e90eeabf0172c3b7a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add support for parameters in QShaderGeneratorKevin Ottens2017-07-081-2/+19
| | | | | | | | | | Change-Id: Iff8fec51ddbf9b018cb5ec3aff357125134013eb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add support for node parameters in QShaderGraphLoaderKevin Ottens2017-07-081-0/+9
| | | | | | | | | | | | | | | | Now the parameters from the prototypes are used as default values and the graph file can overload them. Change-Id: I9a8a73963c7e578bd0a34e96f76f147a12224f4f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add support for node parameters in QShaderNodesLoaderKevin Ottens2017-07-081-0/+8
| | | | | | | | | | | | | | | | This will allow to make the prototypes more extensible when referred to from a graph file while providing some sane defaults. Change-Id: I1ae10182427d8a7d29c51a64e19e99139494ea92 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add parameters to QShaderNodeKevin Ottens2017-07-082-0/+26
| | | | | | | | | | | | | | | | | | This will allow to create nodes having an entry point for tuning, still need to be exploited by the loaders and the shader generator. Coming in further commits. Change-Id: I8384b0f528c9919e9f8d35102adde2b307f08b80 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | [Shader Graph Gen.] Introduce QShaderNodesLoaderKevin Ottens2017-06-203-2/+341
| | | | | | | | | | | | | | | | | | This class allows to node definitions from a JSON representation. This will come in handy to ship preset prototypes for use with QShaderGraphLoader. Change-Id: I3f3b5d7852e17d484069b4814ee6e5910997c613 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | [Shader Graph Gen.] Introduce QShaderGraphLoaderKevin Ottens2017-06-203-0/+305
| | | | | | | | | | | | | | | | | | | | This class allows to load a shader graph from its JSON representation. To avoid duplicating the shader snippets inside of the JSON which would be a maintenance nightmare, we instead allow to register a set of node prototypes by their name and only refer to said names inside the JSON. Change-Id: I3e7b39e8b3c25f51f331a0a59dda883ac8e2bc57 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | [Shader Graph Gen.] Introduce QShaderGeneratorKevin Ottens2017-06-203-0/+181
| | | | | | | | | | | | | | This class is meant to generate code from shader graphs Change-Id: I1cf22352387f3f9f55e7589aa77a296689836911 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | [Shader Graph Gen.] Introduce QShaderGraph::StatementKevin Ottens2017-06-202-0/+170
| | | | | | | | | | | | | | | | This is our "byte code" representing a flattened graph. It will be used as input for the code generation. Change-Id: Ie02a60d07c035f3d16872e79931eb7cde168a8d1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | [Shader Graph Gen.] Introduce QShaderGraphKevin Ottens2017-06-203-0/+190
| | | | | | | | | | | | | | | | This allows to connect our nodes together via ports. This way user code can assemble a shader from simpler blocks. Change-Id: I168dcf4af6aa11ad47b68d91e5a55e96ca922678 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | [Shader Graph Gen.] Introduce QShaderNodeKevin Ottens2017-06-203-0/+262
| | | | | | | | | | | | | | | | Nodes will allow to describe inputs, outputs or value transformations in a shader graph. Change-Id: I44f806d9595fd0e68fc9026cda2b4fa0a62af283 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | [Shader Graph Gen.] Introduce QShaderNodePortKevin Ottens2017-06-203-2/+147
| | | | | | | | | | | | | | The ports will be used to connect nodes from our shader graphs. Change-Id: I9d4fbb1f7bd8320c4373ebb166a4fe13bd1482c9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | [Shader Graph Gen.] Introduce QShaderFormatKevin Ottens2017-06-203-2/+243
| | | | | | | | | | | | | | | | | | | | | | This is the first building block toward a node based generator for shader programs. QShaderFormat will be used by the other classes to qualify in which format the code snippets and includes used are. Change-Id: I11aefc6bb359832a853ed1b6bec302dc3516cfc4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>