Commit Graph

39563 Commits

Author SHA1 Message Date
Oliver Wolff
0bd27f80e0 ANGLE: clean up displays on dll unload
If the displays are not cleaned up on dll unloading, profilers might
report memory leaks.

Change-Id: I04cbc3c2448bfb450f7d840e216827f86856e963
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-04-16 10:36:42 +00:00
Ulf Hermann
7c6b969383 eglfs: Call destroy() from dtors of concrete windows
Calling destroy from the QEglFSWindow dtor() triggers the virtual
invalidateSurface() to be called on a partly destroyed object. As the
child windows deregister themselves from their screens on
invalidateSurface() this is dangerous: It leaves a dangling pointer in
the screen.

Fixes: QTBUG-75075
Change-Id: Idd3fea18562d41973f364340df875a50dbd5691e
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-04-16 08:00:14 +00:00
Liang Qi
9d67bf6e96 Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/corelib/tools/qlocale.qdoc
	tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp

Done-with: Edward Welbourne <edward.welbourne@qt.io>
Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io>
Change-Id: I88e0757b2d020f0a244714c87844631df4b3fd13
2019-04-16 09:34:50 +02:00
Kavindra Palaraja
12b96dbb81 doc: Add clang to the Unix list for Precompiled Headers documentation
Task-number: QTBUG-50011
Change-Id: I18261e62e387eeb74fc7584bf034a11ac75db1be
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-04-15 14:49:54 +00:00
Oswald Buddenhagen
5b3dfa470e qmake: link qt libraries by full path
this avoids the scenario where the linker would pick up the wrong qt
libraries for LIBS_PRIVATE because LIBS added the "wrong" path first.
this is also consistent with configure-supplied dependencies as of
recently.

as a side effect, this also removes pretenses of lsb linker handling, as
it makes no sense after the change and is certainly obsolete anyway.

Fixes: QTBUG-50921
Change-Id: I84398c9143f393c2eefb3c69a31bd9f633669924
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-04-15 05:41:08 +00:00
Hugo Beauzée-Luyssen
2a815855a9 corelib: invokeMethod: Allow non copyable functors to be used
[ChangeLog][QtCore][QMetaObject] Non-copyable lambdas can now be used
with invokeMethod(). For consistency reasons, the functor object is
now always moved.

Fixes: QTBUG-69683
Change-Id: I66ff5e21d6d1926f0f7c5f8c304bed1a90b69917
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-04-12 20:18:20 +00:00
Andre de la Rocha
ab2c1e20fa Windows QPA: Fix QComboBox accessibility with screen readers
Screen readers like NVDA and Narrator were not reading the contents
of a QComboBox when changing its value using the keyboard, without
expanding it, due to missing UI Automation notifications in this case.
This change should also help in other cases where updated string
values were not notified to screen readers.

Fixes: QTBUG-75066
Change-Id: Id7f488380aec5ad27fd11b3cf854d44ab1b28688
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-04-12 15:38:21 +00:00
Frederik Gladhorn
21dcb96ddc QStyleSheetStyle::repolish: only run on direct children
When re-parenting, some widgets change their children. For example
QLabel, when set to rich text, will not update, until receiving a polish
call, at which time getting a list of all children recursively and then
trying to call functions on them will crash, since the children change
in the middle of this operation.

Fixes: QTBUG-69204
Fixes: QTBUG-74667
Change-Id: I95dd83ebeed14c017e22552ddd47658ae8a09353
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-04-12 14:33:32 +00:00
Laszlo Agocs
2593463eaf kms: Add support for "skip" key in the output config
"off" is not quite suitable because that turns the output off, as the name suggests.
Disconnected outputs are skipped automatically - it is natural to have a way to
request the same for connected outputs as well.

Task-number: QTBUG-74871
Change-Id: I8bea83428ae0424601b19482b6e6ef809491d0fb
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2019-04-12 14:02:05 +00:00
Timur Pocheptsov
09228604d8 Generic bearer engine - do not ignore WLAN interfaces (Windows)
The previous code and comments refer to the "separate engine" and skip
such interfaces. Given we explicitly disabled this "separate engine",
skipping the interfaces is a bit cruel.

