Commit Graph

31473 Commits

Author SHA1 Message Date
Laszlo Agocs
5bb4d06494 Add support for custom texture format in QOpenGLWidget
...in order to support sRGB framebuffers.

Add a --srgb option to the qopenglwidget example to allow testing.

[ChangeLog][QtWidgets][QOpenGLWidget] Added support for specifying
custom internal texture formats in QOpenGLWidget in order to make it
possible to have the widget backed by an sRGB-capable framebuffer.

Task-number: QTBUG-50987
Change-Id: I112e2f0ab0b1478c69e601031aa0bafaa87fa847
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-02-26 20:06:07 +00:00
Laszlo Agocs
931e4ae665 Support windows with sRGB-capable default framebuffers in QSurfaceFormat
Backend implementation is done for GLX for now. WGL and EGL may follow
later on.

[ChangeLog][QtGui] Added support for requesting OpenGL windows with
sRGB-capable default framebuffers. While this is implicit on some
platforms, QSurfaceFormat now has the necessary flags to request
such windows in a cross-platform manner.

Task-number: QTBUG-50987
Change-Id: I4df1f786e41e63396f46920a81afdf5ecb5eedea
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-02-26 20:06:03 +00:00
Simon Hausmann
d5078161aa Speed up QFile::copy on Linux file systems that support cloning
Originally inherited from Btrfs, recent Linux kernels have a system call
that allows cloning the contents of a file from another one if the
underlying file system supports it.

Change-Id: I9df66b65faef99f3bbed8a88fb6b6009baeef32e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-24 11:35:25 +00:00
Cédric Cabessa
f971a0d65c Fix proxy when changing only the password
QHttpThreadDelegate doesn't take into account the password to compute the
key of the networkconnection hash. So if only the password for a proxy has
changed, the wrong data gets used for the connection.

This patch simply adds proxy->password() to the key.

Here are the steps to reproduce the bug:
 * Use an authentified proxy and provide the correct username but a wrong
password

```
 QNetworkAccessManager networkAccessManager;
 QNetworkProxy proxy(QNetworkProxy::HttpProxy, PROXY_HOST, PROXY_PORT,
                     "goodusername", "badpassword");
 networkAccessManager.setProxy(proxy);
``

 * As expected, the reply returns ProxyAuthenticationRequiredError

 * Using the same QNetworkAccessManager, setup a new proxy with the
correct credential:

```
 QNetworkProxy proxy(QNetworkProxy::HttpProxy, PROXY_HOST, PROXY_PORT,
                     "goodusername", "goodpassword");
 networkAccessManager.setProxy(proxy);
