Commit Graph

41692 Commits

Author SHA1 Message Date
Vitaly Fanaskov
5d5a0842dc QApplicationPrivate: Fix potential null pointer dereference
The situation when qGuiApp is null is possible, for example, during
static palette setup. This is also a bon ton to check pointers before
dereferencing them.

Task-number: QTBUG-71186
Change-Id: I8021cef073eedaa0e4c2eb621890e73e8126175c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
2019-10-24 15:02:56 +02:00
Simon Hausmann
7a605edc22 Fix static linking when bearer management plugins are built, part 2
After commit 5f160a3699 moved the code
that's shared across all bearer management plugins into QtNetwork, there
is one piece of code remaining that's shared across the connman and the
networkmanager bearer plugin: The dbus ofono interface code. To avoid
linking that twice (and causing duplicate symbol errors), this patch
moves it into a static platform support library. This way for shared
builds the code is included twice, but for static builds only once.

Change-Id: Idf5414bc22fea45f11c600f28eaea91bb4dc6308
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-10-24 13:00:07 +00:00
Alexander Volkov
fcbf15c97b QKeySequence: Add missing names for multimedia keys
Task-number: QTBUG-40030
Change-Id: Ib34bcbf42d6dd1206209c2d76444fd8c777278fe
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-10-24 15:58:00 +03:00
Ulf Hermann
9ab043b688 QFileSystemEngine: Consistently check for invalid file names
stat() and friends expect a null-terminated C string. There is no way to
generate anything useful from a string that has null bytes in the
middle. It's important to catch this early, as otherwise, for example, a
QDir::exists() on such a path can return true, as the path is silently
truncated.

Extend the checks for empty file names to windows and add checks for null
bytes.

Change-Id: Ie9794c3a7c4fd57f9a66bdbbab8b45a08b6f9170
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-24 13:37:22 +02:00
Tor Arne Vestbø
f2edc6cb3a macOS: Don't set NSOpenGLPFANoRecovery for layer-backed views
The Apple software renderer is perfectly capable of being used when
compositing CA layers.

Change-Id: I3b78ff61a79869ecdb7bd431388041f2c124472e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-10-24 13:07:10 +02:00
Tor Arne Vestbø
312793f28e macOS: Respect Qt::AA_UseSoftwareOpenGL
Change-Id: Ia83e8e9e571e4f46d2a8d810c376015552755457
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-10-24 12:33:51 +02:00
Tor Arne Vestbø
f39230fcac macOS: Skip NSOpenGLContext flush if window exposed size is out of sync
Some clients such as QOpenGLWidget will end up drawing and flushing
during the resize event, which for GL will result in an immediate update
on the screen. The problem is that the underlying Core Animation layer,
and the window's frame, has not been visually updated yet to the new
size, so we end up drawing "ahead" of what the window server is showing
the user.

Ideally we'd be able to present the GL drawing in a transaction, in sync
with the drawing of the window frame, but this API is only available for
CAMetalLayer and CAEAGLLayer.

As a workaround we detect when the exposed size is out of sync with the
window geometry, and skip the flush until the exposed size has caught
up. We know this will happen eventually as AppKit will always ask us
to display after a resize.

Change-Id: I1739ac8878b3fc6820a55dd017ddd170fd5f55d6
Fixes: QTBUG-79139
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-10-24 12:33:40 +02:00
Tor Arne Vestbø
7c9ffe3e46 rhi: Use Q_GLOBAL_STATIC for QRhiGles2 GL program cache
Defers initialization until actually needed.

Change-Id: Idb09dbad0dfa602949d381ee61565d9050e77e7c
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-24 12:18:30 +02:00
Tor Arne Vestbø
444e947aad macOS: Improve handling of wantsBestResolutionOpenGLSurface
We were disabling wantsBestResolutionOpenGLSurface whenever we detected
the Apple software renderer, but this isn't needed when layer-backed,
and did in fact result in the exact same visual result as the bug the
code was working around -- only rendering to a quarter of the viewport.

We now apply the workaround only when software rendering is combined
with surface-backed views.

The logic has also been improved to not rely on string comparison to
look for the software renderer, but instead uses the renderer ID that
the context provides.

Since tweaking the wantsBestResolutionOpenGLSurface is only relevant
when using a window for GL rendering the logic has been moved into
QCocoaGLContext.

Change-Id: I021aaefbb7a9782bc8ee3c9703da246510326d50
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-10-24 12:14:33 +02:00
BogDan Vatra
86a0f1cfd7 Add build-id flag
This flag is needed by LLDB & simple perf tools to locate the right binary.