Task-number: QTBUG-65593
Change-Id: Ie9dce1661bd697f22044ca6fb4a5e2485ef74253
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-04-12 13:30:31 +00:00
Jean-Michaël Celerier
bb8a3dfc95 CMake: fix generation of config files for external Qt modules on macOS
This is a follow-up to f5850cb0da, which
did not take into account some special-casing for macOS framework build,
thus causing CMake to look for QtFoo.framework instead of Foo.framework.

Change-Id: I261b14e75fde66fb57486bde43fc936f796a6f96
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
2019-04-12 09:31:35 +00:00
Timur Pocheptsov
7b4f9dbf27 Revert "QMacStyle - workaround NSButtonCell (disclose button type)"
This reverts commit a868942b11. We know how to fix it properly.

Change-Id: I9180aeca82f884333d53bab9c6d588ee3a23d3cb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-04-11 16:27:21 +00:00
Eirik Aavitsland
83dccf00cc Fix printing of table headers in multi-frame QTextDocuments
The calculation of page position of table headers would only work
correctly for tables in the root frame of a QTextDocument. Fix by
including the relative positions of subframes.

Fixes: QTBUG-59000
Change-Id: I2cc7e21bddf806f7f5f9b0675ac014c339ba2453
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-04-11 15:29:44 +02:00
Liang Qi
3d4b62a753 Merge "Merge remote-tracking branch 'origin/5.13.0' into 5.13" 2019-06-11 10:30:48 +02:00
Liang Qi
3c662bf13c Merge remote-tracking branch 'origin/5.13.0' into 5.13
Conflicts:
	src/plugins/platforms/wasm/qwasmintegration.cpp
	src/plugins/platforms/wasm/qwasmintegration.h

Change-Id: Idf4c7936513fb1f21daa8f6105b8545f13447bb8
2019-06-11 10:30:48 +02:00
Qt Forward Merge Bot
17790dd030 Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" 2019-06-11 01:00:06 +02:00
Qt Forward Merge Bot
93f7a24df0 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Ic7c790602e4ac3f4a0d3d4630441b28cf76f75fc
2019-06-11 01:00:06 +02:00
Eirik Aavitsland
a4f79313f0 Fix: QTextDocument::find backward search crossing paragraphs
If the start position of a backward string search was the at the start
of a paragraph, the code would start searching at an illegal position
(at the eol character) in the preceding paragraph. That caused
that whole paragraph to be skipped, so any matches there
would not be found. Fix by making sure the search starts at legal
position.

Fixes: QTBUG-48035
Change-Id: Id6c0159b6613ec75ec617a0a57096ceef2b4cbd0
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2019-06-04 07:14:03 +00:00
Shawn Rutledge
7fc67e09f3 doc: Correct several QEnterEvent accessors
It's cursor position not widget position, pos() is relative
to the widget, and 3 of these accessors return QPointF.
Amends e6ddae07e1.

Task-number: QTBUG-36985
Change-Id: Ide437f7496824f8cdd0d03fa38ad7b573e30feaa
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2019-06-06 14:49:51 +02:00
Friedemann Kleint
7ff7d73f6a moc: Fix indentation of generated code
Clang warns about misleading indentation when parsing moc-generated
files. Amends 4ed39bed4e.

Change-Id: Ie8c5b38a28316cb2541304eb712ad2ca60be0e42
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-06-07 11:43:28 +02:00
Friedemann Kleint
464b5278fa Brush up tst_QCompleter
- Use nullptr
- Fix warning about inconsistent parameter naming in CsvCompleter::pathFromIndex()
- Fix C-style casts
- Use range-based for
- Use correct static invocation
- Set a title on shown windows to make it possible to identify
  slow tests
- Use initializer lists
- Fix the class declarations, use override, member initializations
- Remove goto, streamline code
- Use auto to avoid repeating the type
- Introduce std::unique_ptr

