Commit Graph

39927 Commits

Author SHA1 Message Date
Qt Forward Merge Bot
1f35c8caa0 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I371c5ae1af6f58e32e579671f485b92b586e0b76
2019-09-08 11:33:28 +02:00
Qt Forward Merge Bot
551f73bd8d Merge "Merge remote-tracking branch 'origin/5.12.5' into 5.12" 2019-09-07 13:08:36 +02:00
Qt Forward Merge Bot
a9db729095 Merge remote-tracking branch 'origin/5.12.5' into 5.12
Change-Id: I41a252fdbf22551aadb0b1a6e9ecf3f95f99fbd4
2019-09-07 13:08:26 +02:00
Joerg Bornemann
cc32a69193 Fix CMake config files for -libdir different from "lib"
When Qt was configured with -libdir different from "lib", one could not
build with CMake whenever a static lib was pulled in (e.g. uitools).

Do not hard-code "/lib" but use the correct variable also for static
libraries.

Fixes: QTBUG-76255
Change-Id: I28c6861752e29e461247628d2b1f8a9ec32f0790
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Fabian Vogt <fabian@ritter-vogt.de>
2019-09-06 13:13:32 +02:00
Timur Pocheptsov
d1a22bd298 A follow-up to a recent fix in QHttpNetworkConnectionChannel
While working with HTTP/2, we are not re-sending failed requests.
In case we receive a GOAWAY frame, we properly handle it by
processing some active streams if possible, and aborting streams
that will not proceed further with ContentResendError. But it's
possible that some server failed to send us GOAWAY (for example,
it died) or closed the connection not finishing the streams that
were still active and valid (ID <= value from GOAWAY frame).
Now that we will not re-connect, there is no reason to be quiet
about us not progressing - emit RemoteHostClosedError on any
remaining active stream/request we cannot process further.

Fixes: QTBUG-77852
Change-Id: I4cd68a1c8c103b1fbe36c20a1cc406ab2e20dd12
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 543769666f)
2019-09-06 03:01:52 +00:00
Christian Ehrlicher
a42a451339 QShortcut: call base class implementation in event()
QShortcut::event() did not call the base class implementation
QObject::event() which caused that e.g. QEvent::DeferredDelete was not
handled.
Fix it by calling QObject::event() when the event was not handled.

Fixes: QTBUG-66809
Change-Id: Ideebc980bc658f8f2b9ec4417e738bccda5eeab5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-09-05 20:41:43 +02:00
Mårten Nordheim
e21fa577dd Schannel: retain extra data after renegotiation is requested
I realized this is a potential scenario where we will have leftover
data, but it wasn't covered.

Change-Id: Ibaf1015bf2aee120e4a4d98888925b88ecb6ddfd
Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-09-05 18:18:38 +02:00
Leena Miettinen
2656d3e923 Doc: Add external links to new topics in Qt Creator Manual
These topics were added to Qt Creator Manual 4.9 and 4.10.

Change-Id: I2e9bf355eb78b5e9877d0ca0bc41de00ed2b4333
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-09-05 17:36:05 +02:00
Qt Forward Merge Bot
a8f77509cf Merge "Merge remote-tracking branch 'origin/5.13.1' into 5.13" 2019-09-05 17:36:04 +02:00
Qt Forward Merge Bot
fa2589bbb5 Merge remote-tracking branch 'origin/5.13.1' into 5.13
Change-Id: Ic633850940bbe17dcedc1609217a052b6f81ce4b
2019-09-05 13:33:00 +02:00
Thiago Macieira
15edba4101 qFatal: make it so you cannot disable the message
Solves a few recursion problems in Qt, since then we won't try to
inspect the logging registry while creating the logging registry.

Fixes: QTBUG-78007
Change-Id: I44cc9ee732f54d2380bafffd15c0f51c7140682e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-09-04 23:03:57 -07:00
Timur Pocheptsov
b9b48464df tst_http2::goaway - run in ALPN mode only
I was observing rare crashes on my mac, where I was using SecureTransport.
This would imply both the client (the test) and the server were working
in h2c mode. But this is against the test's logic - the first request
will be HTTP/1.1 (and upgrading protocol) and I wanted to send 3 HTTP/2
requests instead.