Change-Id: Iffa1b0678663cfb9d1d699da5ad6fe672863918c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-10-24 12:30:53 +03:00
Robert Loehning
c46eec096f QStateMachine: Don't scream at the user
Change-Id: I171606d10985bc7338b0f24ceb142fc0d88e7932
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-10-24 10:26:03 +02:00
Qt Forward Merge Bot
4158de330d Merge "Merge remote-tracking branch 'origin/5.13' into 5.14" 2019-10-24 10:25:37 +02:00
Qt Forward Merge Bot
b327807c5e Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/corelib/io/qstandardpaths_unix.cpp
	src/corelib/tools/qsharedpointer_impl.h
	tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp

Change-Id: Iae95c5778dc091058f16f6db76f04a0178a9e809
2019-10-24 10:23:44 +02:00
Laszlo Agocs
4106275a7f rhi: metal: Fix and clean up committing resource bindings
Make it readable by using names instead of mere indices for the stages.

There is an important fix in there as well: when in a render pass, only
resource for VERTEX and FRAGMENT are taken into account, while in a compute
pass those are skipped. This ensures that we do not send messages to a nil or
invalid MTLRender/ComputeCommandEncoder. (nil would not be an error but the
other is fatal)

Task-number: QTBUG-79447
Change-Id: Ibef108cb7c82b5b0fdd2a299cd89fbebe8c3606a
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-24 10:03:20 +02:00
Laszlo Agocs
cc631c15a0 rhi: metal: Remap resource bindings based on the QShader table
...when available. Fall back to the QRhi (i.e. SPIR-V) binding
point otherwise (which becomes unsafe once shadertools bumps
its SPIRV-Cross snapshot, but is fine for existing .qsb files)

Task-number: QTBUG-79368
Change-Id: I2d452fdd4efb484867732c358171a800d3261dcd
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-10-24 10:03:20 +02:00
Laszlo Agocs
6326d1df39 Store a native resource binding map in QShader
The deserializer remains compatible with .qsb files without this
additional section.

Task-number: QTBUG-79368
Change-Id: I03e2a634febbd88da7f6a4369f104855ea31e3af
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-10-24 10:03:20 +02:00
Ulf Hermann
4514b67d7c moc: When generating metatypes, allow empty MOC_DIR
We don't want the metatypes to be generated into the file system root in
that case.

Change-Id: I91bab20fa498de0f2918d8ee5b2f230cc0610aae
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-24 09:27:00 +02:00
Eirik Aavitsland
03717be788 Fix: confusion in QImage paintEngine creation on shared images
During the creation of a raster paint engine in QImage::paintEngine(),
the QImage will be detached. At least old gcc versions would get
confused so that the newly created paintengine would end up in the old
QImage copy insteads of the newly detached one. Work around by
dropping the temporary engine pointer.

Fixes: QTBUG-79383
Change-Id: I27b1f24312269bc2bcc641dc4334397a92e3bfbb
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-10-24 08:56:21 +02:00
Qt Forward Merge Bot
563dc21c51 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ic062a5bd62621877b17cc0d47303b3c879241385
2019-10-22 01:00:49 +02:00
Volker Hilsheimer
6e3b5801d2 QDateTimeParser: always use locale for AM/PM texts
The default implementation used the locale, the reimplementation
supported translating the texts. This mixing of l10n and i18n concepts
resulted in bugs and inconsistencies.

Using the texts for AM/PM from the locale that is set on the date/time
control is sufficient.

[ChangeLog][QtWidgets][QDateTimeParser] AM/PM strings in QDateTimeEdit
and other classes using QDateTimeParser are provided by the locale, and
are no longer translatable.

Change-Id: I83a5dab470ae5ba35b3ce4040ad1877908f462c7
Fixes: QTBUG-75866
Task-number: QTBUG-72833
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-10-21 22:39:33 +02:00
Ulf Hermann
35adb74ddd Reimplement JSON support on top of Cbor
In turn, deprecate the QJsonDocument methods that deal with JSON binary
data. You should use CBOR for data serialization these days.

[ChangeLog][Deprecation Notice] The binary JSON representation is
deprecated. The CBOR format should be used instead.

Fixes: QTBUG-47629
Change-Id: Ic8b92ea36de87815b12307a9d8b1095f07166db8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-21 19:12:51 +02:00
Hernan Martinez
b61c6164c1 QtGui: Disable Windows on ARM64 preprocessor conflict in QtOpenGL
The Windows API MemoryBarrier function is actually a macro when
_M_ARM64 is defined and it conflicts with the MemoryBarrier method when
it's declared and used.

