summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* CUPS: Use printer job-sheets as default instead of none,noneAlbert Astals Cid2017-12-184-2/+45
| | | | | | | | This also reads the job-sheets from lpoptions if set there for the particular printer Change-Id: I35aff103261ef58492779071d866e8a15ac78607 Reviewed-by: Laurent Montel <laurent.montel@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Remove declared but undefined QPageSetupWidget constructorAlbert Astals Cid2017-12-181-1/+0
| | | | | | Change-Id: I54022d00d246c83489ccd171170feec1a1a46673 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CUPS: Use default cups job-priority instead of 50Albert Astals Cid2017-12-185-7/+26
| | | | | | | | This also reads the job-priority from lpoptions if set there for the particular printer Change-Id: I75d983c377d2135a0b0d3e028829a7384a5e1897 Reviewed-by: Laurent Montel <laurent.montel@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CUPS: Fix lpoptions file not being taken into accountAlbert Astals Cid2017-12-181-1/+2
| | | | | | | | | | | This is actually two fixes. * We need to call cupsMarkOptions * CUPS differentiates between the "" and the nullptr instance, so we need to change the call to cupsGetNamedDest accordingly Change-Id: If2692e405b6b71f8ee91362e6e72eabd9202d704 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* QScroller: maintain activeScrollers as a QList, not a QSetMarc Mutz2017-12-181-6/+5
| | | | | | | | | | | | The number of active scrollers is probably very low, so O(N) vs. O(1) search can be neglected, compared to the higher cost of allocating and iterating a QSet. The tipping point is that the public API uses QList, and the QSet needs to be converted toList() on each (external) access. Just use a QList. Change-Id: I5f0b37761923dc94d6dbbbf92973da73f5335e4a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QtPrintSupport: Fix buildFriedemann Kleint2017-12-181-0/+1
| | | | | | | | | | | dialogs/qprintdialog_unix.cpp:1104:21: error: incomplete type 'QTextCodec' used in nested name specifier Amends b4330bc391bbb08898f192ea3469b73aed09134c. Task-number: QTBUG-54464 Change-Id: I555431d11a5c3f247d4f055d94255d2708c92374 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Add support for FileChooser flatpak portalJan Grulich2017-12-169-4/+902
| | | | | | | | | | | | | | | | | | | | Adds support for FileChooser Flatpak portal. To support them we just do specific DBus calls, which are then caught and forwarded by xdg-desktop- portal daemon/service. This is needed for Qt applications running in sandbox. [ChangeLog][Platform Specific Changes][Linux] Added support for flatpak portals. Flatpak is a software utility for software deployment and package management. It provides a sandbox environment in which users can run applications in isolation from the rest of the system. To communicate with the system flatpak uses portals, which are designed to be a bridge between sandboxed applications and desktop/system running on user's computer. Flatpak runs this service (called xdg-desktop-portal) automatically. It exports the portals via DBus and they are visible by default to all applications running under Flatpak. Change-Id: I4de1402434ba7cbcc805eab51c30f84f8ba0c5c5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDrag: Allow setting cursor for IgnoreActionMorten Johan Sørvig2017-12-151-4/+3
| | | | | | | | | This is especially useful on macOS where the default ignore cursor is the pointer cursor. Change-Id: I5e14814abd2d59a7f4c4cd1029829ebbed5b3017 Task-number: QTBUG-26724 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Rework the "failed to find or load QPA plugin" message a bitSergio Martins2017-12-151-2/+8
| | | | | | | | | | | | | This is one of the most frequent problems users ask for help with, and they don't even know if the plugin was found but not loaded or simply not found. Qt knows what happened, so communicate it to the user. Change-Id: I6003ed4ab3d147a5d159b2002004e53c251cb512 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Reintroduce the Advanced tab in the QPrintPropertiesDialogAlbert Astals Cid2017-12-152-6/+409
| | | | | | | | | | | | | | | | This is mostly a revert of 69de6177615de3c4c31dea529172389e92f490b0 adapted to the new code. The commit that removed this code said: a) there's duplicate settings in the advanced tabs and in the rest of the ui: this easily solved with a blacklist b) you can set these options in the system settings: probably true, but it is very cumbersome to go to the printer settings every time i print to select from which tray the paper should be used Task Number: QTBUG-54464 Change-Id: I7b1cacf51006dadb10aa6e00fe6dd2ff748fe576 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* macOS: remove existing color-profile handling codeMorten Johan Sørvig2017-12-155-200/+20
| | | | | | | | | | | | | This code is unused/not functional. Use sRGB everywhere instead. This is not a change of effective color profile: the backing store has had the sRGB profile assigned since commit ac899f6d changed it as a side effect. Change-Id: Ib45cec3acad90db2a0873b052d6bc4a61c894b18 Task-number: QTBUG-47660 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* qfloat16_f16c.c: inline in qfloat16.cpp if F16C is permitted in thereThiago Macieira2017-12-153-4/+37
| | | | | | | | | | | | | | | | | | | | | This is going to be the most common scenario for GCC: all recent versions allow compiling F16C code in the same source, thus generating better code. MSVC is excluded unless AVX is already turned on by the user in the mkspec file, because it fails to use the VEX-prefixed instructions for everything else, printing a warning that it knows it should have done so. ICC is excluded because it's known to generate invalid code when using the F16C intrinsics unless F16C is turned explicitly on. Clang is excluded because it runs into an internal error compiling this code unless F16C is turned explicitly on. Change-Id: I57a1bd6e0c194530b732fffd14f58de6a46f0de1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove testQuitLock from BLACKLISTMorten Johan Sørvig2017-12-141-1/+0
| | | | | | | | Follow-up to d044b0b, with claimed to remove it but didn’t. Change-Id: Ifeeb6b062c7c41f1914d677e8aa20e4cb9378ac9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QAbstractItemModel: add more checks in begin{Insert,Remove}{Rows,Columns}Giuseppe D'Angelo2017-12-141-0/+4
| | | | | | | Check that the inserted/removed range is indeed valid. Change-Id: Ifccbe13f0753252ee1450c8668df782dc699f05b Reviewed-by: David Faure <david.faure@kdab.com>
* doc: fix signatures and missing module headersMartin Smith2017-12-145-45/+64
| | | | | | | | | | | | The update adds the moduleheader variable to the qdocconf file for qttestlib.qdocconf and qmake.qdocconf. The problem with qmake is that it doesn't have a module header file, but it does have qmake_pch.h, which is used here. This update also corrects several \fn commands in the qttestlib docs. Change-Id: I2202b9db96390bac1ee491ca8a99ca9010057ce3 Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QPlatformPrintDevice: use QVector, not QList in the APIMarc Mutz2017-12-146-29/+29
| | | | | | | | | | | QPlaformPrintDevice uses QVector to store, but QList in the getters to retrieve these data. Port API from QList to QVector to avoid conversion between the two containers on every access. Saves almost 4KiB in text size (another 0.9% of QtPrintSupport). Change-Id: If33df141b87753803c45d9f4dae501a68abe49af Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QPlatformPrintDevice: store QPageSize/QMimeType/int in QList, not QVectorMarc Mutz2017-12-142-6/+6
| | | | | | | | | | | | | | | | This commit pains me, because we want Qt to migrate away from QList, but the QtPrint API stack (all the way to public API, for QPageSize, and int) is formulated in terms of QList, not QVector, so it makes zero sense to store data in QVectors just to convert to QList on every opportunity. Store QMimeType in QList, too, since that's what QtCore uses. Saves 3KiB in text size (0.7% of QtPrintSupport). Change-Id: I71249f60be517cc06973b38d9ccad7a31f348be3 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Windows: Support application fonts as fallbacksEskil Abrahamsen Blomfeldt2017-12-141-12/+17
| | | | | | | | | | | | | | | | | | | In order to support the generated EUDC.TTE font for End-User Defined Characters on Windows, we need to allow fallback fonts which are not part of the default font collection. This is the same as change 21c7421d4e86b6048f9c2c7a9a81ec4ff1ed278c, but adapted to the fallback font code path. Without this change, the EUDC file would still be loaded, but it would be loaded through the GDI fallback, and we would display an error message on the console. Task-number: QTBUG-44594 Change-Id: Id2404228c7fd345523e4e5c99f31862e256930e3 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Kludge round MS TZ APIs' lies breaking a testEdward Welbourne2017-12-131-0/+8
| | | | | | | | | | | | | | | | Commit 68bcccac took account of MS TZ APIs mis-describing non-DST zones making changes to standard offset (e.g. Europe/Samara in 2011 at the end of October); however a DST transition that coincides with an equal and opposite change to standard offset, while the other end of its DST period changes normally, ends up looking exactly the same (although it's nominally subtly different), in MS's APIs. Thus fixing the more common case broke this more obscure case; there is no way to fix this (other than not using MS's broken-by-design APIs). So kludge the test to skip the bit we know this breaks. Task-number: QTBUG-64985 Change-Id: I068500e2e783ab72b400bfd6dbb7dbbd5b08a7bc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make tst_QOpenGLWindow pass on platforms where the default FBO != 0Johan Klokkhammer Helsing2017-12-131-3/+3
| | | | | | | | | | | | The test would fail on Wayland with window decorations enabled because there window content is drawn to an FBO before it's blended with the window decorations (also drawn by the client). Task-number: QTBUG-51741 Change-Id: I7c74ad235c6a2d50231a9f863da1810675dd4eae Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Windows: Add font fallback for EUDC glyphsEskil Abrahamsen Blomfeldt2017-12-132-3/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EUDC, or "End-User Defined Characters", is a concept in Windows, where the end-user can create a local fallback font of default glyphs for the PUA (Private Use Area, a range of Unicode not reserved to any writing system), and these glyphs will be used when displaying the character using a font which does not itself support the code point. To support this in Qt we look up the default EUDC font in the registry and add it to the fallback fonts if it is available. We use the font for code page 1252. This has been tested on a couple of systems, and appears to always be present. The font is added to the front of all fallback lists, so that it will override other fallbacks, such as Segoe UI Symbol, which happens to assign glyphs to the PUA. If there is no end-user defined fallback, then Segoe UI Symbol will still be used as before. Note that this required a small change in the code to get canonical font names. The EUDC font that Windows generates will only have a name set for the current locale, and we expected all fonts to have an English name. Instead, the code has now been changed to prefer the English name if one is present, but accept any other name if there is nothing in English. [ChangeLog][Windows][Text] Added support for End-User Defined Characters in Qt. Task-number: QTBUG-44594 Change-Id: I83ae68b6d16e9b50e990dfb3ac3d294b7b2a5113 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Allow access to ppd file and ppdMarkOption via ↵Albert Astals Cid2017-12-134-0/+28
| | | | | | | QPpdPrintDevice::property/setProperty Change-Id: I47b49b52121950fa8e3ea7a056974d9f3033490f Reviewed-by: Liang Qi <liang.qi@qt.io>
* Introduce QPrintDevice::property/setPropertyAlbert Astals Cid2017-12-134-0/+38
| | | | | | | So we can access QPlatformPrintDevice internals if needed Change-Id: Ib37c5717713f37262ef12d7b61793d80f05baf4a Reviewed-by: Liang Qi <liang.qi@qt.io>
* Pass the include paths to qdocOlivier Goffart2017-12-081-3/+3
| | | | | Change-Id: Id97df15863e8499d879079b0df705c78c04ca521 Reviewed-by: Martin Smith <martin.smith@qt.io>
* doc: update dbus sources for clangqdocMartin Smith2017-12-087-23/+54
| | | | | | | | | | Changed some uses of Q_QDOC to Q_CLANG_QDOC; eliminated some uses of Q_QDOC; correct some function signatures used for qdoc; added docs for swap() functions. Change-Id: I0d3c62d462bd3b10fd35d411bdfb93d952e6423d Reviewed-by: Martin Smith <martin.smith@qt.io>
* doc: clangqdoc must always see GL typedefsMartin Smith2017-12-083-8/+28
| | | | | | | | | | | | | | | | | | | | | | | | | QT_NO_OPENGL must not be defined when running clangqdoc because there are opengl elements that must be documented. That means clang will see uses of GLxxx, which might not be included on some platforms. For example, clang must parse the declaration for class QOpenGLFramebufferObject, which uses GLuint, GLenum, and GLbitfield, because there is documentation to be published for that class in qopenglframebufferobject.cpp. This change uses Q_CLANG_QDOC to first undef the needed GLxxx types and then provide suitable typedefs for them. This technique is also used in qglshader.h. This works for macOS, but is it the right way to solve the problem? This change also removes some \overload commands, because they shouldn't be used on constructors. And some \fn commands that are made unnecessary by upgrading to clang. Change-Id: I4ac658e951b3f2011698005f0238d4dea85fc403 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Fix persistence of custom colors palette in QColorDialogSerge Lysenko2017-12-082-4/+13
| | | | | | | | | QColorDialog does not save custom colors after application relaunching, if those colors were changed with drag'n'drop Task-number: QTBUG-64500 Change-Id: I8ba6e1ef4e078f7b93463e7b20c9e21659d4777e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Update usage of QFontMetrics::width() to new APIEskil Abrahamsen Blomfeldt2017-12-0859-116/+116
| | | | | | | | | | | | | | QFontMetrics(F)::width() has been deprecated and is replaced by horizontalAdvance(). This updates all usage of it in tests and documentation. It is worth noting that many or most of the usages of QFontMetrics::width() probably intended to use boundingRect().width(), but since it currently works, I have not looked into that, just replaced the function name mechanically. Change-Id: Iec382e5bad0b50f37a6cfff841bfb46ed4d4555f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Android: port away from QRegion::rects()Marc Mutz2017-12-081-2/+3
| | | | | | | | | | | | | Use being()/end() instead. The region of whose rects() we iterate here is modified in the loop body, so take a copy of the rectangles. Since QVector is still missing a range constructor, use std::vector. This does not cause extra copies, since the QVector inside QRegion would detach anyway, when the QRegion is modified inside the loop. Change-Id: Ib973e825b55d9c9568936cb80180858163d87379 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Rename headers in platformsupport/windowsuiautomationAndre de la Rocha2017-12-0812-20/+20
| | | | | | | Private headers must end with _p.h. Change-Id: Ia63339322a38fedea93d93728ef5c32fba95d76f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* doc: Fix all qdoc errors in QtConcurrentMartin Smith2017-12-0815-139/+129
| | | | | | | | | | | | | These errors resulted from the improved parsing provided by clang, which required rethinking which elements of the QtConcurrent API should be visible to clangqdoc. The basic problem is that clang must see declarations for all types used by a type, or else it either gets lost and fails to parse a type correctly, or it simply refuses to include the type in its AST. Change-Id: Iaa699c287e67d1288fcb2d83a9dbbaf07521d0cc Reviewed-by: Martin Smith <martin.smith@qt.io>
* doc: Fix qdoc errors for \fn commands in QtConcurrentMartin Smith2017-12-087-26/+202
| | | | | | | | | | | | | This change updates the \fn commands in the QtConcurrent module, which makes extensive use of templates. Some of the update \fn commands are very long as a result. A few cases of the tag trick were used to fix qdoc errors for some complicated template function signatures that were marked \internal anyway. Change-Id: I8546b89030c51bb9dddf38fa10bc0248d901aa51 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Add template text to \fn commands in QScopedPointerMartin Smith2017-12-081-22/+26
| | | | | | | | | The \fn commands were not recognized by clang-qdoc because the template stuff was missing from the \fn commands. This update adds the correct template text and parameters. Change-Id: If45465880933174f1481a8be292474be191cfd45 Reviewed-by: Martin Smith <martin.smith@qt.io>
* doc: Add template text to \fn commands in qglobal.cppMartin Smith2017-12-082-85/+84
| | | | | | | | | | | | | | This update corrects many qdoc warnings in qglobal.cpp caused by incomplete \fn commands. It also corrects many undocumented parameter errors caused by clang's requirement that the formal parameter names be the same in both the declaration in the include file and the \fn command. Some formal parameter names were changed in the declarations in the header file. Change-Id: I4cd38f30461c585b97ec11923cdbc81a41fe00b8 Reviewed-by: Martin Smith <martin.smith@qt.io>
* doc: Change invokeMethod() comments to work with clangMartin Smith2017-12-083-39/+14
| | | | | | | | | | | | | | | | | | | | | There were four dummy declarations for struct QMetaObject that were needed by old qdoc to allow documentation of some very complicated function signatures that old qdoc could not parse. clangqdoc can now parse these signatures, but, unfortunately, old qdoc is still used to parse \fn commands in .cpp and .qdoc files, so the dummy declarations are still needed in struct QMetaObject. However, clangqdoc now sees that two of the four dummy declarations are actually duplicates of the other two, and then old qdoc complains when it can't find all four of the function nodes, when it parses the four \fn commands. This update removes the duplicate dummy declarations and the two redundant \fn comments. The remaining two \fn comments are updated accordingly. This change also moves a couple of qdoc comments so they are located with the function definitions that they are documenting. Change-Id: I85e2492ba0380b01c3700b3dc7db0913d6429701 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Remove spurious execute permissionsEdward Welbourne2017-12-083-0/+0
| | | | | Change-Id: I2aa16d49bb8eb474200c70f312b4eb7cfc1604cb Reviewed-by: David Faure <david.faure@kdab.com>
* Deduplicate a common check for legacy codesEdward Welbourne2017-12-081-25/+26
| | | | | | | | | | | | All of QLocalePrivate::codeToLanguage()'s legacy codes were two-letter, so duplicated a "third letter is 0" check; pulling it out in front of them all will get any three-letter code more promptly to the final fall-back, while saving the two-letter codes repetition of the check. Change-Id: I8ee81a526adaa7b24c11c1de7a1750d87deb5fb3 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Fix documentation for function objects with map/reduceVille Voutilainen2017-12-084-3/+41
| | | | | | | | | | | | | | The documentation claims that function objects just work with map-reduce. They work for the map function, but not for the reduce function. Making them work for the reduce function was deemed too complex for questionable benefit, so this patch explains the situation and provides a work-around. Task-number: QTBUG-22710 Change-Id: I7f706468e36031bc261234310d331001b96e5137 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Nico Vertriest <nico.vertriest@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Improve QTabletEvent::rotation documentationShawn Rutledge2017-12-071-6/+9
| | | | | | | | | - There was a typo - It has not been limited to the 4D mouse for some time now - The Apple Pencil now supports rotation too Change-Id: I96e20a56491fbcb80e19dc39d0b48b543217aa24 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QRegion: deprecate rects()Marc Mutz2017-12-072-16/+38
| | | | | | | | | | | | | | | | | It was superseded by begin()/end() in Qt 5.8. The eventual removal of rects() will allow greater flexibility in the implementation's choice of data structure (std::vector, e.g., or QVarLengthArray). Remove all traces of rects() from the documentation. This means we need to copy information previously contained in the rects() docs to functions which previously just referred to rects(), in particular the begin()/end() familiy of functions. Change-Id: I90809809783252f7c552f24b4841f1e965580284 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Port away from QRegion::rects()Marc Mutz2017-12-073-10/+20
| | | | | | | | | Use being()/end() instead. These were the last remaining uses of QRegion::rects() within qtbase. Change-Id: I264beb6f660968f40eecbbee2260341fca94ddb5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* tst_QRegion: compile under QT_DISABLE_DEPRECATED_BEFORE=0x051200Marc Mutz2017-12-071-5/+24
| | | | | | | | | | | | | | The introduction of begin()/end() actually made most tests that still use rects() duplicates. Keep them, though, for test coverage (rects() takes a very different code path from begin()/end()), but, under the assumption that Qt at some point will default to built with deprecated APIs dis- abled, make the test compile with disabled deprecated API. Port some checks that still used rects() to begin()/end(). Change-Id: Ia7da80f0cd6ef69693f54a474924683624a2c3eb Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add command line switch to help outputJan Murawski2017-12-071-0/+1
| | | | | | | | | Add the command line switch added in change 184c5470f534119b27c1a4caec29d699aba9c234 on qtdeclarative to the help output of the qmltestrunner application. Change-Id: I9f42719500e0039afa6a5b0f1f365611855229b3 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QVector: drop QRegion friendship: it's not neededMarc Mutz2017-12-061-4/+0
| | | | | | | | I don't know when it ceased to be needed, but QRegion no longer does anything fancy with QVector. Change-Id: I1bdfefc84724c379fab76dada35575666144df12 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QAlphaPaintEngine: port away from QRegion::rects()Marc Mutz2017-12-061-6/+3
| | | | | | | | | | | | | | | | | Use begin()/end() instead. The old code extracted the rects from the region, then checked for a 'complex' region (by comparing the number of rectangles against 10), and replacing the region with the bounding rect if it was too complex. It then went on to adjust the rectangle list it had gotten from the original region to match the new. Simply delay getting the rectangles until after we have modified the region. Since there are many member function calls in-between, take a copy of the region to iterate over later, rather than relying on the region to be left untouched by all the code in-between. Change-Id: I49ddf4d545520ab435ab6b89eec3d24cf371823e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* xcb: port away from last QRegion::rects()Marc Mutz2017-12-061-5/+4
| | | | | | | | | | | Use begin()/end() instead. In QXcbShmImage::flushPixmap(), instead of gettings different rects(), depending on a bool parameter, just call yourself again with the modified QRegion, which we can then just iterate over. Change-Id: I6d4f7c6e4e5d2a24520716847ca9331bf39337c8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* xcb: share code for QRegion -> xcb_rectangle_t[] conversionMarc Mutz2017-12-063-14/+13
| | | | | | | | | | ... between QXcbWindow and QxcbShmImage. Replaces one QRegion::rects() call (to be deprecated), fixes potential overflows that QXcbShmImage did not handle, but QXcbWindow did, and saves ~1KiB of text size. Change-Id: I55d37021164feefe0cb3e60bd6d22b1976a6467b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QtGui: port away from QRegion::rects()Marc Mutz2017-12-063-30/+30
| | | | | | | | | | | | Use begin()/end()/rectCount() instead, which don't require QRegionPrivate ::vectorize() calls. In QPaintEngineEx::clip(), the rectCount() == 1 case called clip(QRect), but forgot to return, causing another clip(QVectorPath) call with the same arguments. Fixed. Change-Id: Ife33112fc8006ed4bdff6409e2b8465ce7acb9d1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* tst_QWidget: port away from QRegion::rects()Marc Mutz2017-12-061-4/+3
| | | | | | | | Drop the useless copy 'r' of 'region', reuse 'r' for the rects in 'region', to clean up the region handling in verifyColor(). Change-Id: I8e159976b4b0152823be864488d2ef25d7cb0078 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* xcb: use a more efficient unique_ptr instantiationMarc Mutz2017-12-061-6/+8
| | | | | | | | | | Wrap std::free() in a function object, to avoid having to carry around state (the function pointer) inside unique_ptr objects. This shrinks unique_ptrs back to sizeof(void*). Change-Id: I32a711192c5485dc04e3b36a1ddabf02d1e9d4f9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>