Fixes: QTBUG-77476
Change-Id: I048ca242e2096ca36dd112277807d1fee530150c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-09-04 15:35:50 +02:00
Daniel Smith
651dd26403 Update lancelot tests to use non-system-specific host info collection
Change the lancelot baseline test runner to use generic text files for
host info data collection. This also avoids relying on QProcess and
scraping the bash scripts output from stdout.

Fixes: QTBUG-71836
Change-Id: I88a46c99dbb11f71afc18cae5a6d2fbebcbe76c5
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-09-04 13:09:39 +00:00
Joerg Bornemann
abfb1b8665 Don't add default lib dirs to LIBRARY_SEARCH_PATHS in xcode projects
Having hard-coded absolute paths in the xcode project breaks switching
between iOS and simulator builds.

Fixes: QTBUG-77804
Change-Id: Ib655bfc774b92c413a7b94ba4d005b6e1c4d2905
(cherry picked from commit 97465b1540)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-09-03 20:52:35 +02:00
Friedemann Kleint
db57af5a0d QRegexp: Fix MSVC2019 warning about fallthrough not being followed by a case label
Move  fallthrough down, fixing:
tools\qregexp.cpp(3014): warning C4468: 'fallthrough': attribute must be followed by a case label or a default label
tools\qregexp.cpp(3054): warning C4468: 'fallthrough': attribute must be followed by a case label or a default label
tools\qregexp.cpp(3100): warning C4468: 'fallthrough': attribute must be followed by a case label or a default label

Change-Id: If25ddec5dc1d4929a3383729aabad89f5879e316
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2019-09-03 18:07:54 +02:00
Shawn Rutledge
1b0c45f683 Deliver stationary touchpoints that have changed pressure
As a rule, we don't deliver touch events containing only stationary
touchpoints.  To fix QTBUG-52510 we added an exception in
1bd0ab7050 : if the velocity changed,
deliver it anyway.  Now we need to do the same if the pressure changed.

Also, on the customer's hardware, pressure is indicated via ABS_MT_PRESSURE.

Change-Id: If7f7088df055d686cdd86967b999e38024f8170f
Fixes: QTBUG-77142
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-09-02 20:25:06 +02:00
Alexander Volkov
98c5f22161 Avoid invalid memory access in QIconCacheGtkReader::lookup()
If name argument is empty, e.g. an icon is created by
QIcon::fromTheme(""), then icon_name_hash() will access
a byte at index 1, which is outside of the string.

Change-Id: I109c476718939d7dd252007ebac48c3dbbeceb72
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-09-02 20:51:59 +03:00
Timur Pocheptsov
dbfa374a86 QHttpNetworkConnectionChannel - avoid re-connecting on 'disconnected'
The _q_error slot has a special case for RemoteHostClosedError,
where the current channel's state is 'idle' and no request/reply
is in progress. The comment states that:

"Not actually an error, it is normal for Keep-Alive connections
 to close after some time if no request is sent on them. No need
 to error the other replies below. Just bail out here. The _q_disconnected
 will handle the possibly pipelined replies."

_q_disconnected, indeed, takes care about pipelined replies ... calling
'ensureConnected' even if we have 0 replies in pipeline, which makes
zero sense to me and results in QNAM endlessly trying to re-connect
to the server.

Fixes: QTBUG-77852
Change-Id: I6dcb43b36a6d432bc940246a08f65e1ee903fd24
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-09-02 19:51:56 +02:00
Andre de la Rocha
1c55a6caf1 Windows QPA: Fix crash in UI Automation with Youdao Dictionary
Unlike other accessibility classes, QAccessibleTree is returning a
different instance, with a different ID, every time child()/childAt()
are called for the same child elements. This causes
ElementProviderFromPoint to return different IRawElementProviderSimple
instances every time, for the same coordinates, which causes the
NetEase Youdao Dictionary to call it in an infinite loop, allocating
new QAccessibleTableCell instances, until the application crashes.
The crash happened, for instance, just by using the mouse over
Qt Creator's project tree while Youdao Dictionary was running. While
the root cause seems to be QAccessibleTree not caching and reusing
objects, this change adds a layer of safety to the UI Automation
classes in the Windows QPA, to avoid causing a crash until
QAccessibleTree, and possibly other accessibility classes, are fixed.

