Commit Graph

37614 Commits

Author SHA1 Message Date
Frederik Gladhorn
f5962d05d3 Remove skip from tst_QWidget::updateWhileMinimized
This test works for me with KWin and is blacklisted on most linux platforms.
Let's try to remove the blacklisting next.
Using qWait right in front of the QTRY_VERIFY does not add any value.

Task-number: QTBUG-26424
Change-Id: I2dcd5fb3f3cbb64e190c777231b791d1ad9dd704
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-10-19 08:11:11 +00:00
Ryan Chu
c99b8a3f41 Docker-based test servers for network-related Qt autotests on macOS
There is no docker bridge on macOS. Docker document recommends using
port mapping to connect to a container; but it causes a port conflict
if the user is running a service that binds the same port on the host.
An alternative solution is to deploy the docker environment into
VirtualBox and use the host network option.

Task-number: QTQAINFRA-2293
Change-Id: I05dc65c5f8b4be7a1b1874a4ec7c034cc68679ca
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2018-10-18 19:22:46 +00:00
Ryan Chu
0d4d06647a Use environment variable to configure the interfaces of a Dante server
The internal and external keywords in the server configuration are used
to specify the network interface (IP address) that the Dante server
should bind to. Because docker-compose allows a container to join more
than one network (by adding multiple entries under the top level
networks key to a docker-compose file), the default server
configuration (danted.conf) shall be updated in accordance with the
settings in the docker-compose file.

The user can pass the setting of a docker-compose file to containers by
adding environment variables in the docker-compose file. After the
container gets created, the danted.sh script uses the input environment
variables to overwrite the default value of internal and external
interfaces before starting the Dante server.

environment:
    - danted_internal=eth1
    - danted_external=eth1
    - danted_auth_internal=eth1
    - danted_auth_external=eth1

Change-Id: I7c65cdd136ba5dac387bee5e22e1f4335e960101
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2018-10-18 13:18:29 +00:00
Christian Ehrlicher
aaae027435 Qt Style Sheets: fix range of hue in hsl/hsv functions
The hue parameter in hsl/hsv was treated the same way as a the other
parameters although it's range is from 0-359 and not from 0-255.
Fix it by extending the maximum range for the first parameter when
parsing a color value given in hsv or hsl.

[ChangeLog][QtGui][CSS] Fix the range of the hue parameter when parsing
a color given in hsl or hsv

Fixes: QTBUG-70897
Change-Id: I9ffa65a89c0abcca62bae35777ca1cbde3375180
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-10-18 06:36:28 +00:00
Christian Ehrlicher
d65631daa4 Qt Style Sheets: add support for hsl(a) colors
The Qt stylesheets color property did not support hsl or hsla although
CSS 2.1 does support it. Since QColor natively supports this color model
only the color parsing needed to be adjusted.
This also adds some stricter checks for a valid css color definition and
prints a warning about the issue.

[ChangeLog][QtGui][CSS] Added support for hsl/hsla colors

Fixes: QTBUG-58804
Change-Id: Ief65a36a7e0ed0d705dc1fe5a8658e8d07fe9a13
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-10-18 06:36:23 +00:00
Frederik Gladhorn
4afd9234c2 Let QApplication emit paletteChanged
Only QGuiApplication would emit the signal. Untangling the duplicate
code is rather non-trivial, so left alone for now.

Fixes: QTBUG-71186
Change-Id: I4021e3b9ff39718562f4fa3a03c092436b559e9a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-10-17 14:47:16 +00:00
Frederik Gladhorn
ccb396b401 tst_QStyleSheetStyle: use QString() instead of ""
Change-Id: I3bb375108b57059c4fb4f10342f532e20e78c152
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-10-17 14:47:14 +00:00
Mikhail Svetkin
b472e73b02 qdbuserror: Use qOffsetStringArray instead of script generated code
Change-Id: I2498702bcf4706cb717a7481cf6f81ceebb29ae8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-16 18:32:18 +00:00
Martin Smith
0014d81b19 doc: Revert to documenting the actual functions
A few member functions of QCborValue and QCborValueRef were given special
declarations for qdoc to see so that they could be documented as a single
function, but because clang is now used to parse c++, the special declarations
caused parsing errors.

