summaryrefslogtreecommitdiffstats
path: root/src/gui/util
Commit message (Collapse)AuthorAgeFilesLines
* Fix gui build without feature.regularexpressionTasuku Suzuki2019-05-221-2/+7
| | | | | | | | | | | Change-Id: Id27fc81af8d2b0355b186540f41d75a9c8d7c7f3 Reviewed-by: David Faure <david.faure@kdab.com>
* Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-05-072-30/+208
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.cpp src/corelib/kernel/qvariant.h src/corelib/tools/qlist.h Done-With: Milian Wolff <milian.wolff@kdab.com> Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io> Change-Id: I6803f7239aa137a51a7467fab7cc7a01302a848d
| * Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-05-032-30/+208
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/pcre2/qt_attribution.json Change-Id: Ibae941cb12662f27bd6962ee02bc235971c59a15
| | * Only generate temporaries when it makes sensePaul Lemire2019-05-022-30/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Never for global inputs - Otherwise only if the temporary is referenced more than once -> meaning it's actually caching the result of some operation Tests updated accordingly. Change-Id: Ic76615370d23dee3965ca6350d5257a8be5a3e22 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-04-244-4/+104
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/util/qshaderformat.cpp src/gui/util/qshaderformat_p.h src/widgets/graphicsview/qgraphicsitem_p.h Change-Id: Idafd88eb9a0a15b4af29f6143d009c1ec8ceecca
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-04-164-4/+104
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qlocale.qdoc tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Done-with: Edward Welbourne <edward.welbourne@qt.io> Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io> Change-Id: I88e0757b2d020f0a244714c87844631df4b3fd13
| | * QShaderGenerator: don't generate temporary variables for global inputsPaul Lemire2019-04-101-2/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | Up until now, the QShaderGenerator would create temporary variables for uniform, attributes, const. This change makes it use the global inputs directly rather than relying on the intermediate properties. Change-Id: Ia9497367d61e536969fe87536606f309c286dbb2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * QShaderGenerator: fix substitution for attributes on GL2/ES2Paul Lemire2019-04-104-2/+44
| | | | | | | | | | | | | | | | | | | | | | | | GL2/ES2 expect it to be attribute and not in like later versions of OpenGL. Task-number: QTBUG-74829 Change-Id: Iddd22386ed315d6e6843d8225e49a4b73b6ad9ba Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-04-114-133/+137
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/styles/qstyle_p.h Change-Id: I0e6e856bd6628da1135b3ba674dddffabbeb5c09
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-104-133/+137
| |\| | | | | | | | | | Change-Id: I44eda44bf424fdcffab048a2534905d6162e5559
| | * QShaderGenerator: stop abusing from auto everywherePaul Lemire2019-04-094-133/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | Leads to a huge loss of context for people trying to understand and maintain that code. Replacing with proper types to ensure better readability and maintenance. Change-Id: I9900b743e8b7fe11bcc7db9ce3191c89f8718afc Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | Replace Q_DECL_NOEXCEPT with noexcept in QtGuiAllan Sandfeld Jensen2019-04-0512-85/+85
| | | | | | | | | | | | | | | Change-Id: I43803b88fea8083782d73ce157c466b022208740 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | More nullptr usage in headersKevin Funk2019-03-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Diff generated by running clang-tidy's modernize-use-nullptr checker on the CMake-based Qt version. Skipping src/3rdparty, examples/, tests/ Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Add Q_ENUM for QValidator::StateAlexander Akulich2019-03-041-0/+1
|/ / | | | | | | | | | | | | | | Besides to the usual value for debug output, this is wanted for some declarative API. Change-Id: I6c35cad96b6a6f33a7c90e8a254bfe0075e391ee Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | 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>