summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
Commit message (Collapse)AuthorAgeFilesLines
* Avoid conversion over RGBA64 for RGB32 LCD text blendingAllan Sandfeld Jensen2018-08-301-9/+49
| | | | | | | | Short-cuts the case where there is no gamma correction to avoid a conversion over RGBA64 and back. Change-Id: I100697a9f7a4b94283557b2c0eaa45e0eff81785 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Optimize blits of any compatible formatsAllan Sandfeld Jensen2018-08-032-2/+120
| | | | | | | | | | | The fast image blending is only used for SourceOver composition, but several of our embedded backends make heavy use of Source composition which doesn't have a short-cut. This patch adds a blitting short cut that works in those cases. Task-number: QTBUG-69724 Change-Id: Icc61a67cc27bc83863153d69cae60dd986d26f69 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add missing optimization for loading RGB32 to RGBA64 using NEONAllan Sandfeld Jensen2018-08-031-0/+61
| | | | | | | | | | The rest of the RGB64 routines were optimized, but the loading of RGB32 was not as it was originally not used much, but with ARGB32 using the RGB64 backend, it is essential for decent performance. Task-number: QTBUG-69724 Change-Id: I1c02411ed29d3d993427afde44dfa83689d117e0 Reviewed-by: Lars Knoll <lars.knoll@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>
* 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-211-1/+1
| | | | | | Task-number: QTBUG-68933 Change-Id: I3f2a9f8c562f9a44bb32bddd31d75abbfe6de04d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* 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>
* Fix build for Android with android-clang in r17Liang Qi2018-06-061-3/+3
| | | | | | Task-number: QTBUG-67464 Change-Id: Ib971a5da82b31bce9ac1c9ac623ad7d5302cfaec Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix QTransform::transposed() result having wrong transformation typeEirik Aavitsland2018-06-061-2/+0
| | | | | | | | | | The implementation of QTransform::transposed() had a wrong assumption about the type of the result. Task-number: QTBUG-68630 Change-Id: Ia5ce794efe773d74fb5fdaff3da8cae2b452e7e5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Reduce recent performance regressionAllan Sandfeld Jensen2018-05-301-2/+2
| | | | | | | | | | | | | | The change to fix 16-bit integer overflow used two floor operations when only one is necessary. With floor being rather expensive on x86 without SSE4.1 this caused a performance regression in ARGB32 smooth perspective transforms. This eliminates one of the floor operations which is unnecessary as the number is always positive in this case and thus truncation will yield the same result faster. Change-Id: Iaae76820d4bc2f368e49ed143130b5075fc760a2 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fix potential 16-bit integer overflowAllan Sandfeld Jensen2018-05-231-4/+4
| | | | | | | | | | | When multiplying a float in [0;1[ with (1<<16), with rounding, it might end up being rounded to 65536 even if the input was under 1. This patch uses a floor operation to make sure the value can be in a ushort, and cleans up the surrounding code so it is clearer what it does. Task-number: QTBUG-68360 Change-Id: I2d566586765db3d68e8e7e5fb2fd1df20dabd922 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fix division by zero in radial gradiants with NEONAllan Sandfeld Jensen2018-04-241-0/+5
| | | | | | | | | The NEON implementation uses rsqrt and thus can not be taken on 0, so replace the minimum with something close to zero instead of zero. Task-number: QTBUG-59961 Change-Id: Ia39e45be675b056c1e22900495ce9ba4e8b70e5f Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* PDF engine: handle abnormally long string casesEirik Aavitsland2018-04-121-5/+10
| | | | | | | | | | The output routine used a fixed size scratch buffer, with no attempt to handle overrun. Add a simple fallback code path for such (extremely rare) cases. Task-number: QTBUG-66788 Change-Id: I52531b829baeaa48a8fb5a637a020ee9f89d270a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove last uses of interpolate_4_pixels_16 on SSE2 and NEONAllan Sandfeld Jensen2018-04-112-53/+52
| | | | | | | | | | | | With SSE2 or NEON interpolate_4_pixels is faster than interpolate_4_pixels_16, and using it saves a branch of duplicated code. Similar changes had already been done other places it was used, those have been updated to follow a similar logic. Change-Id: I040d96480f7f925f659602f66f931d28b59312a5 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fix QPainter save/restore of clipping enabled stateEirik Aavitsland2018-03-261-0/+5
| | | | | | | | | | | | | Clipping enabled state would not always be correctly restored for the raster engine (other engines work fine). The raster engine's QClipData object is sometimes shared between painter state objects on the save/restore stack. QClipData has its own enabled flag, and this could then come out of sync. Fix by making sure we sync the enabled state on restore. Task-number: QTBUG-58789 Change-Id: I81e6254ebb93df6e153bbef58e32a885273e3224 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix: avoid realloc when adding primitives to painterpathEirik Aavitsland2018-03-231-7/+0
| | | | | | | | | | Calling reserve() for every primitive added would defeat QVector's over-allocation strategy to avoid reallocs. Task-number: QTBUG-66677 Change-Id: I7bdafdfa4d3ef60b00752c11e1b803abba773658 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Avoid of bounds memory reads when scaling and mirroring imagesAllan Sandfeld Jensen2018-03-222-0/+30
| | | | | | | | | The bounds check we had wasn't complete for mirroring cases. Task-number: QTBUG-65387 Change-Id: I5333912621c1223f83b4f1b95f2b16d12b520bd2 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fix QPageLayout() not initializing unitsAlbert Astals Cid2018-03-191-8/+1
| | | | | | | | by using the other QPageLayout constructor Task-number: QTBUG-47551 Change-Id: I9c3635d4a460437febefdfb9d259d508b61c1f29 Reviewed-by: David Faure <david.faure@kdab.com>
* Fix performance regression in simple a8 non-gamma correctedAllan Sandfeld Jensen2018-03-141-0/+2
| | | | | | | Avoid doing the conversion over QRgba64 when we don't need it. Change-Id: Ic2f82bef0a80b17ef7803eedcdb0600eeac96489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix scaling precision with large zoomsAllan Sandfeld Jensen2018-03-121-4/+12
| | | | | | | | | | Avoid using the two fast-scaling paths, while they might not overflow in this case, they do not have enough precision in their fixed point math to render accurately. Task-number: QTBUG-53582 Change-Id: I2e063ee90defbecd79a12a6ce02a74c60d1805df Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QRasterPaintEngine: properly initialize flagsChristian Ehrlicher2018-03-111-0/+1
| | | | | | | | | | QRasterPaintEngineState::flags.non_complex_pen was not initialized in the ctor which leads to valgrind warnings. Initialize it to false - the correct value is set within update/ensurePen() before it is really used. Task-number: QTBUG-66615 Change-Id: If154873ad89903c243662ab1f140f74434a6f88c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Silence a GCC 8 warning in qpainterVille Voutilainen2018-02-281-2/+2
| | | | | | | | qtbase/src/gui/painting/qpainter.cpp:5625:68: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct QFixed’; use assignment or value-initialization instead [-Werror=class-memaccess] memset(advances.data(), 0, advances.size() * sizeof(QFixed)); Change-Id: I563b1b0c5dfaf381a9521bc9a4dc3197f0f38d11 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Silence a GCC 8 warning in qoutlinemapperVille Voutilainen2018-02-281-1/+1
| | | | | | | | | qtbase/src/gui/painting/qoutlinemapper.cpp: In member function ‘QT_FT_Outline* QOutlineMapper::convertPath(const QVectorPath&)’: qtbase/src/gui/painting/qoutlinemapper.cpp:182:76: error: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type ‘class QPointF’ from an array of ‘const qreal’ {aka ‘const double’} [-Werror=class-memaccess] memcpy(m_elements.data(), path.points(), count* sizeof(QPointF)); Change-Id: Ieca99f0262c57e58adbcf48ac923ae11bd428b00 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.10' into 5.11Liang Qi2018-02-151-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/corelib.pro src/corelib/global/qrandom.cpp src/network/access/qhttpnetworkrequest_p.h src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/cocoa/qcocoansmenu.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/offscreen/qoffscreenintegration.h src/widgets/kernel/qaction.cpp src/widgets/widgets.pro Done-with: Andy Shaw <andy.shaw@qt.io> Change-Id: Ib01547cf4184023f19858ccf0ce7fb824fed2a8d
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-262-5/+5
| |\ | | | | | | | | | Change-Id: I7bfb75083f60190aa1def82d153f89925a92fd56
| * | Don't set no_clang_integrated_as for the disabled pixman asm on clang/mingwMartin Storsjö2018-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no external arm assembler to fall back on here. The actual assembly is already disabled since 8072c36eebd064, but passing the empty assembly file to any random external assembler could end up producing an empty object file for the host environment instead of the target, in a cross build. This wasn't an issue as long as the clang compiler only was identified as g++ within mkspecs, making no_clang_integrated_as a no-op. If the mkspec actually identifies it as clang, this config can't be added here. Change-Id: I0f20b9b2a8d13b5e7e1b654e391d88b639c031bf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into 5.11Liang Qi2018-02-142-5/+5
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/animation/qvariantanimation.cpp src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/corelib/io/qprocess_win.cpp src/corelib/json/qjsonarray.cpp src/corelib/tools/qsimd_p.h src/corelib/tools/qtimezoneprivate_p.h src/corelib/xml/qxmlstream_p.h src/gui/kernel/qsimpledrag.cpp src/gui/kernel/qsimpledrag_p.h src/plugins/generic/generic.pro src/plugins/platforms/cocoa/qcocoamenu.mm src/widgets/styles/qmacstyle_mac.mm tests/auto/concurrent/qtconcurrentmap/BLACKLIST tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qmessagebox/BLACKLIST Change-Id: I508d686cf20f7f8cc6a7119b9bc7c3bbb505c58e
| * | Do a static_cast in bit-blasts that are UBVille Voutilainen2018-01-252-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this, building Qt and Qt applications fails with GCC 8. The errors look like this: writing to an object of type ‘class QPointer<QQuickPointerHandler>’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess] Task-number: QTBUG-65691 Change-Id: Ie5a30814125deca7a160b9a61f5aa3f944ee1ac9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Fix typosJarek Kobus2018-02-131-1/+1
| | | | | | | | | | | | | | | Change-Id: Id625efea998f2b4dce9970b903830dc3b3efcd3d Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | Unalias some core drawhelper loopsAllan Sandfeld Jensen2018-02-062-63/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some compilers will assume src and buffer are different and only vectorize the unaliased case and take a slow path when they are equal. In our case they are as often equal, so we need to manually unalias the variables to make sure both cases are fully optimized. Change-Id: I6ec86171dd179844facdf45376253c55980d9e36 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Fix broken rendering of RGB30 and ARGB32 on machines with AVX2Allan Sandfeld Jensen2018-01-271-2/+2
| | | | | | | | | | | | | | | | | | | | | Two small changes late in the review process were flawed. Change-Id: I4b1f6e3fdb8e17000a2e11bc30aae1b29d9f43a9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-202-1/+4
|\ \ \ | | |/ | |/| | | | | | | | | | | | | Conflicts: tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: If089d5010d15c33b3c1f13912d4386207456c1a9
| * | Skip arm pixman drawhelpers on windows just like on iosMartin Storsjö2018-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows on arm (which uses clang, or msvc, but no gcc is available for that setup) can't assemble these sources. (On linux, builds with clang force deferring it to the external assembler, but for windows on arm, no gas compatible external assembler is available). Change-Id: I139572257884cfdc57d3c32061a8c2e28c6e24de Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Tor Arne Vestbø2018-01-161-0/+3
| |\| | | | | | | | | | Change-Id: I896b0cf54f317c4336cc3d3db319a0b89e421728
| | * Warn when ending painting on backingstore while there's still an active painterTor Arne Vestbø2018-01-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no way for the backingstore to end painting on the device by itself, so we warn the user about what's going on. Failing to end painting on the device will e.g. in the case of QRasterBackingStore result in having to make a copy of the QImage data during flush. Change-Id: I3fbac2d7a8a440fdb23197ac2d57d95bfaf9e125 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | Use QColor(0, 0, 0, 0) to mark body text in QStaticTextIgor Mironchik2018-01-201-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QStaticTextPrivate::paintText() now uses QColor(0, 0, 0, 0) to mark body text. QPainter's pen color was used before this commit (that was always black) that leads to different colors of body text if, for example, links are in body (first block painted with correct color set by QPainter::setPen() but after link body text was always black). Now QPainter::drawStaticText() will draw body text with set pen in any case. [ChangeLog][QtGui][Important Behavior Changes] Fixed a bug where QStaticText would not use the QPainter's pen color for text when other text colors were also in use. Internally this reserves QColor(0, 0, 0, 0) for use with QStaticText. Task-number: QTBUG-45957 Change-Id: If3e180e3083cdac1b4236e738acd15572f19ab69 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | doc: Add missing return types to \fn commandsMartin Smith2018-01-183-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Added void return type to several \fn commands. The return type should always be included with the \fn command in clang-qdoc. Change-Id: Ie751eb1430eff668f33f8d86e0b1454bd1d2f582 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | Add AVX2 optimized versions of the most basic RGB64 compositionsAllan Sandfeld Jensen2018-01-043-2/+189
| | | | | | | | | | | | | | | | | | | | | Speeds up RGB30 and ARGB32-unpremul painting. Change-Id: I419afdf5c26ceffc0f7557b8f196035056178c9a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-028-20/+43
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Lars Knoll2017-12-302-4/+8
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/win32-g++/qmake.conf src/corelib/global/qglobal_p.h src/corelib/global/qoperatingsystemversion_p.h src/corelib/io/qfilesystemengine_win.cpp src/network/bearer/qbearerengine.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/widgets/kernel/qwidget_p.h src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qfusionstyle.cpp tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Change-Id: I80e2722f481b12fff5d967c28f89208c0e9a1dd8
| | * macOS: Enable using CoreGraphics helper functions from C++ sourcesTor Arne Vestbø2017-12-141-3/+7
| | | | | | | | | | | | | | | Change-Id: If32c96d224bfb90ba22661b6f5ac3c920acb39d2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * QColor: write signed 64-bit integer in a platform-independent wayDongmei Wang2017-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building Qt 5.6.2 with gcc 4.1.2 on Fedora 8, a compilation error happened when compiling the code below QColor::name() { ... case HexArgb: return QLatin1Char('#') + QString::number(rgba() | 0x100000000, 16).rightRef(8); ... } qtbase/src/gui/painting/qcolor.cpp:527: error: integer constant is too large for ‘long’ type gcc 4.1.2 was unable to handle 0x100000000. The patch is to use Q_INT64_C to append "LL" to 0x100000000 to avoid the compilation error. Change-Id: I000e65a5c897ef2d78fcfe4e212d832eb488a762 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
| * | Fix drawing color fonts with shear and perspective transformsAllan Sandfeld Jensen2017-12-201-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the fallback painting used with complex transforms to be able to handle color bitmap fonts which can't be converted to a path. Change-Id: Id2851607f673b8fc1aea63f92043d0cdebc0fb9d Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * | Mask potentially undefined alpha in blend_transformed_argbAllan Sandfeld Jensen2017-12-161-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Makes sure the ARGB32PM that is painted on always have a defined alpha. Task-number: QTBUG-55645 Change-Id: Ifcf5fcc2127d255518eca4763845a197da6c7914 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * | Paint text decoration where the text isAllan Sandfeld Jensen2017-12-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For multi text-item texts we should render the text decoration at the same position as the text-item part is, and not always from the beginning of the line. Task-number: QTBUG-60422 Change-Id: I9aa58fc164122ad1fae9716b8b18bdfbbbd778a9 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * | Improve readability of code that uses the Qt signed size typev5.10.0-rc2Simon Hausmann2017-11-284-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the container BoF session at the Qt Contributor Summit 2017 the name of the signed size type became a subject of discussion in the context of readability of code using this type and the intention of using it for all length, size and count properties throughout the entire framework in future versions of Qt. This change proposes qsizetype as new name for qssize_t to emphasize the readability of code over POSIX compatibility, the former being potentially more relevant than the latter to the majority of users of Qt. Change-Id: Idb99cb4a8782703c054fa463a9e5af23a918e7f3 Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: David Faure <david.faure@kdab.com>
* | | macOS: remove existing color-profile handling codeMorten Johan Sørvig2017-12-152-104/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Update usage of QFontMetrics::width() to new APIEskil Abrahamsen Blomfeldt2017-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | 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>
* | | 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>