Task-number: QTBUG-77388
Change-Id: I762edfc4ca1a44cbe095724de708c7cdad34ae65
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-10-21 09:14:18 -04:00
Mårten Nordheim
559b563d71 Use Schannel's incomplete data guesstimation feature
It tells us how many bytes we will need before the call succeeds. It's
not accurate but will reduce the amount of calls to their slow functions

Change-Id: I82393d5acd68b84c6e6f3377ba40bb1d5c51ca8a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-10-21 13:48:07 +02:00
Mårten Nordheim
69a43c6c3e Schannel refactoring
This moves some repeated code into functions (namely readToBuffer and
retainExtraData) while also changing how the intermediateBuffer is
handled to avoid deallocating and reallocating repeatedly.

Change-Id: I49e6cee641f961565051a67123c56b1c8f3c0259
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-10-21 13:47:54 +02:00
Mårten Nordheim
399f815143 qdiriterator benchmark: test against std::filesystem
If c++17 is available and the header is available (not
experimental/filesystem) then we'll try
std::filesystem::recursive_directory_iterator as well.

Results on my PC (Windows, VS 2019):

PASS   : tst_qdiriterator::posix(C:\depot\qt\main/src/corelib)
RESULT : tst_qdiriterator::posix():"C:\depot\qt\main/src/corelib":
     23 msecs per iteration (total: 94, iterations: 4)
PASS   : tst_qdiriterator::diriterator(C:\depot\qt\main/src/corelib)
RESULT : tst_qdiriterator::diriterator():"C:\depot\qt\main/src/corelib":
     17 msecs per iteration (total: 71, iterations: 4)
PASS   : tst_qdiriterator::stdRecursiveDirectoryIterator(C:\depot\qt\main/src/corelib)
RESULT : tst_qdiriterator::stdRecursiveDirectoryIterator():"C:\depot\qt\main/src/corelib":
     6.7 msecs per iteration (total: 54, iterations: 8)
PASS   : tst_qdiriterator::fsiterator(C:\depot\qt\main/src/corelib)
RESULT : tst_qdiriterator::fsiterator():"C:\depot\qt\main/src/corelib":
     23 msecs per iteration (total: 92, iterations: 4)

And as a drive-by fix: move the 'data' function out of the private slots
so it is not invoked as a test function (it doesn't cause any problems
but is ultimately pointless).

Change-Id: Ia160ee276423ec51e35e554a4cd63d4d940c0e6a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-10-21 12:40:49 +02:00
Samuel Gaist
9294d02395 test: migrate QDom test to QRegularExpression
This is part of the migration of qtbase from QRexExp to
QRegularExpression.

Task-number: QTBUG-72587
Change-Id: I74ca824d5a2ee6c295c41cd577eab466326395f0
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-10-21 10:38:23 +02:00
Samuel Gaist
9fc5902d23 test: migrate manual dialogs tests to QRegularExpression
This is part of the migration of qtbase from QRexExp to
QRegularExpression.

Task-number: QTBUG-72587
Change-Id: I9eae3291bc6934375404224c7242e2b23af2019b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-10-21 10:38:02 +02:00
Leena Miettinen
a9dcd772c0 Doc: Replace \b {Note:} with \note
Change-Id: I1f6947acec4494c151317e1faf79720dad0da6bb
Reviewed-by: Martin Smith <martin.smith@qt.io>
2019-10-21 10:37:52 +02:00
Samuel Gaist
439f343416 test: migrate QDBusInterface test to QRegularExpression
This is part of the migration of qtbase from QRexExp to
QRegularExpression.

Task-number: QTBUG-72587
Change-Id: I47a047e27432c874b47bd25581806e1bc156e94f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-10-21 10:37:15 +02:00
Christian Ehrlicher
aa4b0f5cb7 Uic: fix crash when trying to resource icon information
Fix a typo introduced in be56db2c49 to
avoid a crash when a pixmap is given for selected on but not for
selected off.

Fixes: QTBUG-79125
Change-Id: I84072b6b4e8a4d21684be21f5bff1deeaddbba6d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-10-21 09:48:30 +02:00
Laszlo Agocs
5288c8dae3 rhi: Enhance swapchain size query docs
Inspired by a recent Qt Quick fix. Make sure we make it
clear that QRhi-based rendering code should base output
size calculations (e.g. for setViewport() and similar)
on the pixel size reported from QRhiSwapChain, instead
of going to the QWindow.