The declarations for qdoc are removed in this update, but the functions are
still documented with a single comment by grouping the \fn commands for the
similar functions together in the single comment.

Change-Id: If97ee2f2bfcd045d2259a4375b31b8884eeb1072
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-10-16 15:55:26 +00:00
Anton Kudryavtsev
5ab9451846 QPixmapFilter: some cleanup
Use unique_ptr instead of plain array. No need to call 'delete'.

Change-Id: Ia77f4f209b1fd83391428d8b82b7acbba48781b9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-10-16 15:27:34 +00:00
Frederik Gladhorn
eb4d39ada0 Remove separation of headers into two lists
This doesn't add any value and just complicates things.

Change-Id: I3a011174e330f212eda99371d2806517ceec45d7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-10-16 14:42:44 +00:00
Mårten Nordheim
13d86d692f Ssl: move _q_makePkcs12 into shared file
It's needed to generate a pkcs12/pfx bundle from our
certificate chains which are then imported into a certificate
store in Schannel and then passed to various Schannel API.

Change-Id: Idb88f42f2aa15eb91c52404ee6c57bf43e983379
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-10-16 10:45:48 +00:00
Mårten Nordheim
1859a76090 tst_QSslSocket: deduplicate datatags and don't cast to int
Some of the enums were cast to int on comparison. That just makes it
harder to know what the values were.

And verifyClientCertificate had 4 cases which were named the same as 4
others.

Change-Id: I09e8e346a6f416236a92073cf9a8f349938d37ef
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-10-16 10:45:41 +00:00
Liang Qi
af6d4d0687 Bring QTestPrivate::checkBlackLists() back
This change partially reverts 641eb4a965.

Task-number: QTBUG-71141
Change-Id: I423332cc89db4b8137e71fdd57798039d429d0d2
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-10-15 17:30:57 +00:00
Joni Poikelin
d88c65a532 Qt 6: Change QMainWindow::toolBarArea to take const pointer instead
toolBarArea took non-const even though const would have been enough.
In the public API do this for Qt 6.

Fixes: QTBUG-45953
Change-Id: Ic99f4dd5a7f344d49d046e3b084b68120f8de3c0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-10-15 12:30:04 +00:00
Simon Hausmann
c9aeb73fd1 Fix build with no-cast-from-ascii
Change-Id: I720ceb4e511c914b924c473470f65b5b248f682a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-14 09:19:18 +00:00
Simon Hausmann
38ead1f24f Fix build without PCH
These inclusions are necessary when compiling without pre-compiled headers.

Change-Id: I4345ad3f6882046e4b8f2ba9d315299e280c9f18
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-13 18:34:51 +00:00
Christian Ehrlicher
daba850df8 QTreeView: small optimization in verticalOffset()
When the scroll mode is ScrollPerItem and uniformRowHeights is not set,
the offset has to be calculated by iterating over all items.
Optimize the loop by calculating the last item before the loop instead
of checking at every iteration.

Task-number: QTBUG-61763
Change-Id: I1d4439fe0fc3f32194f5f368c0486e793048d965
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
2018-10-13 10:51:31 +00:00
Christian Ehrlicher
2672a9a767 QWidget: set brushOrigin in paintBackground() only when really needed
When painting the background for a QAbstractScrollArea, the brushOrigin
was calculated for every brush type although it was not needed. Since
this can be very time consuming (e.g for a QTreeView with non-uniform
row sizes) it should be avoided when possible.
Therefore check if the brush is a texture and skip the calculation if
it is not the case. Also do not restore the old brushOrigin since the
painter is not used at all afterwards.

Task-number: QTBUG-61763
Change-Id: I66cbe1b796cb5cad4c78e656fb86d199d8e4bde9
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-10-13 10:51:26 +00:00
Qt Forward Merge Bot
fedcaf0256 Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I2715ee7c694e5579bcedc7bab0ae68e79d5fd0b6
2018-10-13 00:07:20 +02:00
Oswald Buddenhagen
473d9a5fc7 qmake: fix the precedence of QMAKE_LIBDIR_POST
it must end up in front of QMAKE_LIBS{,_PRIVATE}, but not of
LIBS{,_PRIVATE} (which are preceded by QMAKE_LIBDIR).