Task-number: QTBUG-38014
Change-Id: Ia8ecd799064d630648b385b606848d7474c51363
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-06-07 12:34:47 +02:00
Tor Arne Vestbø
2dfe0f8f68 macOS: Introduce QMacKeyValueObserver and use in theme and style
Change-Id: I2d21c883628933543ae5a66b694ff7503119bc4a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-06-07 11:44:57 +02:00
Joerg Bornemann
99636127d1 Fix prefix_build check for top-level builds
The checks whether we have a Qt prefix build were broken for
top-level builds. Non-prefix top-level builds were incorrectly
detected as prefix builds.

For top-level non-prefix builds QT_HOST_DATA/QT_INSTALL_PREFIX becomes
something like "~/my/build/dir/qtbase" but .qmake.cache (and
.qmake.super) is/are created in "~/my/build/dir".

This patch extends the prefix_build check by probing for the existence
of .qmake.super, which only exists for top-level builds. Also, we add
qt_prefix_build_check.prf as central place for determining whether we
have a prefix build to make sure that qt_configure.prf and
qt_build_config.prf use the same logic.

Fixes: QTBUG-76185
Change-Id: I2b76fe26013496aaf2dac96ea711b06a69550a29
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-06-05 13:02:22 +02:00
Allan Sandfeld Jensen
d212c179db Change default of optimize-debug to off for developer-builds
Backtraces with optimize-debug are less useful due to scoped variables
no longer alive, and some gcc bugs with inlining.

Fixes: QTBUG-75514
Change-Id: I6d62441047daee8f7079d1538dfc92015dd7ea63
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-05-23 12:44:07 +02:00
Volker Hilsheimer
804a18ef0e Document that QHeaderView rendered with themed style might ignore roles
While this is generally true for widgets, QHeaderView's documentation
about how appearance related data roles are respected can be misleading.

Fixes: QTBUG-31804
Change-Id: I93c6562e59ecf771d938d282723169202ac15bc2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-06-05 15:31:42 +02:00
Damien Caliste
4ebac33644 Detect system time zone from linked symlinks
[ChangeLog][QtCore][QTimeZone] The IANA timezone database backend
now properly follows symlinks even when they point to variable
locations like /run or /var (useful when /etc is mounted read-only).

Fixes: QTBUG-75936
Fixes: QTBUG-75527
Change-Id: If0dc2bfa20659e76c3bd062c75597a9ad01ad954
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-06-04 13:27:02 +02:00
Kai Koehne
5f30fd6426 qmake: Cleanup
Fix clang warnings that are disabled in the default build.

Change-Id: I4e773a24884db94acdc6c295d3f66da07cd8a5bd
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-06-05 10:59:43 +02:00
Friedemann Kleint
761f88f8ba Diaglib: Improve formatting of DebugProxyStyle
The class used the default debug operator for QObject, which outputs
the object's address. This makes it hard to compare the log output.

Make the existing QObject formatting helper from the EventFilter
publicly usable by providing a helper with a stream operator.

Change-Id: Ifab83e23cc792a5efe231fd9ae84e0439ab0d609
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-06-04 08:02:12 +02:00
Joerg Bornemann
224a60989e Fix determination of source and build roots
QMake searches a .qmake.conf file to determine the source root of the
project, and a .qmake.cache to determine the build root.

If a .qmake.conf exists but no .qmake.cache in the build directory is
found, a build root would be set that is only valid if the build
directory is at the same depth as the source directory.

The invalid build root resulted in the creation of .qmake.cache files
at "interesting" locations (e.g. high up in the directory tree), a
potential cause for even more interesting build failures in the
future.

Fix this by splitting up the loop that determined build and source
root. Both are now determined independently of each other.

Fixes: QTBUG-76140
Change-Id: Ib5c922b87879fcf2f076298a69abcdbc4e8587b3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-06-04 21:19:37 +02:00
Edward Welbourne
ff4ef79e0d Overhaul Q(Date|Time)+ documentation
Various things were out of date, misdescribed or just plain wrong.