Change-Id: I2fc22972162ccc6307ac07ceb7766c746d5f562a
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-21 09:28:33 +02:00
Richard Moe Gustavsen
d71dbe3e93 docs: clarify usage of css 'qproperty' in stylesheets
Clarify that the qproperty properties will only be
evaluated once.

Fixes: QTBUG-2982
Change-Id: Ie294ced118f740c7378c62c0b5a4924d5628e118
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2019-10-21 07:22:23 +00:00
Eskil Abrahamsen Blomfeldt
d3398207d0 Revert "Release left button before showing the popup context menu"
This partially reverts commit 5e8b16f0e4.
Releasing the mouse button synthetically made it impossible
to use tap and hold gestures. When investigating, it seems
that other changes have fixed the original issue that
5e8b16f0e4 was meant to address,
so this is no longer needed.

[ChangeLog][Android] Fixed regression that made it impossible for an
application to use the tap-and-hold gesture.

Fixes: QTBUG-72408
Change-Id: I53f687d047a4ad0fdf3c8c96a00ed1b11d09f047
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-10-21 09:14:08 +02:00
Eskil Abrahamsen Blomfeldt
5205510524 Enable cursor in ligature test on Windows
The default font on Windows ("Times" is not found) does not have
a ligature for "fi", so the test would not actually be testing
what it was supposed to on this platform, and would pass even
when the code was buggy.

To enable the test on Windows, we select a standard font which
has the ligature (Calibri).

Change-Id: Ic117cd8e549aa729a0cd68006d7c180c6c89c053
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-21 09:01:26 +02:00
Eskil Abrahamsen Blomfeldt
cc4087b18a Remove mapping from CJK/Latin to Common script in Harfbuzz NG
The original commit message says this is to ensure compatibility
with the old Harfbuzz, but since OpenType features such as
kerning are often matched based on the writing system of the glyphs,
it will break kerning (and other OpenType features) for text in these
languages in some fonts. Even font that were successfully kerned by
the old Harfbuzz are broken.

To avoid regressing on finding cursor positions inside ligatures,
we need to amend 9f837af945. This
would enable cursor positions inside ligatures for languages
where they are only used for cosmetic purposes, and this was
generalized to Common and Greek at the time. This now has to be
expanded to include all the writing systems that were previously
covered by "Common".

[ChangeLog][Text] Fixed kerning error with certain fonts.

Fixes: QTBUG-77908
Change-Id: Id261fef05f86841b1533b7d87207c3d17e01e96e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-21 09:01:17 +02:00
Christian Romberg
8409844bd6 Fix java mkspec for compatibility with JDK 12
Starting with JDK 12, javac no longer supports source and target
version 6. This commit changes the source and target version to 7.

[ChangeLog][General]

Fixes: QTBUG-79094
Change-Id: Ife8966db01c68251de2fe85307de30c31e658172
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-10-21 07:54:01 +02:00
Qt Forward Merge Bot
daa8040b50 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I642be6de9ef32491b09db97185146c671266240e
2019-10-21 01:00:56 +02:00
Volker Hilsheimer
5e9b2ade67 Read a unique thread identifier from CPU registers
This is, depending on the implementation of pthread, significantly
cheaper than using a pthread library call.
Even if we don't know the assembler for an architecture, taking
the address of the thread_local variable is still faster.

As QThread::currentThreadId() is documented to be used internally
and not meant for application code, we don't have to care about
what exact value we return. Internally, we use it only to compare
thread IDs for equality, which this implementation is sufficient
for, even if a thread ID is re-used when one of the threads
terminate and a new thread starts (since the other thread is still
executing code). Besides, pthread_self documents [0] that a thread
ID may be reused, and that the returned pthread_t cannot be
portably compared using operator==(); using pthread_equal would
require adding a Qt thread-ID type that implements this correctly,
and would make things even slower.

[0] http://man7.org/linux/man-pages/man3/pthread_self.3.html

Change-Id: Id08e79b9b9c88976561f7cd36c66d43771fc4f24
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-20 17:08:57 +02:00
Topi Reinio
51edfdd212 Doc: Prevent QDoc from auto-linking certain words
'macOS' appears in the documentation frequently, and because it
resembles a variable/property name, QDoc links each occurrence
of it.

'WebChannel' appears as part of a module name, but it's also
a QML type - auto-linking each word to QML documentation is
confusing.

Likewise, there's no need to link 'OpenGL' each time.

Explicit links such as \l [QML] WebChannel continue to work.