Task-number: QTBUG-61982
Started-by: Liang Qi <liang.qi@qt.io>
Change-Id: Id3de01ee0e9b66af02f79949aeb5a0eabd55363f
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-10-12 18:06:49 +00:00
Oswald Buddenhagen
342b13944c qmake: document {,QMAKE_}LIBS_PRIVATE
Change-Id: I6637d5f57d372f63b3cfaeb28c7e48c940887db6
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-10-12 18:06:43 +00:00
BogDan Vatra
56f949ad3c Android: fix compile with NDK r18+
In NDK r18, libc++.so was renamed to libc++.so.XX where XX is the Android
API level.

[ChangeLog][Android] Fixed build issue with NDK r18+.

Task-number: QTBUG-70631
Change-Id: Id0d2955648197e3054e3c69263b5a90d57964f6c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-10-12 18:06:38 +00:00
Oswald Buddenhagen
405c73e495 qmake: make sure QMAKE_LIBS{,_PRIVATE} comes after LIBS{,_PRIVATE}
the early merging of LIBS* into QMAKE_LIBS* meant that we could not
interleave them properly. defer the merging until the points of use.

Task-number: QTBUG-70779
Started-by: BogDan Vatra <bogdan@kdab.com>
Change-Id: I890f98016c3721396a1f0f6f149a9e2b37d56d8e
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-10-12 18:06:33 +00:00
Oswald Buddenhagen
2a3695b7e0 qmake: nuke QMAKE_INTERNAL_PRL_LIBS
it's unused now, and just complicates matters. its interaction with
LIBS_PRIVATE & co. has always been a bit shaky. google produces no
public hits outside qt itself, so let's assume it really remained
internal.

Change-Id: I6606bbabd44f1b76d84e97219e155e38d6f1b3a6
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-10-12 18:06:21 +00:00
Oswald Buddenhagen
d30de09000 qmake: remove support for static archive splitting
this was introduced in 2002 supposedly for qnx4, but doesn't appear to
have actually been used ever. remove it, as it's in the way now.

Change-Id: I54dcabb61e1d3609a1e7a9fa4ff4b25509cfdb7a
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-10-12 18:06:15 +00:00
Andre de la Rocha
4d51e099b3 WinRT QPA: Fix crash in QWinRTBackingStore::flush()
QWinRTBackingStore::flush() was not considering the possibility
that the supplied region may fall partially outside the bounds
of the paint device. This resulted in possible accesses to invalid
memory addresses, causing a crash. This bug was exposed by an update
in ANGLE that was causing a crash when running tst_QTableView::bigMode
with a small screen size. With this fix the function will use the
intersection of the supplied region with the paint device bounds.

Change-Id: I2f0f0f7f5510688bfa1459320a0c146df6be65d1
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
2018-10-12 14:42:03 +00:00
Laszlo Agocs
9098ef697a windows: Disable shader disk cache for all Intel GPUs
Follow up to dff9bb2f9b

Task-number: QTBUG-64697
Change-Id: I73a114dd3c75f3ed1272fa73dad378ecfdc0db09
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-10-12 14:09:38 +00:00
Martin Storsjö
d92c25b1b4 qmake: Fix building with lld with mingw makefiles
lld for coff/mingw doesn't support linker scripts, which qmake used
for passing larger numbers of input file names to the linker.

Instead of using a fullblown linker script for this, just use a plain
response file, which both lld and binutils ld support.

Change-Id: I3aace7902fa6ca861a0a9fe67feaa236e7ea417b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-10-12 14:01:59 +00:00
Edward Welbourne
641eb4a965 Remove GPU_BLACKLIST support from QTest
This reverts 4fe68ffbe5,
1dfc16f6da and
9545bee98a2431d4ef4c3449631a5fcb8d9bd57a; this feature has not been in
use for some time, so is just dead code.

