summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
Commit message (Collapse)AuthorAgeFilesLines
* qdrawhelper.cpp: Fix constexpr build with MSVC 2015 Update 1Thiago Macieira2015-11-181-7/+7
| | | | | | | error C2397: conversion from 'uint' to 'uchar' requires a narrowing conversion Change-Id: Ic1b9e0a78b2faa5a0ae4e6de33ab2ee4b654af5f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Set private inline QRgba64 methods always inlineAllan Sandfeld Jensen2015-11-061-6/+6
| | | | | | | By setting them always inline we ensure they will never generate symbols. Change-Id: I2c815c4fe2cb498187656e0b25ef4499258885ff Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* QDataBuffer: disable copy special member functionsMarc Mutz2015-10-311-0/+1
| | | | | | | | | | | The compiler-generated ones would break class invariants. This internal class so far isn't copied. This patch makes sure that it stays that way. Change-Id: I8bf75058edaf2adf148ae9edff4bf4e9a3b3368d Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* src/gui/painting/painting.pri: add missing qdatabuffer_p.hMarc Mutz2015-10-291-0/+1
| | | | | Change-Id: I40ae6beb14058948030e63a2535ff72a6b8072c1 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* QPathSegments::Intersection: reduce struct size 24 -> 16 bytesMaks Naumov2015-10-262-4/+3
| | | | | | | Only for systems where qreal is double(8 bytes). Change-Id: I3fd6b5d4279c41102ead24eef287bb37847398c1 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix alignment in qConvertARGB64PMToA2RGB30PM_sse2Frederik Gladhorn2015-10-231-2/+1
| | | | | | | | _mm_load_si128 requires 16 byte alignment. This crashes on 32 bit Windows builds. Change-Id: Ib6c30eba726747bbab56467eada820521981a80c Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Compile the 64-bit version of some code on all 64-bit processorsThiago Macieira2015-10-231-2/+2
| | | | | | | This is true for ILP32 on x86-64, IA-64 and AArch64. Change-Id: I1d0f78915b5942aab07cffff140f9d4c277bb5d4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Convert some QDateTime::currentDateTime() to currentDateTimeUtc() (I)Marc Mutz2015-10-231-1/+1
| | | | | | | | | | | | | | | The latter is much faster as it doesn't have to deal with time zones. This change handles the trivial ones: Either the call to currentDateTime() is immediately followed by a call to toUTC() or toTime_t(). The latter is much faster on UTC QDateTimes, too. Credits to Milian Wolff, from whose QtWS15 talk this advice is taken. Change-Id: I872f5bbb26cbecedc1e5c0dbee4d5ac2c6eb67ee Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* Respect QPen::dashOffset when generating PDFLars Knoll2015-10-221-3/+3
| | | | | | Change-Id: I26de1cd4a14d1b8978be6d0377cb2cba573fc82a Task-number: QTBUG-47164 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Fix warning message to match the function signatureLars Knoll2015-10-221-2/+2
| | | | | | Change-Id: Ie21d63e29351dae9a52998e3d1068500e502ec5a Task-number: QTBUG-46693 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Fix alignment issues on 32 bit in qConvertA2RGB30PMToARGB64PM_sse2 and ↵Frederik Gladhorn2015-10-221-5/+10
| | | | | | | | | | | qConvertARGB32PMToARGB64PM_sse2 On 32 bit platforms the pointers may end up being 4 byte aligned. Happens with MSVC on 32 bit Windows. _mm_store_si128 is documented to require 16 byte alignment. Change-Id: I80737fedf9e7f436a51a83924117cc0bc63017cc Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* Avoid image copy in toTexture() on GLES 3.0 as wellLaszlo Agocs2015-10-141-12/+17
| | | | | | | | | | | | | | | | The default backingstore implementation is now cleaned for ES_2 ifdefs. All the checks are now done at runtime and ES 3.0+ is included as well for the efficient, QImage::copy()-less path. For embedded a customized backingstore is used so the change has to be done separately there. This should result in a slight improvement for QOpenGLWidget/QQuickWidget when running on GLES 3.x. Task-number: QTBUG-37624 Change-Id: I107330c25a993c5cdcd92e4ebdc17ae172a03da8 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Libraries: Fix single-character string literals.Friedemann Kleint2015-10-131-1/+1
| | | | | | | Use character literals where applicable. Change-Id: I8e198774c2247c1cc1d852a41b59b301199b7878 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* DirectFB: Use correct pixel format for Texture Glyph CacheAndy Nichols2015-10-121-2/+2
| | | | | | | | QImage::Format_Indexed8 -> QImage::Format_Alpha8 Change-Id: I7faa7c9d2cb20306f63a2522e7fa78736b9ee583 Task-number: QTBUG-47490 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-022-2/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/tools/qstring.h src/gui/image/qimagereader.cpp src/network/access/qnetworkaccessmanager.cpp src/tools/qdoc/doc/examples/examples.qdoc src/widgets/accessible/qaccessiblewidgetfactory_p.h src/widgets/doc/qtwidgets.qdocconf Change-Id: I8fae62283aebefe24e5ca4b4abd97386560c0fcb
| * Fixed pageLayout, pageSize, pageOrientation, pageMargins for QPdfWriterOliver Wolff2015-09-221-1/+2
| | | | | | | | | | | | | | Task-number: QTBUG-46887 Change-Id: I8f1497a8b7ff13213879de01fcdfcabfdd471874 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * Another fix of cosmetic QPainter::drawPolyline()Eirik Aavitsland2015-09-011-1/+2
| | | | | | | | | | | | | | | | | | | | At the edge of the view, a line segment could end up as not producing any pixels even if not clipped by the floating-point clip routine. Make sure the starting point for the next line is still updated correctly for any significant segment lengths. Change-Id: I381a4efb81ce6006f3da4c67abf279aea79e4663 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Fix missing "We mean it" in qtbase private headersThiago Macieira2015-10-011-0/+11
| | | | | | | | | | Change-Id: I42e7ef1a481840699a8dffff1408dfd4fd9c8e32 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Use a power of two division factorAllan Sandfeld Jensen2015-09-241-1/+1
| | | | | | | | | | | | | | | | | | Using a power of 2 instead of power of 10 means the result of the division can be accurately represented as a floating point instead of being an approximation that could lead to rounding errors. Change-Id: I8910c06113ec6b69c60ff95d59894bfb56133186 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | Fix up QOpenGLWidget transparency supportLaszlo Agocs2015-09-241-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The glColorMask call was troublesome. In addition, the Qt::WA_TranslucentBackground was misinterpreted and recommended misleadingly in the documentation. The hellogl2 example's --transparent argument was disfunctional in practice. Replace glColorMask with glBlendFuncSeparate. The hellogl2 example and the docs are now corrected wrt enabling semi-transparency in a QOpenGLWidget that is not a top-level (which is the most common case). Task-number: QTBUG-47276 Change-Id: I6f40e732d455f5efcf158649ac9a52ff9f240e85 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Reorganize the bits for the CPU feature detectionThiago Macieira2015-09-221-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of trying to detect one bit and set another, let's just use the bits from the x86 CPUID instruction on x86. This makes use of the full 64-bit space now. Since MSVC doesn't like enums bigger than 32-bit, we have to store the bit number instead of the actual bit value in the constant. For that reason, I also renamed the constants, to catch anyone who was using them directly, instead of through qCpuHasFeature. Change-Id: Ib306f8f647014b399b87ffff13f1d587692d827a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix qdoc warnings of QRgba64.Friedemann Kleint2015-09-111-1/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | qtbase/src/gui/painting/qrgba64.h:107: warning: No documentation for 'QRgba64::isOpaque()' qtbase/src/gui/painting/qrgba64.h:112: warning: No documentation for 'QRgba64::isTransparent()' qtbase/src/gui/painting/qrgba64.h:121: warning: No documentation for 'QRgba64::setAlpha()' qtbase/src/gui/painting/qrgba64.h:119: warning: No documentation for 'QRgba64::setBlue()' qtbase/src/gui/painting/qrgba64.h:118: warning: No documentation for 'QRgba64::setGreen()' qtbase/src/gui/painting/qrgba64.h:117: warning: No documentation for 'QRgba64::setRed()' qtbase/src/gui/painting/qrgba64.h:163: warning: No documentation for 'QRgba64::operator=()' Change-Id: Ic6f6a8415b8ad33917e460737824fc8856776de1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Fix some qdoc warnings.Friedemann Kleint2015-09-071-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtbase/src/corelib/io/qdebug.cpp:698: warning: Class QDebugStateSaver has no \inmodule command; using project name by default: QtCore qtbase/src/gui/opengl/qopenglframebufferobject.cpp:1138: warning: Can't link to 'takeTextures()' qtbase/src/gui/opengl/qopenglframebufferobject.cpp:1159: warning: Can't link to 'takeTextures()' qtbase/src/gui/opengl/qopenglframebufferobject.cpp:953: warning: No such parameter 'height' in QOpenGLFramebufferObject::addColorAttachment() qtbase/src/gui/opengl/qopenglframebufferobject.cpp:953: warning: No such parameter 'width' in QOpenGLFramebufferObject::addColorAttachment() qtbase/src/gui/opengl/qopenglframebufferobject.cpp:953: warning: Undocumented parameter 'size' in QOpenGLFramebufferObject::addColorAttachment() qtbase/src/gui/painting/qpaintdevice.qdoc:80: warning: Undocumented enum item 'PdmDevicePixelRatioScaled' in QPaintDevice::PaintDeviceMetric qtbase/src/testlib/qbenchmarkmetric.cpp:154: warning: Invalid use of '\relates' (already a member of 'QTest') qtbase/src/testlib/qbenchmarkmetric.cpp:81: warning: Invalid use of '\relates' (already a member of 'QTest') qtbase/src/widgets/dialogs/qdialog.cpp:152: warning: Can't link to 'QCloseEvent::ignore()' qtbase/src/widgets/dialogs/qdialog.cpp:557: warning: Can't link to 'QApplication::quit()' qtbase/src/widgets/kernel/qwidget.cpp:8326: warning: Can't link to 'QCloseEvent::accept()' qtbase/src/widgets/kernel/qwidget.cpp:8326: warning: Can't link to 'QCloseEvent::ignore()' qtbase/src/widgets/kernel/qwidget.cpp:9300: warning: Can't link to 'QWheelEvent::accept()' qtbase/src/widgets/kernel/qwidget.cpp:9300: warning: Can't link to 'QWheelEvent::ignore()' qtbase/src/widgets/kernel/qwidget.cpp:9321: warning: Can't link to 'QTabletEvent::accept()' qtbase/src/widgets/kernel/qwidget.cpp:9321: warning: Can't link to 'QTabletEvent::ignore()' qtbase/src/widgets/kernel/qwidget.cpp:9373: warning: Can't link to 'QKeyEvent::ignore()' Change-Id: I97ae85398181645c1054c303e5c8a87deb619409 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6Simon Hausmann2015-08-272-15/+18
|\ \
| * | Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-08-262-15/+18
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/snippets/code/doc_src_qmake-manual.pro qmake/doc/src/qmake-manual.qdoc src/corelib/io/qstorageinfo_unix.cpp src/corelib/tools/qbytearray.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/corelib/io/qprocess/tst_qprocess.cpp tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp tests/auto/network/access/qnetworkreply/BLACKLIST Change-Id: I9efcd7e1cce1c394eed425c43aa6fce7d2edf31c
| | * QRasterPaintEngine: Don't detach QImageSérgio Martins2015-08-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Caught being detached a few thousand times per second. Change-Id: I6dd5fd69d7d4f32048cdb7e4ac707f24df6c15f8 (cherry picked from commit 2a81516835c680c29f3de9241a8c28027624ce4f) Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| | * Fix potential SIGFPEs in QRasterizer::rasterizeLine()Joni Poikelin2015-08-181-14/+14
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-46985 Change-Id: If9897a6d4014dbcbc1f6cac1c6dd5dc648694b96 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| | * Fix out-of-buffer read on image upscaleAllan Sandfeld Jensen2015-08-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid reading from the next pixel when the sample is fully based on the current pixel. This is particular important for the last pixel in an image when the next pixel might be outside the image buffer. Change-Id: I3607f9c6c332d11ff944ca35d216d417368f9fd5 Task-number: QTBUG-47228 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | Optimize set color component in RGBA64Allan Sandfeld Jensen2015-08-271-9/+9
|/ / | | | | | | | | | | | | | | After the removal of direct access through type punning, the direct color setters can be better optimized. Change-Id: Icaa5b1f8c8fe90863dd42fa4dfb5a2998c273465 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Fix double initialization of QRgba64 with C++14Allan Sandfeld Jensen2015-08-241-23/+24
| | | | | | | | | | | | | | | | | | Use constructors with C++11/C++14 where it is allowed to avoid hack that caused double initialization and thereby performance regression with C++14. Change-Id: I7ae86df8aa34000b2c186e22bd9917303354b794 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Make QT_SCALE_FACTOR work on WaylandMorten Johan Sørvig2015-08-131-1/+2
| | | | | | | | | | | | | | | | Propagate the line stride when creating the high-dpi backing store image. Change-Id: I15f41965d8eaf1d01ddac0a1a012b71148f757e3 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | Remove type punning from QRgba64.Erik Verbruggen2015-08-111-49/+68
| | | | | | | | | | | | | | | | | | | | | | | | In C++, type punning with a union is not allowed. It will result in compiler defined behavior at best, and undefined behavior at worst. Specifically, if QRgba64 is passed to a function by value, the different members of a struct might be passed in separate registers. This means that any write to the quint64 might not blank out the values of the struct whenever the compiler looses track with TBAA. Change-Id: I991b5492fe4bb13a14bb670fef5bf13dacbe6c0a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Move Q_ALWAYS_INLINE next to Q_NEVER_INLINE in qglobal.h.Erik Verbruggen2015-08-111-3/+0
| | | | | | | | | | Change-Id: I7e3b7ecca6b5f142fa6cb5db2e9521ed3212afe8 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Fix repremultiply from RGB64 to RGB30Allan Sandfeld Jensen2015-08-113-218/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Just like from RGB32 to RGB30 we must also repremultiply when converting from RGB64 because the alpha channel loses more precision than the other color channels. Since this is not approximated accurately in the simple blending functions and the functions are no longer needed now the main render engine supports higher accuracy, the simple blending routines for RGB30 have been removed. Change-Id: I2b7b8eb015e330a487848fc4370ad3a1e966be91 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/devTimur Pocheptsov2015-08-094-5/+23
|\ \
| * | Merge remote-tracking branch 'origin/5.5' into devFrederik Gladhorn2015-08-064-5/+23
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/global/qt-cpp-defines.qdocconf src/3rdparty/forkfd/forkfd.c src/corelib/codecs/qtextcodec.cpp src/corelib/kernel/qmetatype.cpp src/corelib/tools/qset.qdoc src/gui/accessible/qaccessible.cpp src/gui/image/qpixmapcache.cpp src/opengl/qgl.cpp src/tools/qdoc/generator.cpp src/widgets/kernel/qwidget.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I4fbe1fa756a54c6843aa75f4ef70a1069ba7b085
| | * fix build with no built-in image handlersOswald Buddenhagen2015-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the handlers' .pri files added $$PWD to INCLUDEPATH to make the files self-contained when used externally, but this polluted the include path of the gui module itself, thus hiding incorrect use of QPA includes. Task-number: QTBUG-47400 Change-Id: I576469a71e8ded0b409d62687999c0fa884613f9 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| | * QPdfEnginePrivate - fix for '-qreal float' build.Timur Pocheptsov2015-07-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Literals 1. or 0. have type double, but QGradientStop.first is qreal and thus can be float depending on platform/configuration, making qBound call invalid (qBound(0., qreal_value, 1.) for example). Change-Id: Idab668d417a148bffe2495009ae700de980b73cc Task-number: QTBUG-47319 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| | * Doc:added doc to undocumented functionsNico Vertriest2015-07-222-0/+18
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-36985 Change-Id: Ic358682b276d67ef804f727bcf14191718613469 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | | Add support for drawing a hyperlink in QPdfEngineAntonin Stefanutti2015-08-062-0/+30
|/ / | | | | | | | | | | | | | | | | | | | | Adds the drawHyperlink method so that clients can draw a hyperlink pointing to the specified URL at the specified rectangle. That new method is to be used by GraphicContext::setURLForRect implementations that want to render anchors as clickable links in PDF documents. Task-number: QTBUG-44563 Change-Id: I7b0c602da37ee157d18115c531ab1b11fe304c13 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Fix for build with -qreal floatTimur Pocheptsov2015-08-041-2/+2
| | | | | | | | | | | | | | | | | | Resolve ambiguity with function calls (due to double->float conversion), use qreal where needed intead of explicit 'double'. Change-Id: I28f1fb4a2b424b1399fb082a36ba9cff666f7c62 Task-number: QTBUG-47433 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Introduce cross platform high-dpi scalingMorten Johan Sørvig2015-07-301-5/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a coordinate scaling layer to QtGui, which supports 'devicePixelRatio' type high-dpi on all platforms, in production and also for development and testing purposes. High-DPI scaling is opt-in, by setting environment variables: QT_SCALE_FACTOR - sets a global scale factor QT_AUTO_SCREEN_SCALE_FACTOR - sets per-screen scale factors, where the scale factors are provided by the platform plugin. This QtGui scaling can be used instead of or in addition to scaling done by the window system. This distinction is not visible to applications [when they use Qt API], which will see a change in the value returned by the devicePixelRatio() accessors as usual. Introduce a new (private to Qt) coordinate system: native pixels. The coordinate system stack now looks like: device-independent pixels (app, upper parts of Qt) native pixels (lower parts of Qt Gui, platform plugins) device pixels (backing stores and OpenGL) Add private QHighDpi namespace with scaling functions that convert between device-independent pixels and native pixels: T toNativePixels(T, QWindow *); T fromNativePixels(T, QWindow *); Add scaling calls the QWindow (and friends) cross-platform implementation, around the calls to QPlatformWindow functions. QPlatformWindow now uses native coordinates - platform code remains largely unchanged since native coordinates are window system coordinates. QWindow now uses (possibly) scaled coordinates. This means that platform plugins no longer can rely on QWindow::geometry() and related functions. QPlatformWindow::windowGeometry() and other convenience functions have been added for use when the platform plugin needs to convert scaled geometry to native geometry. Add Qt::AA_NoHighDpiScaling, which can be use to disable any scaling in QtGui, effectively ignoring the environment variables. (Note that this does not disable any scaling done by the window system.) Contributions from Friedemann and Paul. Task-number: QTBUG-46615 Change-Id: I673bbd69c130e73b13cce83be11bfb28f580bf60 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Enable non-integer device pixel ratioMorten Johan Sørvig2015-07-306-8/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Work around QPaintDevice::metric's int return type by adding a new metric that returns a scaled devicePixelRatio. Choose a scale factor that gives us more than enough range. The QPaintDevice::devicePixelRatio() convenience accessor is public API and can unfortunately not be changed to return a qreal. Add devicePixelRatioF() which returns the (unscaled) devicePixelRatio. Change all call sites of QPaintDevice::devicePixelRatio() to use QPainDevice::devicePixelRatioF(). Task-number: QTBUG-46615 Change-Id: I97ec4000fe379b7ff5e1624a871ae2512790aad9 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QColor: make nothrow move-assignable and -constructibleMarc Mutz2015-07-222-4/+18
| | | | | | | | | | | | | | | | | | The move special members were inhibited by the presence of user-defined copy ctor and assignment operator, which we cannot remove since the class is exported. Change-Id: I54fe6c28351fe69ca4b75066adb76ea07c959dfe Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QtGui: Pass types with copy-ctor or dtor by const-refSérgio Martins2015-07-191-1/+1
| | | | | | | | | | | | | | | | | | ... except if the function is a ctor, callers pass rvalues, and the type has a fast move ctor. In that case, keep passing by-value and qMove() into place. Change-Id: I2c0be7d4436327834ddee0531c51c5af352ac74c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Fix nullptr literal 0s which would look odd as nullptrMarc Mutz2015-07-192-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | These all invoke the QFlags<>(Zero *) ctor, which is designed to accept a 0, but no other int. But in doing so, it requires passing a nullptr literal, and 0 is not a nullptr literal accepted under -Wzero-as-null-pointer-constant or similar warnings. Fix by using the QFlags::QFlags() ctor instead. Task-number: QTBUG-45291 Change-Id: I73f9c9f4de11eeb1ba04ace6c7121d17510ea29f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QtGui: Use Q_NULLPTR instead of 0 in all public headersMarc Mutz2015-07-195-15/+15
| | | | | | | | | | | | | | | | | | This is in preparation of adding -Wzero-as-null-pointer-constant (or similar) to the headers check. Task-number: QTBUG-45291 Change-Id: I72ab40b21a9499b53a639564fa45884de17b6c98 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QPlatformBackingStore: don't hold QBackingstoreTextureInfo in QListMarc Mutz2015-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | QBackingstoreTextureInfo is larger than a void*, so holding them in a QList is needlessly inefficient. Worse, the code could come to depend on the fragile property of (inefficient) QLists that references to elements therein never are invalidated. Change-Id: I5edf846ee8f01ae36c9314147261748270e1fdf6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | QPolygon(F): add some move ctorsMarc Mutz2015-07-161-2/+10
| | | | | | | | | | | | Change-Id: Ib0eb071e371a7198db26d4279bb901e49b3da2fe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-07-0110-18/+124
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qglobal.h src/corelib/global/qsysinfo.h src/corelib/global/qsystemdetection.h src/corelib/kernel/qobjectdefs.h src/plugins/plugins.pro tests/auto/widgets/itemviews/qlistview/qlistview.pro Change-Id: Ib55aa79d707c4c1453fb9d697f6cf92211ed665c