Change-Id: I11b7bd419604067fce2577a42882ebf126629016
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-05-29 15:54:01 +02:00
Jan Arve Sæther
8c7589d992 Do not strip off the fragment and query in the qfileselector
This is needed for cases where we use e.g. "file:///test.html?query#Fragment".
The fragment and query were already preserved for the qrc scheme. This
fixes it for the file scheme.

Change-Id: I5713e4a25372fdd55ac255b1c6228b4dea419244
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-06-03 12:29:49 +00:00
Mikhail Svetkin
6f40331058 macOS: Fix QMouseEvent::button
cocoaButton2QtButton(NSEvent *event) did not handle NSEventTypeLeftMouseDragged,
NSEventTypeRightMouseDragged, NSEventTypeOtherMouseDragged.


Task-number: QTBUG-74763
Change-Id: I9f48230599f16400b49edbff392f712eb1fff782
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-05-28 07:57:22 +00:00
Tasuku Suzuki
9d9b944b44 Fix configure comment in/for -device linux-rasp-pi3-vc4-g++
The name was renamed in 8e445f8434

Change-Id: I5a74b65309cf5dc64621db281fad3a62a2f026b1
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-06-04 17:22:35 +09:00
Tor Arne Vestbø
b53994de5f macOS: Use QMacNotificationObserver over manual notification handling
This also fixes a bug where we were implicitly capturing this inside
the block, which meant that we would crash if the theme was recreated.
The capture is now tied to the lifetime of QCocoaTheme.

Change-Id: I37df8e6c0b33bf41e76d66be3cf29576041a7546
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-05-29 17:11:40 +02:00
Friedemann Kleint
15d73a9f47 Qt Widgets: Make tests pass on High DPI screens and scaling
Use the comparison helpers to do fuzzy checking of geometries.

Change-Id: I00f4403f3bca2e8a3996e938a85ba799e083058c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-05-29 12:52:51 +02:00
Mikhail Svetkin
9a47768b46 macOS: Fix reported mouse event buttons
Use m_buttons instead of currentlyPressedMouseButtons. The latter returns
the state of devices combined with synthesized events at the moment,
independent of which events have been delivered via the event stream,
so this method is not suitable for tracking.

Task-number: QTBUG-74057
Task-number: QTBUG-74121
Change-Id: Iabf99ada6c3d25a995c9ddf895059b70833a9051
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-06-03 05:08:44 +00:00
Joerg Bornemann
4da47d0fba Make sure .pc, .prl and .la files are created for header_only modules
Those modules are TEMPLATE=aux, so they weren't triggering the file creation
here.

To make this work properly we have to:
  - check for TEMPLATE aux in the right places
  - add a dummy target to INSTALLS to actually trigger the creation
  - initialize PRL_TARGET for aux templates

Fixes: QTBUG-75901
Started-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: Idce141629dd34287808bfffd159f92ac28c6c8b1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-06-03 15:06:29 +02:00
Joerg Bornemann
c64f8ca232 Do not write 'Libs:' into .pc files if TEMPLATE is not 'lib'
Especially for header modules we don't want a 'Libs:' entry in their
.pc file.

Task-number: QTBUG-75901
Change-Id: I39037d3132e39dd360532e1425f794ebec28e0bd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-06-03 14:58:39 +02:00
Joerg Bornemann
60136b1a84 Fix meta file replacements if matches are empty
QMake code like
    rplc.match =
    QMAKE_PRL_INSTALL_REPLACE += rplc
led to the generation of invalid sed calls in the Makefile.

It is already actively checked for empty matches, but if *all* matches
are empty, the sed call looks like
    sed foo > bar
which is invalid.

Task-number: QTBUG-75901
Change-Id: I173ed99826414dcf06253a15a247f7d067ee3977
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-06-03 14:58:39 +02:00
Samuel Gaist
1dc1a032a8 doc: Improve the Coordinate System rectangle coordinate examples
QRect and QLine share a constructor with the same signature but
with different meanings. This patch improves the coordinate
examples to show the possibilities and make things clearer.