Fixes: QTBUG-77974
Change-Id: I9b0c8174bc0fd9ef7f5626ee0b72c8a9626520ee
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-09-02 13:53:56 +02:00
Eirik Aavitsland
6bb51e0f08 QPainter lancelot test: improve drawImage testing
In QPainter, there is a shortcut code path for the drawImage(point,
image) call, relative to the full drawImage(targetRect, img,
srcRect). The lance script interpreter would only use the latter, so
the former was not covered by the tests.

As a driveby, remove the pointless usage of non-default dithering
flags in drawImage(), since it is more important to test the default.

Change-Id: Id373fd528a0c4c40b6bd8eea37b960fd7cdb2cc7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-09-02 12:08:40 +02:00
Friedemann Kleint
f6b34ce173 Windows QPA: Update theme fonts when the primary screen changes
Call into the theme to update the fonts on a change. This
at least helps in the case of disabled High DPI scaling.

Task-number: QTBUG-77144
Change-Id: I2c8fd85259403eaaeea56cd096f99116fc6bba9a
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-09-02 12:08:37 +02:00
Rainer Keller
af6ac444c9 Fix crash when text contains too many directional chars
In case a text to be layouted contains more than 128 directional characters
it causes the application to crash

The function initScriptAnalysisAndIsolatePairs() collects information of
RTL/LTR chaaracters into vector "isolatePairs". The size of the vector is
capped to 128. Later the function generateDirectionalRuns() iterates
the text again and tries to access items from the previously capped vector
above the upper bound.

Task-number: QTBUG-77819
Change-Id: Ibb7bf12c12b1db22f43ff46236518da3fdeed26a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
(cherry picked from commit 1232205e32)
Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-08-31 08:29:31 +00:00
Joerg Bornemann
7b82d27429 Fix library suffix replacement for xcode projects
In xcode projects we replace the _debug part of referenced libraries with the
variable $(QT_LIBRARY_SUFFIX). This only worked for libraries passed with -l.

Make the library suffix replacement work for libraries passed as absolute paths
too.

Fixes: QTBUG-77804
Change-Id: Iac2dbd2f67c3fa0f415ac43cbab5a906657164e5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-08-31 07:56:54 +00:00
Qt Forward Merge Bot
364b9c80de Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" 2019-08-31 01:00:59 +02:00
Qt Forward Merge Bot
3176c821bf Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I9823da32168e99bbece2f8337d0bd4d33e6d634c
2019-08-31 01:00:48 +02:00
Rainer Keller
1232205e32 Fix crash when text contains too many directional chars
In case a text to be layouted contains more than 128 directional characters
it causes the application to crash

The function initScriptAnalysisAndIsolatePairs() collects information of
RTL/LTR chaaracters into vector "isolatePairs". The size of the vector is
capped to 128. Later the function generateDirectionalRuns() iterates
the text again and tries to access items from the previously capped vector
above the upper bound.

Task-number: QTBUG-77819
Change-Id: Ibb7bf12c12b1db22f43ff46236518da3fdeed26a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-08-30 21:17:32 +02:00
Joerg Bornemann
c53f843001 Doc: Clarify QJsonDocument::toJson()
Mention that this method returns an indented document.

Change-Id: I0cadcc1c894c9a87910cfce389c6a5288238044d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-08-30 16:21:10 +02:00
Fredrik Orderud
7b2dfb37ee Remove hardcoded qt_instdate field from binary
Move hardcoded date to the only client code in the repo.