Task-number: QTBUG-79135
Change-Id: I76cc84b0076255e260aa88c244102702a48f35a6
Reviewed-by: Martin Smith <martin.smith@qt.io>
2019-10-19 18:36:13 +02:00
Tor Arne Vestbø
1b6db18494 Propagate application termination requests through QPA
Instead of having each platform plugin deal with application termination
in their own weird ways, we now have a QPA API to signal that the system
requested the application to terminate.

On the QGuiApplication side this results in a Quit event being sent to
the application, which triggers the default behavior of closing all app
windows, and then finally calling QCoreApplication::quit().

The quit event replaces the misuse of a close event being sent to the
application. Close events are documented as being sent to windows.

The close events that are sent to individual windows as part of the
quit process can be ignored. This will skip the final quit() of
the application, and also inform the platform that the quit was
not accepted, in case that should be propagated further.

In the future the logic for closing windows should be unified
between the various approaches in closeAllWindows, shouldQuit,
and friends.

Change-Id: I0ed7f1c0d3f0bf1a755e1dd4066e1575fc3a28e1
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-19 11:58:35 +02:00
Tor Arne Vestbø
2967510213 macOS: Merge [QCocoaApplicationDelegate canQuit] into callsite
The logic for handling termination without any event loops has been
moved up as an early exit, and the code has been modernized.

Change-Id: I202720b9923e35732cffea656e1ce108ef11953d
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-19 08:29:08 +02:00
Qt Forward Merge Bot
ab5153aa0b Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I5b671c89ceb8998b37f99d58df0e0a9e5785e3ad
2019-10-19 01:01:03 +02:00
Qt Forward Merge Bot
84db112fe2 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I69f44ea7254cb2643a00b040bbb46f41b7f76a87
2019-10-19 01:00:45 +02:00
Tor Arne Vestbø
ff2ba8b9d2 macOS: Let system decide whether modal window should prevent app termination
The logic for preventing application termination when there are modal
windows active was a leftover from the Carbon to Cocoa port, and is no
longer needed. AppKit will deal with this on its own, by checking the
preventsApplicationTerminationWhenModal property of each NSWindow.

In some cases AppKit will also ignore this property, such as when
quitting the application from the menu entry, which means we now get
the default system behavior for this use-case.

Change-Id: Iac5d8d8e17eb0974448f7ee6f39c9b7761bf4d90
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-10-18 13:30:54 +02:00
Johan Klokkhammer Helsing
52484cc4b6 Widget tests: Skip tests that fail on Wayland
Either by testing for platform name or window activation.

After this gets in, we can enable widget tests in the Wayland bot, which
hopefully will reduce the number of regressions in the Wayland plugin.

Fixes: QTBUG-62188
Change-Id: I71ce8abd6b5891e5b953126b1c35345892585931
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-18 10:53:34 +02:00
Volker Krause
2c9bd677ab Make QSslError::SslError a Q_ENUM
This avoids error prone manual mappings when having to persist such values,
as eg. done in https://cgit.kde.org/kio.git/tree/src/kssld/kssld.cpp#n49.

Change-Id: Ib279c116a10ce8edc0b686b8b80cbd848b4b410e
Reviewed-by: David Faure <david.faure@kdab.com>
2019-10-18 08:37:43 +02:00
Ulf Hermann
a7df98a9a7 QSortFilterProxyModel: Add a cheaper way to find source_sort_column
There are two places where we are only interested in the mapping of
proxy to source sort column, rather than the full mapping. Creating the
full mapping is rather expensive as it iterates all rows and columns and
allocates a large number of objects. Just figuring out the n-th accepted
column can be much cheaper.

Fixes: QTBUG-41659
Change-Id: I7ea914cb695518b4d47cdc3ad67c7786380d8709
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-10-18 08:36:36 +02:00
Eirik Aavitsland
19f29802bf Fix: QPainter off-by-one clipping for some non-integer scalings
For some scalings, setClipRect(QRect) would produce a clip one pixel
different from setClipRect(QRectF) because of different
rounding. Ditto for setClipRegion. Fix by making sure to transform
QRectFs instead of QRects.

Fixes: QTBUG-78962
Fixes: QTBUG-78963
Change-Id: I0be721133858c30769ec6d81e978962a3d6b70cf
Reviewed-by: Christoph Cullmann <cullmann@kde.org>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-10-18 06:11:39 +00:00
Qt Forward Merge Bot
56e5e06ff2 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I24461492372fb9a2e46a3b8dfb6c854b85e9c600
2019-10-18 01:00:52 +02:00
Qt Forward Merge Bot
dce8849037 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I4fbbf100b673ab100997dbf2f42bf195dc3c050f
2019-10-18 01:00:35 +02:00