```

 * The reply still returns ProxyAuthenticationRequiredError

[ChangeLog][QtNetwork] Fix proxy-authentication issue, after a wrong password
has been used, when supplying the right password.

Change-Id: Id3b5a2ce71fda81780f3ef2568a73d0022b38815
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-02-24 11:28:29 +00:00
Pier Luigi Fiorini
30b829a5a9 eglfs_kms: Mode support
Add support for reporting available modes.

[ChangeLog][QPA][eglfs][kms] List screen modes, current and preferred mode.

Change-Id: If64c1512271fadbafbb8c9fd715e64663d598599
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-02-24 10:08:09 +00:00
Jesus Fernandez
78236be8d7 Fix infinite loop
CID 176641:  Control flow issues  (STRAY_SEMICOLON)
A "while" statement with no block followed by a stand-alone block
is suspicious.

CID 176639:  Program hangs  (INFINITE_LOOP)
If "dx > 64L" is initially true then it will remain true.

Fixes a bug introduced in 8c31f75fd3.

Coverity-Id: 176641
Coverity-Id: 176639
Change-Id: I5daa563fe94316633f9525583d8addb8864c42c0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-02-24 09:43:23 +00:00
J-P Nurmi
08a84a8af8 Export QIconLoaderEngine::entryForSize() for QQuickIconImage
Let QQuickIconImage re-use entryForSize() so it can easily choose
the appropriate icon without re-inventing the wheel.

Change-Id: I88c7e058113b2fb5a864578d8c66f99f61b4eac3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2017-02-23 21:28:56 +00:00
Giuseppe D'Angelo
f526aa725d Sprinkle Q_DECLARE_TYPEINFO on types used in containers
Change-Id: I6c71ed8c20cd5e785037ad25c2d3da8994e8e3a0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-23 17:43:23 +00:00
Daniel Vrátil
30da659af5 Introduce QMetaType::PointerToGadget flag for pointers to gadgets
A Q_GADGET class can be used both as a value class and a pointer, but
right now QMetaType::IsGadget is only set for value types. This change
introduces PointerToGadget metatype flag which is set for pointers.

This allow for better handling of gadgets in code as well as
disambiguating between value types and pointers to value types.

Change-Id: Id3bd9e18a8eec7ca1cc6b1c25ed03cdc8c0a75a1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-02-23 16:58:47 +00:00
Edward Welbourne
0b822c2209 Examples: use std::atan2 for simper angle calculations
Using std::atan2 gets the right answer directly from dy and dx,
without having to fix up quadrant as we needed to with acos (albeit we
have to negate dy in some cases, to match prior sense of angles).  In
the process, it avoids explicit division, which would be an error when
the line's length is zero.

Change-Id: Ia2923159d38834e08e6f15cbff6766ed419fa804
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-02-23 16:43:35 +00:00
Alexander Volkov
89870a35bd xcb: Wrap xcb callings in macros
... to improve readability and reliability.

This change introduces macros Q_XCB_REPLY and Q_XCB_REPLY_UNCHECKED
that allow to replace couples of xcb cookie/reply callings by
a single "calling" of a macro. The macros wrap the reply in
std::unique_ptr thus preventing the need to free it manually.

The following C++11 features are used:
  - variadic macros
  - std::unique_ptr
  - auto type deduction

Change-Id: Icf9b93353404a39bf5f4a4562b9234db18cac696
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2017-02-23 13:05:36 +00:00
Lorenz Haas
2a3297c726 REGEXP for SQLite
Since SQLite does not define a regexp function by default, provide a Qt
based implementation which can be enabled using QSQLITE_ENABLE_REGEXP as
an connect option. This way statements like

SELECT * FROM table WHERE col REGEXP '^[a-d]';

work out of the box.

[ChangeLog][QtSql] Add QSQLITE_ENABLE_REGEXP connect option for
QSQLiteDriver. If set a Qt based regexp() implementation is provided
allowing to use REGEXP in SQL statements.

Task-number: QTBUG-18084
Change-Id: I7f0e926fe4c5d6baea509f75497f46a61ca86679
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Sebastian Sauer <sebastian.sauer@kdab.com>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-02-22 21:14:23 +00:00
Giuseppe D'Angelo
56723c6e91 QTypeInfo: make long double primitive in Qt 6 on Darwin
I don't know the historical reasons for that, but C++11 mandates
long double as a type. On Darwin this means that long double
was a complex type, so the best for now is to mark it relocatable.

Change-Id: Ic933947a282ad963d5d0168c2768cc98fdd456bc
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-22 20:39:06 +00:00
Marc Mutz
dbfde461ed tst_QProgressBar: add a case for INT_MIN/INT_MAX to setValueRepaint()
Convert the function to be data-driven, then add cases for ranges with
limits INT_MIN, INT_MAX and zero to check for overflows in the
painting code. Speed up the function by removing the per-iteration
qWait() call and rely solely on the existing QTRY_VERIFY() to do the
right thing.

Change-Id: I6d2a2c2b7637fca7ddb2a9adc5f6550f8255da14
Reviewed-by: David Faure <david.faure@kdab.com>
2017-02-22 13:55:51 +00:00
Alexander Volkov
d4ae7d39c8 xcb: Move QXcbConnection::xi2*() methods() to qxcbconnection_xi2.cpp
Change-Id: I7af7bd7590b95f6092fcca718931b1f1462c0ae5
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2017-02-22 13:40:05 +00:00
Edward Welbourne
8012f38379 Tidy the long lists of files in Makefile.unix
In the source list, put one file on each line, sort alphabetically
within each of several blocks (preserving the order of those blocks),
add missing entries for which we have rules.  Document where QTSRC and
friends come from, eliminate duplication between their entries and
DEPEND_SRC (which pulls them in anyway).  Document strays not in OBJS
or QOBJS, fix qmake.pri to add to SOURCES not OBJECTIVE_SOURCES.
Put OBJS and QOBJS entries in the order that matches DEPEND_SRC.

Change-Id: Id38cccd9b1f849a865a265bc0e6ce4c426c42eea
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-02-22 08:38:58 +00:00
Thiago Macieira
0f1b6acab7 x86: Add detection of the AES and SHA New Instructions
The AES instructions were first introduced with the Westmere shrink
(22nm) of the Nehalem architecture. The SHA instructions are still
pending on Intel architecture, but is available on AMD family 17h (gcc
argument -march=znver1).

Both features operate on SSE registers, so that's why the MSVC command-
line argument is the SSE2 one and the configure-time tests depend on
features.sse2.

The qmake feature names end in "ni" because "aes" and "sha" are too
simple and could clash with other uses. The QT_COMPILER_SUPPORTS_ macro
doesn't have the "NI" suffix because it has to match the GCC/Clang
predefined macro.

Change-Id: I445bb15619f6401494e8fffd149dbd1f862ff51c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-02-21 23:48:30 +00:00
Marc Mutz
db1c8553a1 QMimeTypeParser: remove unused QPair include
Change-Id: Idd75cc4f9e9bfb675ba973498321d0d7884a591d
Reviewed-by: David Faure <david.faure@kdab.com>
2017-02-21 22:46:13 +00:00
Robert Mancoast
b5a7746571 linux-icc-k1om build
Change-Id: I6262b14640118482621c95c3988c068cf72271d8
Reviewed-by: Robert Pancoast <RobertPancoast77@gmail.com>
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
2017-02-21 14:27:16 +00:00
Edward Welbourne
d345429967 Join two else/if lines that were left split
Probably after-effects of some #if-ery we removed long ago ...

Change-Id: I8bf7a97dc5fda615bf20c37ccd9c1de0ba9194e5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-02-21 13:40:21 +00:00
Alexander Volkov
538b9f504c xcb: Remove XIproto.h include from qxcbxsettings.cpp
It indirectly includes X.h with LSBFirst and MSBFirst macros.
Use XCB_IMAGE_ORDER_LSB_FIRST and XCB_IMAGE_ORDER_MSB_FIRST
macros instead and remove unneeded XCB_USE_XLIB guards.

Change-Id: Ic24c9605d0a627253f2793f9feab6c6e19dcda08
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2017-02-21 13:05:50 +00:00
Liang Qi
bc4cd465dd Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	qmake/Makefile.unix

Change-Id: Ia18e391198222eef34ffa2df6f683e052058d032
2017-02-17 20:10:34 +01:00
Frederik Schwarzer
07745d7bfb Fix typo in apidoc.
Change-Id: Ibd71c1ed653769637aa176dfb52c4594141be8ce
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-02-17 16:47:21 +00:00
Paul Olav Tvete
d995f0fe09 Build fix for new feature -qt-no-processenvironment
Change-Id: I6d1c5d122761d239d96b943a9abf7af12195a3eb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-02-17 14:41:34 +00:00
Paul Olav Tvete
983ffeb9ff Build fix for -no-feature-datestring
Change-Id: I09c7bc360956aef44f4137a093b6329a08a099ee
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-17 14:41:19 +00:00
Giuseppe D'Angelo
43daefb096 QStringListModel: fix corner-case in sibling()
A negative row can be passed but should not result in a
spurious index returned.

Change-Id: I57f180615020d24826e9b3807557ba172ed469c3
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-02-17 13:33:36 +00:00
Edward Welbourne
d36e472aea Use QMKGENSRC a bit more to save some repetition
Also split a long list of -I flags so that "for each platform" dirs
all land on the same line, rather than breaking part way through the
platform list.

Change-Id: I855f6b152567bc2031e08361d2b02a788df8287e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-02-17 12:08:56 +00:00
Edward Welbourne
27d5cc2ceb Be consistent about indentation
Most continuation lines in long variable values indented with a tab
and some space; three used spaces only; make them match the rest.
A foolish consistency is the hobgoblin of my little mind.

Change-Id: I7e51ea830040efe62801e80a49486d26dd2a3978
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-02-17 12:08:47 +00:00
Edward Welbourne
cc7d17ffb3 Fix reference to non-existent file in qmake/Makefile.unix
I found no $(QMKGENSRC)/mac/xmloutput.cpp; but skipping the mac/ in
its name reveals a perfectly good file, that might even be relevant.
It's also the file named in a rule further down the file.

Change-Id: I72b399f9c3c222fc6beed29f2007fe55ba5b8412
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-02-17 12:08:37 +00:00
Edward Welbourne
fde862c1b3 Use $< to save lots of repetition in qmake/Makefile.unix
Change-Id: If9f8d2802e28028cac3a9725970cff831f2e2410
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-02-17 12:08:27 +00:00
Friedemann Kleint
5c3fede153 Windows QPA: Remove debug helper QWindowsMsaaAccessible::IIDToString()
The virtual function was used to output known IIDs by name for
debugging purposes. Add a debug operator for GUID and a wrapper
class with a special debug operator for the accessiblity IIDs.

Change-Id: I24787c6914f5cb0847782928fadb8ed4d3b808a1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-02-17 11:55:11 +00:00
Friedemann Kleint
c25b13cee0 Windows: Introduce helper class for implementing COM interfaces
Task-number: QTBUG-43190
Change-Id: I565e3c57631c32a88ac7598758526c349ddf3312
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-02-17 11:46:26 +00:00
Dmitry Kazakov
abc79baa70 xcb: support graphics tablets with the "uc-logic" name
Similar to support for the other Genius tablets.
https://bugs.kde.org/show_bug.cgi?id=359642

Task-number: QTBUG-52626
Change-Id: I3e2033d547d8bab4b6fb93be3a172bdce4fc5666
Reviewed-by: Dmitry Kazakov <dimula73@gmail.com>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-02-17 09:41:20 +00:00
Liang Qi
e5c3700a61 Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9 2017-02-17 10:36:32 +00:00
Friedemann Kleint
a81dfb32d6 Windows QPA: Call QWSI::flushWindowSystemEvents() from WM_PAINT for full update only
It was introduced by 0719142321
(macOS QML fix) for apparently historical reasons and has been found to
cause various problems:
- Flicker when using QGLWidget in a QSplitter
- (obscure) crashes due to flushing out input events in setVisible().

Task-number: QTBUG-38327
Task-number: QTBUG-39842
Change-Id: I18081da5f4645271774a51f1d6a88e778adbd6ac
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-02-17 08:22:16 +00:00
Tobias Koenig
626edf3c2d Fix rounding errors in generation of '/W' and '/DW' entries
Calculating the glyph widths for '/W' and '/DW' entries in
PDF documents based on QFixed leads to rounding errors, which
result in different glyph widths than the ones store into
the font program.
Use qreal-based calculation in both places, to have consistent
glyph width information across the PDF document.

Change-Id: I761809f4bc586005e35640929c4663c8b477e0e6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-17 08:14:19 +00:00
Friedemann Kleint
8d71fae080 Polish the XML bookmarks examples
- Use Qt 5 connect syntax.
- Streamline code, remove unused members.
- Add a context menu for copying and opening the URLs.
- Add const to XML code.
- In the XML code, show the use of QStringLiteral in static inline
  functions to create strings versus QLatin1String in comparison
  overloads to avoid allocating strings from const char * literals.

Change-Id: Ib5e62ca188e271ffe01996dff3c9ea8e0b60739a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-02-17 05:55:19 +00:00
Tor Arne Vestbø
d19bd1feb6 macOS: Move NSWindow creation properties into createNSWindow()
Allows the block in recreateWindowIfNeeded() that calls createNSWindow()
to focus on how to (re)parent windows/views, while createNSWindow() takes
care of how to set up the window. Dynamic properties that may change later
on are handled in e.g. setWindowFlags().

Change-Id: Ice0e44d004bd2608b2b54e6dde0f404a1e07dc10
Reviewed-by: Mike Krus <mike.krus@kdab.com>
2017-02-16 23:16:28 +00:00
Liang Qi
c577f6edaf Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	src/corelib/plugin/qlibrary_unix.cpp
	src/plugins/platforms/xcb/qxcbconnection.cpp
	tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp

Change-Id: I632c400d909f8c204f55743aadc7886af2f15dfb
2017-02-16 21:51:11 +01:00
Friedemann Kleint
88788667a0 QWindowsVistaStyle: Set theme flag noContent for PE_FrameLineEdit
When the flag is not set, custom background colors for QLineEdit
will not work. Set the flag as does QWindowsXpStyle.

Task-number: QTBUG-57862
Change-Id: I6e653c2cdc8cc523673e1629bf42f833c8504431
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-02-16 19:55:35 +00:00
Marc Mutz
cad9c7cbc9 Use static initialization for QBasicAtomics
A default-constructed static QBasicAtomicInt at function scope
will be dynamically initialized. It will still be zero-initialized,
but at least GCC adds guard variables for such objects.

When using aggregate initialization, the guard disappears.

Amends 04d6495bf7.

Change-Id: Id9335cffdd43094cafb231fdde2523d013abe1d6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-16 19:26:46 +00:00
Timur Pocheptsov
de225ccdf9 QNetworkSession - register types before connecting slots
QNetworkSession's ctor has a race condition: it 1) connects signals/slots
and also 2) registers meta-types (but after these connects). Our users apparently
have a lot of per-thread QNAMs in multiple threads (and implicitly
many QNetworkSessions on different threads too). From error logs it appears
that while one thread tries to connect signals/slots and evaluates the types
of signal and slot arguments, another thread can register this type.
If the first thread extracted signal argument types, then the second
registered this type, we can end up in a 'type mismatch' error on the first
thread with seemingly the same types in a debug message (something like
"type mismatch A::Some <-> A::Some") - they have the same name, but one
has type() == 0 and another - some non-zero type().

Now we call qRegisterMetaType before connect.

Task-number: QTBUG-50901
Change-Id: Idbb9515573e174bbc5e5bf55dc3a7911a81646ea
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-02-16 15:52:42 +00:00
Sergio Martins
99ce1d3d97 Take window frame into account when dragging dock widget
Dock widgets with custom titlebar are frameless by default, so this
isn't usually a problem. However, the user can override the default and
make it non-frameless (by just removing the native title bar, not the frame).

Task-number: QTBUG-58843
Change-Id: Iff7a2a719cb2f326f2f81bbfb1b53ba01a63f3e1
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-02-16 15:33:49 +00:00
Olivier Goffart
cd2b5f1ada Resize the window when the screen's dpi changes
That's what the MSDN documentation say one should do in the handler
for WM_DPICHANGED

[ChangeLog][QtGui][Windows] Windows are now automatically resized
when they are moved on a screen to adapt to the new pixel ratio.

Task-number: QTBUG-55510
Task-number: QTBUG-48242
Change-Id: I7688f12165f76585d75686e2e94b0fc562627be2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-02-16 15:31:38 +00:00
Tor Arne Vestbø
2b34aefcf0 Lazily create QPlatformWindow for Qt::Desktop windows
QDesktopWidget only needs a QWindow to access its screen, and has no use
for the platform window. To keep old code working that may have called
winId() on the QDekstopWidget we still ensure it gets created lazily,
even if that will just create hidden fake windows on many platforms.

Change-Id: I2d05b96dfeebeaf3f1278cfef6301ef4cb855a57
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2017-02-16 15:30:02 +00:00
Oswald Buddenhagen
46d060f588 Overhaul .gitignore
Started-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Change-Id: I2c6fba0532549b952570ec50659934e14ea9cdd5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-02-16 15:11:05 +00:00
Ulf Hermann
1aaf45e106 Eliminate QT_NO_DYNAMIC_LIBRARY
The library feature already covers this. As library depends on the
dlopen compile check, we can assume dlopen to be available, also on
vxworks.

Change-Id: Idcdb07ab4688c6158651d9a5ad5e2ba126bd7d9e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-02-16 15:06:26 +00:00
Allan Sandfeld Jensen
a0b3294c9d Fix QRgba64 rgbBlend
The subpixel RGB alpha values were not converted from host endian to RGBA
order before being used as RGBA ordered.

Task-number: QTBUG-58619
Change-Id: I18e1c9df902c7e9001a0e511f06fc953dd7afa3e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2017-02-16 14:38:30 +00:00
Allan Sandfeld Jensen
fc63b7459c Don't fetch destination in RGB64 mode when not necessary
Extends the short-cut of not fetching destination to also apply to
the RGB64 painting. This saves reading and converting destination pixels
when they will be fully replaced with source pixels.

Since ARGB32 was switched to using the RGB64 drawhelpers, and ARGB32 is
particularly expensive to read, this change is important to avoid
performance regression.

Change-Id: If3a2439140d6364e8429783cfa786bd000cfab45
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2017-02-16 14:38:07 +00:00
Marc Mutz
0f730ef7b6 QReadWriteLock: make field 'recursive' const
It is never written after initialization, and accessed concurrently
outside mutex protection, so make sure that it never changes by
marking it as const.

Change-Id: Ib28b2e8b3067d596a95d1699165a6ebfb15fe674
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-02-16 14:34:22 +00:00