summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Rename QList<T>::swap(int, int) to swapItemsAt()Lars Knoll2018-12-032-2/+2
| | | | | | | | | | | The old name was confusing as it conflicted with QList<T>::swap(QList &other), that was doing something completely different. Rename the method to swapItemsAt() which is a lot clearer. Change-Id: Iac77a1e790a7256766f83a24d2a243c880d875f4 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-11-272-5/+1
|\ | | | | | | Change-Id: I04afffdce6b78856d0301eb583f21d334c7466b0
| * Remove macOS specific path that causes reverse vertical advanceAllan Sandfeld Jensen2018-11-221-4/+0
| | | | | | | | | | | | | | | | | | This special case of macOS appears to be outdated and now causes a bug. Change-Id: Ie9c074bb69eda7abfe3d123f807b517334cc2958 Fixes: QTBUG-69803 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * wasm: fix qpa plugin build system integrationOswald Buddenhagen2018-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | fix the plugin name (it was missing the leading 'q') and the name used in configure (the latter making it unnecessary to mess with it in the mkspec). the qt.prf override which forced linkage of the plugin is also removed due to being completely redundant. Change-Id: I94687a34a295c36754e36a298af902b656ba2ecc Reviewed-by: Kyle Edwards <kyle.edwards@kitware.com> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | Warn when using deprecated methodsLars Knoll2018-11-261-0/+3
| | | | | | | | | | Change-Id: Id6e65d83e9279407b4b02967e4044f33d8c6ae01 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Add setter for property QStyleHints::showShortcutsInContextMenusFriedemann Kleint2018-11-242-2/+20
| | | | | | | | | | | | | | | | Add a tri-state setter logic similar to the other properties. Fixes: QTBUG-71471 Change-Id: Iddb5be18a037634a53ad8725bddb91c12fb33fed Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | QStyleHintsPrivate: Use member initializationFriedemann Kleint2018-11-241-23/+10
| | | | | | | | | | | | Task-number: QTBUG-71471 Change-Id: I368193bc363944825c01da5337738fd0a7ba2219 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Optimize QRgba64::toArgb32() and premultiplied()Allan Sandfeld Jensen2018-11-241-6/+34
| | | | | | | | | | | | | | Using similar techniques as used for QRgb qPremultiply and friends Change-Id: I4be68cb01dc3b634cf370323884e824674205998 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-11-2214-79/+148
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qdir.cpp src/corelib/kernel/qtimer.cpp src/corelib/kernel/qtimer.h Done-With: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I683d897760ec06593136d77955f8bc87fdef3f9f
| * Don't start a new page when printing very large imagesLars Knoll2018-11-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | Don't start a new page to print a very high line of text if that line wouldn't fit on one page in any case. In that case we have to break the image up onto several pages anyway, so we might as well start it immediately. Change-Id: I823aa4961df179054476755c8f5df2e03874661f Fixes: QTBUG-59885 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * Fix vertical alignment of inline imagesLars Knoll2018-11-192-15/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inline images can have 4 different alignments. Unfortunately, AlignTop and AlignBottom can only be set once we have laid out the whole line and know the total height of the line, as one could otherwise end up with lines that are too high. To fix this, position the images for these cases in a second loop after we have calculated the length of the line and the maximal image height in that line. Task-number: QTBUG-59310 Change-Id: I1fd4cd39e43a13d1967b9f5c9ce8270a99269cd9 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-11-193-7/+11
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm Change-Id: I66a08c770767a93cd26535689e3e7806486aab06
| | * Modernize the "settings" featureLiang Qi2018-11-153-7/+11
| | | | | | | | | | | | | | | | | | Change-Id: I9b8a61ecb1413b513ae5c9e77d3ee1b3e8b6562c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * | Merge remote-tracking branch 'origin/5.12.0' into 5.12Liang Qi2018-11-167-4/+15
| |\ \ | | | | | | | | | | | | Change-Id: Ic1dd39044e19f50e1068d4ac70dacaad6440e570
| | * | Doc: Qt GUI: Fix documentation warningsTopi Reinio2018-11-067-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are minor typos or documentation warnings that snuck in with new features. Task-number: QTBUG-71502 Change-Id: I03669cfecc3c3d80168ff7b1ca8bca7571e06d25 Reviewed-by: Martin Smith <martin.smith@qt.io>
| * | | Correctly initialize the logClusters array for tabs and objectsLars Knoll2018-11-141-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logclusters where never correctly initialized for tabs or inline objects. Change-Id: I376fd2dba19994eb5add24cdb8a93c38bde8cd1e Fixes: QTBUG-70946 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | | Increase QOpenGLTextureCache max sizeLaszlo Agocs2018-11-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From 64 to 256 MB. Note that this is especially important because bindTexture() will fail and return an invalid texture for image data larger than this. That is not ideal but is trickier to correct. Until that is available, increase the cache size to alleviate the pain somewhat. Task-number: QTBUG-59207 Change-Id: Ibc22524acad0b42a632eb7e4cd8ea86225174837 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | | Fix precision in parsing hex format QColorsAllan Sandfeld Jensen2018-11-121-43/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We document being able to parse more than 8-bit per color, but were ignoring everything after the first 8 bits. Change-Id: Ic85ab04b0836e6979a623e294eebd5084c1a9478 Fixes: QTBUG-71373 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | | Fix constness of QPaintDevice argumentsLuca Beldi2018-11-196-13/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFont, QFontMetrics, QFontMetricsF and QTextLayout constructors use only const methods of QPaintDevice so there is no reason for them to require a non-const pointer argument Fixes: QTBUG-65967 Change-Id: Ibfcdef2a25f0cd4284dad76135fc4c9bf5667d7a Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | | Generalize fill span optimizationAllan Sandfeld Jensen2018-11-161-16/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was added to RGB64 rendering because pixel conversions could be expensive, but when painting to non-standard imageformats, the same can also be expensive in the generic 32-bit backend, and thus benefit from the optimization as well. Change-Id: I747a398670b1d4dbd844a772e7aafce3c8dbef20 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | | Cleanup gradient blendingAllan Sandfeld Jensen2018-11-164-156/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moving it to a separate routine like blendTexture, so DrawHelper only has solid color routines, and generalizing the vertical gradient optimization. Change-Id: I54bd59eba7e95247b9a365a3738d02c4f8cc2631 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | | Change qopenglext to match official Khronos headersAllan Sandfeld Jensen2018-11-151-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we can hit issues when other versions are included, as ptrdiff_t while having the same length is not the same type as signed long long on MSVC. Change-Id: Id42049b1052e528a663125ee5426b068ee46db72 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | | Remove unnecessary drawhelper memberAllan Sandfeld Jensen2018-11-152-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was just caching a pointer only used one other place where it could be looked up. Change-Id: I3a3455f467f8a107d24b208c8591e7c9725c3389 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | | Check if the string inside the families list is empty and not the listAndy Shaw2018-11-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This amends 97f73e957756753b09a778daf2ee8f0ddb97f746 and accounts for when the minimial QPA platform is used ensuring the fallback to the QFontEngineBox. Task-number: QTBUG-71743 Change-Id: I72d45e02754fe31e31a2234d53c45e1d20dfa3d2 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | | Support table border color and cellpadding in ODF writerAllan Sandfeld Jensen2018-11-131-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1d57baa6820ee1322ac461c0db860990ff8f940d Fixes: QTBUG-67622 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-11-134-2/+88
|\| | | | | | | | | | | | | | | Change-Id: I5dbdc13c6133e5b03e362c5461b4a599d781bd1e
| * | | QImageWriter: improve documentation regarding use of resourcesSamuel Gaist2018-11-122-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QImageWriter's plugin can open devices while operating and only free them on destruction which means that if one wants to act on the file written if must first destroy the writer's instance. This patch adds the suggestion to use a scope to avoid that problem. Change-Id: I239157ea86c4a93faab237fe1860312a3c7ac7a2 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * | | Fix a typo in the docsLars Knoll2018-11-121-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I0f1b015a34b8caffa3b60927cedbccf7db50b383 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * | | Document QScreen::grabWindow high-DPI behaviorMorten Johan Sørvig2018-11-121-0/+5
| | | | | | | | | | | | | | | | | | | | Change-Id: Ib32510ff30e907365e64921fda14e686a495c77c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | | Make grabWindow return pixmap with correct dprMorten Johan Sørvig2018-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The devicePixelRatio on the returned pixmap should be the product of the Qt and platform scale factors. This handles the corner case of setting QT_SCALE_FACTOR on macOS with a high-dpi display. Change-Id: I3600165d47c03c4e043bcc5e375932cc3fc0c544 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | | Move qt_memfill32-based implementation of qt_memfill16 to genericThiago Macieira2018-11-113-40/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SSE2 implementation and the one in qdrawhelper.cpp are almost identical. And if we make it so qt_memfill16 can tail-call to qt_memfill32, there's no need for inlining, so there's no need to keep it in qdrawhelper_sse2.cpp Change-Id: I343f2beed55440a7ac0bfffd15637027771c2254 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | | Optimize qt_memfill16, with tail jumpThiago Macieira2018-11-111-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This simplifies code generation and permits the compiler to implement a tail-jump optimization. Change-Id: I343f2beed55440a7ac0bfffd15636f640116313e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | | Use qsizetype for qt_memfill functionsThiago Macieira2018-11-118-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Just in case the image is larger than 2 GB (512 megapixels). Change-Id: I343f2beed55440a7ac0bfffd15636cbc68dfa13d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | | Merge the qt_memfill{,_template} functionsThiago Macieira2018-11-112-62/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had two copies of the Duff's Device implementation, one in the .cpp and one in the header. One of the two implementations had a protection against zero counts, the other didn't. So move the .cpp implementation to the header and use it in the functions that were declared there. Fixes: QTBUG-16104 Patch-By: Allan Sandfeld Jensen <allan.jensen@qt.io> Change-Id: Iba4b5c183776497d8ee1fffd156456cc3502946e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-11-1021-108/+150
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/serialization/qcborcommon.h src/corelib/tools/qlocale_data_p.h tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: Ibed987f6d77a0294f78f67d78625237616082416
| * | | QtGui: Check event type in QWindowSystemInterface::handleMouseEvent()Friedemann Kleint2018-11-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assert on receiving double clicks which are currently not implemented. Task-number: QTBUG-71263 Task-number: QTBUG-70999 Change-Id: I85cd21665ecaf118584053de63745044728d8f5b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-11-0914-25/+30
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf qmake/Makefile.unix src/gui/text/qtextdocument.cpp src/gui/text/qtextdocument.h Change-Id: Iba26da0ecbf2aa4ff4b956391cfb373f977f88c9
| | * | QSyntaxHighlighter: Delay all highlights until first rehighlightMårten Nordheim2018-11-081-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling setDocument (directly or through the constructor) a delayed rehighlight is initiated. Previously, if any text was changed before this rehighlight could run it would cancel the rehighlight, even if the changed text only caused a new block of text to be highlighted. Fixes: QTBUG-71307 Change-Id: Ib09b664d90906f5b4427105f0e45469806f3a779 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
| | * | Doc: Clarify what samples() returns if not explicitly setAndy Shaw2018-11-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Icf4478121a9d67356eb976039c666d6945a2099c Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * | Fix typo in define. s/GL_FRAMEBUFFER_SRB/GL_FRAMEBUFFER_SRGBSergio Martins2018-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Found with clazy Change-Id: Ied84c0fa95a7ae7b7791e167695acfc7877f7e25 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * | Modernize the "textcodec" featureLiang Qi2018-11-0711-18/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also clean up QTextCodec usage in qmake build and some includes of qtextcodec.h. Change-Id: I0475b82690024054add4e85a8724c8ea3adcf62a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * | | QImage: merge the size calculations with proper (non-UB) checksThiago Macieira2018-11-083-70/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This check, which was only done once, was wrong: const int bytes_per_line = ((width * depth + 31) >> 5) << 2; // sanity check for potential overflows if (std::numeric_limits<int>::max()/depth < width If width*height overflows, then it's already UB and checking afterwards with a division is pointless and slow. The other instances weren't properly guarding against overflows. Change-Id: I343f2beed55440a7ac0bfffd1563350d4cfa639c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | | Merge remote-tracking branch 'origin/5.12.0' into 5.12Liang Qi2018-11-053-13/+24
| |\ \ \ | | | |/ | | |/| | | | | Change-Id: I12f26470e01a8582d0f02f51e20d5b742bd95d6f
| | * | Merge remote-tracking branch 'origin/5.11' into 5.12.0Liang Qi2018-11-053-13/+24
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoaglcontext.mm src/plugins/platforms/xcb/qxcbscreen.h Change-Id: If9b4c67288396ff7346088ce591c7a3588b51979
| | | * Don't create an offscreen surface when not on the GUI threadAndy Nichols2018-10-301-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we try to gracefully destroy a QOpenGLVertexArrayObject it is not possible to create an QOffscreenSurface from a thread that is not the GUI thread. In this case we just need to bail out instead. The side effect that was seen previously was that there would be a warning and a deadlock on Windows when closing QQuickWindows that contained a QQuickPaintedItem backed by a FrameBufferObject render target (which would be using the OpenGL paint engine) when using the threaded render loop. Task-number: QTBUG-70148 Change-Id: I4a20d74d9af850bb90d243212ad9f65c3fc9e616 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | | * Fix leaking QTabletEventPrivate instanceKirill Burtsev2018-10-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-52279 Change-Id: I4f40fc9d3ce938b4c821f10cacd21e6f652a2227 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | * Don't block mouse events if the window is a Tooltip typeAndy Shaw2018-10-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a tooltip was shown on an application modal dialog then it would end up blocking mouse events to the dialog while the tooltip was visible. Since tooltips are special in this case, they should not cause mouse events to be blocked. Fixes: QTBUG-65599 Change-Id: Ibf1729ca4942f5854e4f9687c5586382e23c1c31 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | Painting: Fix capping of polylines having endpoint == startpointEirik Aavitsland2018-11-094-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A polyline should not be closed like a polygon, even if the start and end points are identical. But when the primitive was broken down to a vector path, the stroker no longer had available the information that it should be open, and so would join the start and end points. Fixes: QTBUG-65393 Change-Id: I0a566f91cf1a2843fda662b393dbae78c3c38f06 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | Handle fonts that have commas/quotes in the family nameAndy Shaw2018-11-089-33/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the comma character was originally used as a separator, we need to extend QFont to have setFamilies() so that we can avoid joining the family strings together. This enables us to see the family name as a single string and for multiple family names, we have families(). Subsequently, this has added functions to QTextCharFormat to account for multiple font families too. So it is now possible to set a single one directly with setFontFamily() and multiple ones with setFontFamilies(). This also bumps up the datastream version to 19 as QFont now streams the families list as well. [ChangeLog][QtGui][QFont] Add setFamilies()/families() to aid using of font families with commas and quotes in their name. [ChangeLog][Important Behavior Changes] QDataStream version bumped up to 19 to account for changes in the serialization of QFont. Fixes: QTBUG-46322 Change-Id: Iee9f715e47544a7a705c7f36401aba216a7d42b0 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | | Use regular SSE2 stores instead of non-temporal ones in qt_memfill32Thiago Macieira2018-11-081-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no good reason to use non-temporal stores. Images may be 100x bigger than strings, but they're not so big that the non-temporal stores make sense. Patch-By: Allan Sandfeld Jensen <allan.jensen@qt.io> Change-Id: Iba4b5c183776497d8ee1fffd156380ec9103ef1a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>