Change-Id: I76a95ca226c12968ae5b15d4eb12fc2965cb57d2
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2019-05-23 08:39:47 +02:00
Liang Qi
da23302e4d Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" 2019-06-07 13:19:27 +02:00
Liang Qi
9967a011ea Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	qmake/generators/makefile.cpp
	src/plugins/platforms/cocoa/qcocoaintegration.h
	src/plugins/platforms/cocoa/qcocoaintegration.mm

Done-With: Jörg Bornemann <joerg.bornemann@qt.io>
Change-Id: I5a61e161784cc6f947abe370aab8f2971a9cbe78
2019-06-07 13:19:27 +02:00
Timur Pocheptsov
91ab70d17f tst_qnetworkreply - QSKIP/disable tests that deadlock on Windows
We use global object to store errors found by q_X509Callback.
Thus, we also use a lock/mutex. It would appear all tests
involving in-process server and QNAM are prone to intermittent
failures on our Windows VMs - it's always about timeouts due
to the client socket (QNAM) locking and the server socket blocking
main thread while trying to acquire the same lock.

The real fix is to get rid of global variable/locking, we'll
have it later (quite a change and requires a lot of accuracy).

Task-number: QTBUG-76247
Change-Id: Iffc90d9e16783f17f62e836e01c35f22681bdd39
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-06-07 06:39:16 +02:00
Andy Shaw
825b474363 Windows: Use the first entry in the requested families if available
If the font request has the families list set then it should use the
first entry in that if the face name is empty as this will be more
accurate than just the whole family setting which may contain a
comma separated list of family names.

Fixes: QTBUG-75333
Change-Id: Iccc9cde741544af5263cb318da56178adf34299b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-06-05 11:46:00 +02:00
Friedemann Kleint
87ca7c9688 tst_QGraphicsView::cursor2(): Prospective fix for flakyness on Windows
Use QTRY_COMPARE to fix recent fails like

FAIL!  : tst_QGraphicsView::cursor2() Compared values are not the same
   Actual   (view.viewport()->cursor().shape()): IBeamCursor
   Expected (Qt::SizeAllCursor)                : SizeAllCursor

Task-number: QTBUG-76259
Change-Id: Ie9d4bbe45a3be6064ec88ee237360beb92a61481
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-06-07 11:07:39 +02:00
Shawn Rutledge
a978c48284 Blacklist tst_QGraphicsView::cursor2 on Windows
It's really failing only on Windows 10 it seems.

Task-number: QTBUG-76259
Change-Id: Ieb541dc994a17e82478a5cc2643e0a89fd5aa97d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
 
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-06-07 08:28:12 +02:00
Friedemann Kleint
65cfac73bd Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" 2019-05-27 09:17:14 +02:00
Friedemann Kleint
761b71bd20 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Iaf6bd52972b562b9c91d9e93a988d26b0eb9d3b4
2019-05-27 09:17:14 +02:00
Edward Welbourne
14aa1f7d6f Use appropriate encoding rather than UTF-8 when reading from a pipe
The qmake code to read output from dependency-generation was adding
QByteArray values to a QString, thereby tacitly converting from UTF-8;
this is misguided. Hopefully, the command emits its output in the same
local 8-bit encoding that QString knows to convert from.

Simplified needlessly verbose loops (that violated Qt coding style) in
the process.

Fixes: QTBUG-75904
Change-Id: I27cf81ffcb63ebc999b8e4fc57abdb9a68c4d2b3
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-05-24 16:58:04 +02:00
Kai Koehne
0c9b449aa4 Doc: Clarify state of Qt Xml
The state of the module is done, not deprecated, so we shouldn't
recommend users to move away from it in all cases. There's also
no direct replacement for the DOM API.

Fixes: QTBUG-70629
Change-Id: Ifaff9757234bd68a411a3da1403c57bbbcb94693
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2019-05-24 11:54:55 +02:00