[ChangeLog][QtTestLib] Removed support for GPU_BLACKLIST files.
Reimplementations or equivalents of QTEST_MAIN() should remove their
uses of QTEST_ADD_GPU_BLACKLIST_SUPPORT and its _DEFS; they are still
vacuously defined, but serve no remaining purpose and shall be
undefined in due course.

Change-Id: I94ffd5c37ce4e1f7cf25d3c7ae8d40696b74c911
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-10-12 13:59:41 +00:00
Allan Sandfeld Jensen
8d2deea49c Report compiler and version in configure overview
It is not always easy to spot the compiler version in the build or
configure log, so report it explicitly to make our lives easier when
trying to figure out why a specific build might have failed.

Change-Id: I1c84199aad4a98a30b0b4c4fbf2554008dc3ba2d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-10-12 13:24:19 +00:00
Gatis Paeglis
8315acfb16 Revert "glib dispatcher: ensure all window system events are flushed"
This reverts commit 341bfcd1ea.

As it turns out there might be use cases where we want to have proper
windowing system event integration with glib dispatcher via g_source_attach().
For example with gtk_dialog_run, where GTK blocks in a recursive main loop.
We want to continue dispatcing our windowing system events during this nested
event loop. Not having a proper glib integration can result in rendering issues,
e.g. when resizing parent window via mouse while GTK-based dialog is shown. Can
be seen on examples/widgets/richtext/textedit/ -> Format (from menu) -> "Color..."

The issue from 341bfcd1ea actually should be fixed inside XCB platform plugin,
by improving integration with event dispatcher. That is handled in follow-up patches.

Change-Id: Icabc6d841a554aefbdd460765a3165d22e65f651
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-10-12 10:21:32 +00:00
Gatis Paeglis
466d65cd5b xcb: remove runtime check for xcb_poll_for_queued_event
xcb_poll_for_queued_event() was introduced in libxcb 1.8.
The minimal required libxcb version was bumped up to 1.9 in
1f5d791708. Before this version
bump we needed the runtime check to support older versions
of libxcb.

Updated connections in the event reader to use the new signal
and slot syntax. Removed threadedEventHandling() method because
now it is always 'true'.

Change-Id: I0bce61fd478a871d35e676239ee5280c4f40be8a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-12 10:21:22 +00:00
Albert Astals Cid
b6427ded65 Printing: Expose default and supported color modes
We had this information internally but there was no public API for it

Fixes: QTBUG-4071
Change-Id: Ic7f855e32a6870129e7723a47d31a629e0ea1aca
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-10-12 09:19:16 +00:00
Allan Sandfeld Jensen
e8fd992849 Add support font-kerning CSS3 property
Change-Id: Ie3894481ded40d20091bd0103ac426c1086f943f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-10-12 07:16:30 +00:00
Peter Hartmann
cdbebe6280 Qt namespace: Remove comment about stylesheet propagation
This is an opt-in feature to control whether font and palette should
be propagated, and there is no reason this should be removed in Qt 6.

This has been introduced in commit
7293200ace .

Change-Id: I666c09d716bf7033953e98108da3f7711f3bc321
Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com>
Reviewed-by: Martin Koller <kollix@aon.at>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-10-12 06:49:53 +00:00
Oswald Buddenhagen
9f89e07d75 Bump version
Change-Id: Icf0c81067f65b922a8473f9dce4aecefadf5b32d
2018-10-11 12:59:42 +02:00
Anton Kudryavtsev
02f7caaa7d QPixmap: use rvalue more
Change-Id: Ifb8c014abf6e02dc782fab2d653e4edfc4972125
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-10-10 12:20:32 +00:00
Eskil Abrahamsen Blomfeldt
d7944c2921 Remove QEXPECT_FAIL from test on macOS
The flakiness was reported for macOS 10.8 a long time ago and I
am not able to reproduce it, so lets remove the workaround for
it.

Task-number: QTBUG-32690
Change-Id: I92e64065c7480b8f4c5d1d1e6cb5fdd218a70313
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-10-10 08:24:01 +00:00
Allan Sandfeld Jensen
f864a62ccd Add missing null checks after detach
A few places we didn't check if detach() succeeded including
in reinterpretAsFormat(), where it can be undone.

