summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Don't ignore alpha values in grabFramebuffer methodsAllan Sandfeld Jensen2018-08-031-2/+4
| | | | | | | | | Returns an ARGB32_Premultiplied image when the framebuffer is grabbed on a transparent QOpenGLWidget or QOpenGLWindow. Task-number: QTBUG-55245 Change-Id: I4b7778ecc38275be1ed9fb748c77c7e1f6b65a00 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Handle screen changes for non-top-level windowsTor Arne Vestbø2018-08-033-6/+6
| | | | | | | | | The platform may emit screen changes for child windows before top-level windows, so we need to update the top level screen as soon as possible. Change-Id: I090c620725c9c3171f5b038708d78ddfeec8512d Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Merge "Merge branch '5.11' into dev" into refs/staging/devEdward Welbourne2018-07-318-10/+16
|\
| * Merge branch '5.11' into devEdward Welbourne2018-07-318-10/+16
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakebuiltins.cpp src/plugins/platforms/windows/qwindowstabletsupport.h src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp Done-With: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I000b0eb3cea2a5c7a99b95732bfdd41507cf916e
| | * Doc: Remove typo and add line breaks after \internalPaul Wicking2018-07-262-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | In an unrelated change, it seems \internal \obsolete can cause unexpected behavior when generating the documentation. Adding this line break should fix that. Change-Id: I95eceb109faaf89be8f258fba8c31008fdc4ca57 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| | * Replace 0 with nullptrAlbert Astals Cid2018-07-195-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | So if people are using the -Wzero-as-null-pointer-constant don't get a warning when using these private QPA includes Change-Id: I6deb089b17a844680db24998d60c94de7a1227b1 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
| | * Fix incorrect warning message in QOpenGLBufferTakumi ASAKI2018-07-171-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: I932aa10814049e78da35ea12b7552bf676545c89 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Add debug logging operator for QPlatformSurfaceTor Arne Vestbø2018-07-313-0/+37
| | | | | | | | | | | | | | | Change-Id: I2adecf87fa058bf973f4e4eed0a4c002f8359728 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | testlib: Fix qtguiglobal.h include in qtestsupport_gui.hTor Arne Vestbø2018-07-311-1/+1
| | | | | | | | | | | | | | | Change-Id: I7aeb881821bdf501efb9616250911d7b3cc58300 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | QTextDocumentFragment: Use logical cursor movement instead of visualSafa AlFulaij2018-07-311-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Using QTextCursor::Left and QTextCursor::Right moves the cursor visually to right or left, which does not work with Right to left text, where moving left means advancing to the next character, and vice versa. By using QTextCursor::PreviousCharacter and QTextCursor::NextCharacter we leave it up to the engine for deciding where to move depending on the context. Task-number: QTBUG-50619 Change-Id: Ibf0a886f3ff6bf9ca2c953aeff8c235612bbc01d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Fix tiling of NPOT textures on GL/ESAllan Sandfeld Jensen2018-07-273-25/+20
| | | | | | | | | | | | | | | | | | | | The emulation was not working since the vertices are clamped before getting to the fragment shader. So instead just resize the brush if not supported. Change-Id: I856e47890cd3021874b77d869a6ff7162cadde10 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Fixup GL_RGB10 FBO on OpenGL/ES3Allan Sandfeld Jensen2018-07-271-5/+10
| | | | | | | | | | | | | | | | Turns out on OpenGL ES, only the GL_RGB10_A2 form is allowed as a render buffer storage format. Change-Id: I42915b61835167ae457aae91da7e75065dd3eb21 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Move texture uploading out of QOpenGLTextureCacheAllan Sandfeld Jensen2018-07-278-211/+432
| | | | | | | | | | | | | | | | | | | | | | This way the logic can be reused elsewhere. At the same time a standard OpenGL ES/3 way of handling BGRA is added, so we don't depend on extensions, and handling of NPOT and max size which QSGTexture will need. Change-Id: I475bc7127f44be3964fdb482c9e86a20db1fbca5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Remove dead codeJesus Fernandez2018-07-271-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The ascending variable was a leftover from an old implementation. Now it's not needed anymore. It's safe to remove it, and the condition can be removed as well. Amends commit 699e8fe3a6724dd8288dd6a55b25e070eb198c9d Coverity-Id: 11004 Change-Id: I003b7016e9bd3bd523fb70ed4de84211ec840a78 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* | 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>
* | Give the QGradient presets ObjectMode coordinate mode by defaultEirik Aavitsland2018-07-241-2/+2
| | | | | | | | | | | | | | | | ObjectBoundingMode has inconsistent behavior and is deprecated in favor of ObjectMode. Change-Id: I748f6283f3db5869bb9a67c08bf5f16abc6f95b0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Remove transitioning include from qdnd_p.hJoerg Bornemann2018-07-231-4/+0
| | | | | | | | | | | | | | | | | | Now all files that use QInternalMimeData include qinternalmimedata_p.h, and we can remove the transitioning include from qdnd_p.h Change-Id: I6c86cb6a5bd73076e5dd3bafc01861b75ab83845 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-07-172-2/+2
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbintegration.cpp Conflicts git missed: src/plugins/platforms/qnx/qqnxglcontext.cpp Change-Id: I0582cdc9e66e43efe79038b9c43d4f9572ac88fc
| * Fix: png handler returning Mono QImage with color table < 2 itemsEirik Aavitsland2018-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | A bit depth 1 png image may contain a single color table item. The png handler would in such cases reduce the size of the QImage color table to 1, which could easily lead to crashes later on. Task-number: QTBUG-69256 Change-Id: I01d78977c121bacc44b823231d8f32ca63d8a98c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Fix the copyright year of the qgrayraster.c dependencyNicolas Ettlin2018-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | The copyright year of the qgrayraster.c dependency was incorrectly set to “2006-2015”, instead of 2000-2016 (as stated in the file’s header comments). This commit solves this issue. Task-number: QTBUG-69261 Change-Id: I307b6eabdd133fe4f8371b963577b59af8620838 Reviewed-by: hjk <hjk@qt.io>
* | configure: group tests' includes properlyOswald Buddenhagen2018-07-161-19/+36
| | | | | | | | | | | | | | | | | | this puts the actually relevant includes into the correct field, which potentially allows early header resolution, and is generally just cleaner. Change-Id: I9db870442d22a329441eafe53098d18cdc91ce16 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | testlib: Move qtestsystem helpers to their respective modulesTor Arne Vestbø2018-07-163-3/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | Having the helpers in each respective module lets us implement the helpers using private APIs without forcing the test to add private dependencies. It also makes it easier to test Qt using a third party testing framework (for running the test suite), while still using the helpers for ensuring tests behave expectedly. Change-Id: I2a6ce24526ed345f3513548f11da05c7804c203f Reviewed-by: Simon Hausmann <simon.hausmann@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>
* | SIMD: Add a haswell sub-architecture selection to our supportThiago Macieira2018-07-092-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the comment says, Haswell is a nice divider and is a good optimization target. I'm using -march=core-avx2 instead of -march=haswell because the latter form was only added to GCC 4.9 but we still support 4.7 and that has support for AVX2. This commit changes the AVX2-optimized code in QtGui to Haswell- optimized instead. That means, for example, that qdrawhelper_avx2.cpp can now use the FMA instructions. Change-Id: If025d476890745368955fffd153129c1716ba006 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add logging for QAccessibleCacheFrederik Gladhorn2018-07-081-0/+6
| | | | | | | | | | Change-Id: I2cbaf6c6dfb80b2b5c2732f1633da411fd816710 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Fix deletion of items in QAccessibleCacheFrederik Gladhorn2018-07-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Items in the cache may be part of the parent/child hierarchy. Make sure not to have dangling pointers in the cache, but rather cleanly remove all interfaces that get deleted since they may delete each other (TabBar deletes its child interfaces for example. Task-number: QTBUG-69283 Change-Id: Iad17cd1d3356804b3d8cbba8632ec22b836c3521 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Re-enable QGradient::Preset documentation by explicitly ignoring warningsTor Arne Vestbø2018-07-062-2/+3
| | | | | | | | | | | | Change-Id: Ibde6d905c74a571dc2e9d2942e99682e0a4f9b8c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-07-0213-54/+94
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_dragging.mm src/plugins/platforms/ios/qiosinputcontext.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/tools/androiddeployqt/main.cpp Was moved from qttools into qtbase in 5.11. So re-apply 32398e4d here. tests/auto/corelib/global/qlogging/test/test.pro tests/auto/corelib/global/qlogging/tst_qlogging.cpp tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp tests/auto/corelib/thread/qthreadstorage/test/test.pro tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qapplication/test/test.pro Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Done-with: Mårten Nordheim <marten.nordheim@qt.io> Done-with: Oliver Wolff <oliver.wolff@qt.io> Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
| * Fix: bad-looking scaled rendering of painterpath in OpenGL paint engineEirik Aavitsland2018-06-281-21/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For performance, the triangulation of a painter path is stored for reuse. Re-triangulation was only done if the path was to be painted at a significantly different scale AND it contained a curve (bezier) element. But also the triangulation of a path with only straight lines can lose precision if rendered at a small scale, and so look bad when used at a higher scale factor. Fix by removing the mentioned curve element condition. Task-number: QTBUG-68873 Change-Id: Id3492514e9382a5828377b7bafea8cfac7b850a6 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * ItemModels: Cache last-known child indexErik Verbruggen2018-06-272-11/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of caching the last index of a search for a child item, cache the index of the child in the child item. When the item model is not changed, the index is valid. Otherwise, the index can only change when items get inserted or removed before the child. So in that case, start searching in the vicinity of the previously known index. As an example: a selectAll() on the view will always hit the cached index, so no search is performed for any item in the model/view. Task-number: QTBUG-61368 Change-Id: I85d085299987237fae23451d9e8bbb6060464ef2 Reviewed-by: David Faure <david.faure@kdab.com>
| * ItemModels: search for the child index in 2 directionsErik Verbruggen2018-06-271-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the search for the index of a child was done by searching forwards (minus 2) from the last search, and subsequently backwards when it wasn't found. This would cause quite some searching in models with lots of items, and where the child lay before the last search. We still assume that subsequent searches for children are "nearby" the previous search, but instead of first searching forwards and then backwards, do the search in both directions. Task-number: QTBUG-61368 Change-Id: Idb549c2d02840632cd658f906816ce911f3ff8bc Reviewed-by: David Faure <david.faure@kdab.com>
| * Doc: Fix typoPaul Wicking2018-06-261-1/+1
| | | | | | | | | | | | Task-number: QTBUG-69093 Change-Id: Ica63482251b2a614a17a996fac9bcc16b96c200f Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * Fix the qHash implementation for QMatrix / QTransformGiuseppe D'Angelo2018-06-212-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The order of the arguments of QHashCombine::operator() was accidentally swapped -- the first is supposed to be the accumlated value, the second the new value to combine. [ChangeLog][QtGui][QMatrix] The qHash() implementation for QMatrix has been changed. [ChangeLog][QtGui][QTransform] The qHash() implementation for QTransform has been changed. Change-Id: Iba13f76ff734a2184c96184ee0e5748c05db07fa Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Doc: Add missing full stops in briefsPaul Wicking2018-06-215-5/+5
| | | | | | | | | | | | Task-number: QTBUG-68933 Change-Id: I3f2a9f8c562f9a44bb32bddd31d75abbfe6de04d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * Merge remote-tracking branch 'origin/5.11.1' into 5.11Qt Forward Merge Bot2018-06-191-3/+11
| |\ | | | | | | | | | Change-Id: I9a4571ccf826a86e055dfbba23b5e5cbd8ea55e8
| | * Merge 5.11 into 5.11.1Oswald Buddenhagen2018-06-075-11/+12
| | |\ | | | | | | | | | | | | Change-Id: I28f48e980a9e23ddde5251608dd9d1d83df65392
| | * | Ignore XDG_SESSION_TYPE=wayland on gnome-shellJohan Klokkhammer Helsing2018-06-051-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Wayland] In Qt 5.11.0, support for selecting a platform plugin based on the XDG_SESSION_TYPE environment variable was added. On gnome-shell, however, bugs—in both Qt and gnome-shell—made many widget applications almost unusable. So until those bugs are fixed XDG_SESSION_TYPE=wayland is now ignored on gnome-shell. Task-number: QTBUG-68619 Change-Id: I902acd1c4fc996f46e8431c12c0a5cdbab883abf Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Fix black border around main widget with non-integer scalingAllan Sandfeld Jensen2018-06-071-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | All the other highdpi scaling uses rounding, and not using it here may offset the compositing by a line. Task-number: QTBUG-67994 Change-Id: I2f5f328c091d0e85c40b1663e22c82f364df65e5 Reviewed-by: Morten Johan Sørvig <morten.sorvig@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>
* | | Tracepoints: refactor the existing tracepoint namesGiuseppe D'Angelo2018-06-283-16/+18
| | | | | | | | | | | | | | | | | | | | | | | | Use CamelCase, like the API they're tracing. Change-Id: Ie718ab624d17c9186bcf05cc1276c8eccad7f454 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | | Fix wrongly included radial gradient enum for QGradient presetsTor Arne Vestbø2018-06-281-2/+1
| | | | | | | | | | | | | | | Change-Id: If8372224d7e113c1f55468c0de69dcab9804138f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Don't position cursor inside complex graphemes when clicking outside lineEskil Abrahamsen Blomfeldt2018-06-281-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you clicked to the right of a text line ended with a grapheme consisting of several characters, either because it was a unicode surrogate pair or a ligature, we would always to the previous character in logical order, without checking if this was a valid cursor position. One result of this would be that hitting backspace when the cursor was positioned in an invalid position, would cause the entire contents of the document to become invalid. Instead we should search backwards for the previous grapheme boundary using QTextEngine::previousLogicalPosition(). [ChangeLog][QtGui][Text] Fixed position of text cursor set by clicking outside the bounds of a text line that ends with a surrogate pair or ligature. Task-number: QTBUG-69085 Change-Id: I7224c065f332f398bdfbb3f42b2b3ec8280c76a4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Harden logic for converting from CSS gradients to QGradientTor Arne Vestbø2018-06-272-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the gradients from https://webgradients.com/ are not minified completely, so we need to be a bit more lenient when converting them to the internal format used by QGradient. Change-Id: I47466b6a77abd6d2fefc1326fbf6ba5713dd74cb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | doc: Mark QGradient::Preset enum as internal until we can ignore its valuesTor Arne Vestbø2018-06-271-0/+2
| | | | | | | | | | | | | | | Change-Id: I0637ee765053a30ac3666f33c4d8f59c5ae9aa84 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | | Fix: crash when painting with high-dpr image brushEirik Aavitsland2018-06-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recently merged f5fe9fc5a4 (Add ObjectMode to QGradient) changed combineXForm() to check the brush's gradient's coordinatemode. However, combineXForm() is now also used when painting with high-dpr image brush. In the latter case, the gradient is 0 so this would crash. Testcase: tst_lancelot, image_dpr.qps. Change-Id: I5e2785ef708768c3fa3eac0999c9c24fd25108f4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | dnd: send DragEnter and DragMove on DnD startGatis Paeglis2018-06-255-65/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a regression from Qt4 and also is the documented behavior. In addition this patch fixes various issues with cursor shape updating that were discovered along the way and that are necessary for testing the new changes. The code in QGuiApplicationPrivate::processDrag() also needed a fixup, particularly the resetting of QGuiApplicationPrivate::currentDragWindow. Without this fix we would get DragMove (the one that immediately follows the DragEnter) only for the first DragEnter event. For example when dnd starts on mouse press then for mouse click we would get: <click> DragEnter->DragMove->DragLeave <click> DragEnter->DragLeave but the expected is: <click> DragEnter->DragMove->DragLeave <click> DragEnter->DragMove->DragLeave Task-number: QTBUG-34331 Change-Id: I3cc96c87d1fd5d1342c7f6c9438802ab30076e9e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Fix incorrect JSON in qt_attribution.jsonKai Koehne2018-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | Fix spurious comma added in commit c4a21708ed186640f4db381dc80. Change-Id: I6d62378dfdda7a0da611eed1064cff707b9c6bf6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | QByteArray: add compare() with case sensitivity optionsThiago Macieira2018-06-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Need to do the same for startsWith() and endsWith(). indexOf() is a lot harder. [ChangeLog][QtCore][QByteArray] Added compare(), which takes Qt::CaseSensitivity as one of the parameters. This function is more efficient than using toLower() or toUpper() and then comparing. Change-Id: Ib48364abee9f464c96c6fffd152e69bde4194df7 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Add ObjectMode coordinate mode to QGradientEirik Aavitsland2018-06-224-22/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ObjectBoundingMode coordinate mode of QGradient allows specifying the gradient coordinates relative to the object being painted. But if the gradient brush also has a transformation, that transformation is applied in the logical, not object, coordinate space. That behavior is counterintuitive. However, changing it now would break existing code. Instead, we introduce a new coordinate mode enum with the expected behavior, and document the old one as deprecated. This prepares to fix the bugs below in qtsvg, by making it possible to specify the same behavior in Qt as SVG has. [ChangeLog][QtGui][QGradient] Add ObjectMode coordinate mode [ChangeLog][Important Behavior Changes] QDataStream version bumped up to 18 to account for changes in the serialization of QGradient. Task-number: QTBUG-59978 Task-number: QTBUG-67995 Change-Id: I8820a2555359812f3e1a46e37d6ac2cc29a2091d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | configure: dequote library sources asapOswald Buddenhagen2018-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the json format uses single strings for library sources, as that leads to less noisy source text. however, this implies the need for de-quoting and subsequent re-quoting whenever the values are processed. so change the internal representation to regular qmake string lists as the first thing when processing the lib source, and re-quote only when outputting the values. CFLAGS are excluded, because we'll deal with them differently. Change-Id: I4ab43d98085ea9f6601fd21ac2afb5bce4f7e2a9 Reviewed-by: Lars Knoll <lars.knoll@qt.io>