This field is currently modified by MaintenanceTool and possibly windeployqt,
which contributes to breaking the DLL signature on Windows. Removing the field
should avoid this problem.

Task-number: QTBUG-76985
Change-Id: I01386136ac493ea50c99c05879a3e215f3f6344c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-08-30 07:03:02 +02:00
Antti Kokko
b2df41b5a8 Add changes file for Qt 5.12.5
Change-Id: Ic3c3c0d934b2f6b8980c165c4a464442fc4cebbc
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-08-30 07:00:11 +02:00
Rainer Keller
02a6209487 Fix invalid end range appended to HTTP request
When the end range of a byte range in a HTTP request is skipped the download
manager adds 0 it its place when resuming that download.

When there is no end range given the value is skipped.

Task-number: QTBUG-77867
Change-Id: I52358c94cf56c88217fcc91abb102ed393ac7242
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-08-28 15:34:08 +02:00
Tor Arne Vestbø
0844be34ba iOS: Skip explicit dead code stripping when generating Xcode projects
Fixes: QTBUG-73680
Change-Id: I5d17ef6321bb1f800c39c3f80dca9527ad343d12
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-08-28 13:58:39 +02:00
Kai Koehne
351f6eb52b Add Third-Party code in qregion.cpp to qt_attribution.json file
This makes it visible also in the overview documentation of the module,
and can be used to automatically generate attribution documents.

The code actually mentions the names and file versions (CVS?) where things
got copied from; however, X11 seems to have stopped using CVS a long time
ago, and without a server it's hard to determine the exact X11 version that
was copied from. It arguably doesn't matter, anyhow, because we won't update
the code anymore.

Fixes: QTBUG-70556
Change-Id: Ib17117a1a3c4112b81982afbd51273048a43221a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-08-28 13:40:02 +02:00
Karsten Heimrich
375f565060 Fix reporting the network interface type on macOS 10.14.5 and later
* initialize the structure used as argument to ioctl SIOCGIFMEDIA

The ioctl in ifType(...) returned -1 and set errno to EFAULT, thus
the code to determine the interface type was not executed.

Task-number: QTBUG-76408
Change-Id: Ib69c2c0cd4dda3604d568adf9746e0c9a280e9a0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-08-28 13:05:18 +02:00
Joerg Bornemann
fc6d569862 Do not prepend QMAKE_PREFIX_STATICLIB to TARGET for TEMPLATE aux
This was introduced by accident in 4da47d0f.

Fixes: QTBUG-77429
Change-Id: Ic3d9052e1fc83dab5ed3b8725629588208b0d7bb
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 2a4cf923f4)
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-08-28 06:25:01 +00:00
Joerg Bornemann
97465b1540 Don't add default lib dirs to LIBRARY_SEARCH_PATHS in xcode projects
Having hard-coded absolute paths in the xcode project breaks switching
between iOS and simulator builds.

Fixes: QTBUG-77804
Change-Id: Ib655bfc774b92c413a7b94ba4d005b6e1c4d2905
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-08-27 21:59:00 +02:00
Allan Sandfeld Jensen
eb8d461171 Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" 2019-08-27 16:35:31 +02:00
Allan Sandfeld Jensen
afac8dac58 Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/gui/painting/qdrawhelper.cpp
	src/gui/painting/qdrawhelper_p.h
	src/gui/painting/qdrawhelper_sse2.cpp
	src/gui/painting/qdrawhelper_x86_p.h

Change-Id: I83256bb38ab3a705776e353bc0629315b6c59a0f
2019-08-27 13:08:38 +02:00
Kavindra Palaraja
46f3b40a6d Docs: Some cleanup of class documentation
Change-Id: I62f89157e57189a97151f9661bc354af9bd67468
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-08-27 09:19:35 +02:00
Christian Ehrlicher
f2f1a93c58 QToolBarLayout: fix position calculation
Fix a bug introduced in d493f676a3 while
calculating the size / position of the layout item.