Task-number: QTBUG-70785
Change-Id: Ibcc8e26e2961f6288eb7a045ae1cb28e59213a49
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-10-10 08:23:31 +00:00
Martin Storsjö
9436e3c315 configure: Treat win32-clang-g++ the same as win32-g++
This fixes configure with win32-clang-g++ as the native compiler.

Change-Id: Iced43d70b9a0aa413d1f5f6034b42b976cb7c39e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-10-10 04:10:40 +00:00
Alexander Volkov
1a9ebfabcd QWidgetTextControl: Get rid of dependency on QTextEditPrivate
QWidgetTextControl is a base class for controls of text widgets
and widget-specific code should be used in derived classes, so
override loadResource() in QTextEditControl.

Change-Id: I6d829ead0837419530094d19e0ca53a964413e92
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-10-09 22:03:54 +00:00
Alexander Volkov
941101bd5f Fix drawing of QGroupBox's title when check box is higher than text
Task-number: QTBUG-70623
Change-Id: I36c3b3e0250a4d2b0a2a2f03793f0eae3d868de2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-10-09 22:03:41 +00:00
Alexander Volkov
d66253665a QSideBar: take the icon size from a style
Change-Id: I9c4677b42cc920b7bb016b61b8c1fd34fe67aa30
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-10-09 22:03:32 +00:00
Lorn Potter
49f1f944bc wasm: rewrite QNetworkReplyWasmImpl to remove EM_ASM
and fix handling of incoming binary data

Change-Id: I31e97505ad4ff64cf8e380df5d0d6b70c3cd60b0
Reviewed-by: Ryan Chu <ryan.chu@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-10-09 20:44:24 +00:00
Edward Welbourne
41418a92b7 Remove spurious Q_FALLTHROUGH()
Two cases with no code between them don't need a fall-through marker.
The only code in the first case is subject to #if-ery; it either
returns, without falling through, or has no code there.  Putting in an
overt Q_FALLTHROUGH() confused a rather dumb compiler ...

Change-Id: Icc034be08859cc1656401af1c62367aec302668b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-10-09 16:12:37 +00:00
Allan Sandfeld Jensen
b7c5c2e65b Add NEON optimized ARGB32 unpremultiply routines
Mirroring similar routines recently added for SSE4.1

Change-Id: Ibb9d10cc34655ce1dc0e97fdff4e4f6a81d47d05
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-10-09 13:17:47 +00:00
Allan Sandfeld Jensen
25830cf912 Fix builds without DTLS
Change-Id: Ic7215c7aa0bf6f7b37ae34649d809f2e1e1ee95b
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-10-09 13:14:42 +00:00
Martin Smith
eeb6ceb192 Revert "qdoc: Add default include dirs to qdoc command line"
This reverts commit 4bdd8d4eca.

It contains an error.

Change-Id: I51052029f001b9e82c2a53de15b4ba354aafdbae
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-10-09 10:12:48 +00:00
Eskil Abrahamsen Blomfeldt
4f2e0117f9 Deprecate QFont::lastResortFamily() and QFont::lastResortFont()
These functions have not been used by the font selection algorithm
in Qt 5. Calling lastResortFamily() always gave you "helvetica"
and lastResortFont() would actually crash.

Since we cannot remove them before Qt 6, we deprecate them for now
and update the documentation to give a more accurate description
of how the font matching works in Qt 5.

Note that in the non-native QFontDialog, it tries to implement its
own font matching algorithm and therefore was calling
lastResortFamily(). Since fixing QFontDialog is not within the
scope of this patch, I have just replaced the call by "helvetica"
directly, so that it will continue to behave the same.

[ChangeLog][QtGui][Text] Deprecated QFont::lastResortFamily()
and QFont::lastResortFont() which are not in use in Qt 5 and
did not provide any useful information.

Task-number: QTBUG-60813
Change-Id: Id8fe7bfdd427292ef86bc8405de03cb466b9b62a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-10-09 06:55:42 +00:00