Fixes: QTBUG-77115
Change-Id: I20ad1685659da7225009734e25287e590367aa9e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-08-26 20:23:10 +02:00
Marc Mutz
b3dc0c13e8 Fix assertion on passing nullptr QLatin1Strings to qt_compare_strings
qstrnicmp() has an assertion that the lhs string is not nullptr.

Fix by moving the length check back to the front, regardless of cs's
value.

Amends cad7100fda.

Change-Id: I31f808936c8dc6fbb10a70a59923746ef3e675e9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-08-25 17:37:52 +02:00
Volker Krause
23cfdf74cb Also fall back to direct write for Android content: URLs in QSaveFile
We cannot rename into content: URLs, so that is the only option, and this
is particularly relevant here as the native file dialog will give us
content: URLs by default for saving to.

Change-Id: Ie96fcfc404a0842d397c7d1554e3c76f06bb3074
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-08-24 11:22:25 +02:00
Joerg Bornemann
09bfc52dde Remove broken wild card list from QMake's help output
The description of the project mode looked like this:

  -project       Put qmake into project file generation mode
                 In this mode qmake interprets files as files to
                 be built,
                 defaults to *; *; *; *.ts; *.xlf; *.qrc

The list of wildcards is incomplete. Unfortunately the file extensions
are defined in QMAKE_EXT_* variables in mkspecs, and the help display
code has no access to that data. This went unnoticed for quite some
time, and fixing this is too involved considering the gain.

Replace the text above with the static text below:

  -project       Put qmake into project file generation mode
                 In this mode qmake interprets [files] as files to
                 be added to the .pro file. By default, all files with
                 known source extensions are added.

Change-Id: I815a50957c05dccc45e1cd6657f568599d1911f6
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-08-24 09:18:02 +02:00
Tor Arne Vestbø
29b1ac0697 Don't defer platform backingstore creation if we already have a platform window
The creation was made lazy in 18f415e46d, for those platforms (macOS) that
need a platform window to successfully create a platform backingstore. But we
don't need to delay creation if we actually have a platform window at the time
of constructing the QBackingStore.

Change-Id: I6367736ddca82900dec2751a85a8bc35cc742bb5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-08-24 02:21:59 +02:00
Tor Arne Vestbø
e1b0dfc1d4 macOS: Choose appropriate NSWindow depth based on surface format
Change-Id: I67e63412096ca11a8f056f5755525311756906ef
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-08-24 02:21:54 +02:00
Thiago Macieira
f8d41309c8 Use qsizetype for qt_memfill functions
Just in case the image is larger than 2 GB (512 megapixels).

Change-Id: I343f2beed55440a7ac0bfffd15636cbc68dfa13d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 1e2bf51d3e)
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-08-24 01:39:37 +02:00
Qt Forward Merge Bot
02c0d67e3b Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" 2019-08-24 01:00:21 +02:00
Qt Forward Merge Bot
b29505bb37 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I60bb714ef11bced075d94addb74d23c3a3975519
2019-08-24 01:00:08 +02:00
Joerg Bornemann
92f4523c8a Fix classical strcmp misuse in VS project generator
The conditions were wrong, they must compare against zero.
Also, use qstricmp to avoid the platform #ifdef.

Change-Id: I7e5ef1b9ae8e2e1d3d9ce90a645ee568b370ab57
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-08-24 00:28:43 +02:00
Marc Mutz
96ff6e8ebe QGuiApplication: drop mutex before emitting fontChanged()
Emitting a signal executes an unknowable amount of code. We shouldn't
hold a mutex while doing so. E.g., if the signal emission causes
another call to QGuiApplication::setFont(), the old code would
deadlock, since applicationFontMutex is not recursive.

Fix by taking a copy of the application font under mutex protection,
then dropping the lock for the emission of the signal.

Change-Id: Ib2569b3a08af6ef5f38459a19f74cb0db27b7772
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-08-23 10:39:43 +02:00
Paul Wicking
304587e3db Merge 5.12 into 5.12.5
Change-Id: I188926022fa4afc0db2dadc6dc214ea5173b17ea
2019-08-23 08:42:17 +02:00