Commit Graph

38208 Commits

Author SHA1 Message Date
Volker Krause
2f4eea5b9c Also integrate Android AAR libraries
This works in the same way as JARs are currently provided by dependencies,
and becomes necessary when needing e.g. the Android support/compat libs
for implementing the Java side of a library.

While this is not relevant (yet?) for Qt itself, we hit this with KDE's
notification framework.

Change-Id: Ia87d1a048a493f7bc311abf5761f33d1943cfbe9
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-01-05 15:52:56 +00:00
Sona Kurazyan
012f7bb622 Copy backend configuration while setting dtls config
When setting dtls configuration, we should also copy
backendConfig, otherwise this setting will be ignored.

Change-Id: I4df53e8e6d8c2bd0eb7dddb9928b7883c401d60a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-01-05 09:22:36 +00:00
Ville Voutilainen
1fb41a3869 Fix qbswap calls for Big Endian targets
Task-number: QTBUG-71945
Change-Id: I5356f8e32d00ea591b1f65cdd4111276fcf876ac
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Khem Raj <raj.khem@gmail.com>
2019-01-05 09:22:13 +00:00
Tor Arne Vestbø
1075f10184 macOS: Optimize detection of dark mode
Change-Id: I579527c54f8453c1e4f57bab7eebfc576b6ad365
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-01-04 20:55:14 +00:00
Christian Ehrlicher
406d1dcfd7 Revert "QListView: Honor css :first/:middle/:last Pseudo-States"
This reverts commit 1aa3edf3f8 since it created a
regression within the windows styling.

Task-number: QTBUG-27110
Fixes: QTBUG-72748
Change-Id: I7e5004be6cf398ef0b533a25066d924310ed1e48
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-01-04 17:03:17 +00:00
Andy Shaw
6191249259 Use the AndroidDeadlockProtector when using a blockingqueued connection
This amends 2afe4a1a07 to account for
cases where it was crashing when it was using the QueuedConnection.
The problem came from the fact it was blocking while waiting for a
surface update which was pending to come later on, but the Android
thread was already blocked which prevented it from being processed.

Fixes: QTBUG-72101
Change-Id: I43e355cf1a7792599f23827903d065b1b1298902
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-01-04 12:39:15 +00:00
Topi Reinio
3b03150aa2 Doc: Restore documentation for QTest functions in other modules
Qt Test library sources specific to Core, GUI and Widgets modules
were moved around in commit 88867e39b.

The new source locations must be referenced in Qt Test documentation
configuration. The same sources are excluded in their original doc
projects, and the related snippet file is moved over to qttestlib.

The commit also fixes the remaining documentation issues for Qt Test.

Change-Id: Ibe011aa83639e574d647f12bc9e53e618781bce6
Reviewed-by: Martin Smith <martin.smith@qt.io>
2019-01-04 12:16:56 +00:00
Kai Koehne
17fe5fc128 Restore behavior for QToolTip not wrapping by default
This partially reverts 7a1d77b6e4, which caused regressions
e.g. in Qt Creator.

The behavior of QToolTip for wrapping has been always special in
that wordWrap was enabled as soon as some HTML tags were
detected, while plain text was not wrapped. This is arguably bad API,
but by now a lot of applications depend on this exact behavior, so
I don't think it's worth to change this anymore.

What can be kept though is the check for overlong tooltips that do not
fit on the screen. In this case wrapping makes sense.

[ChangeLog][QtWidgets] Reverted a Qt 5.12.0 behavior change in
QToolTip that made plain tooltip text be wrapped automatically.

Fixes: QTBUG-72568
Change-Id: I6fa3e455f09cffaeb8ad1cdc6e81d71ae344dd34
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-01-04 11:25:47 +00:00
Tony Sarajärvi
8c2ca29045 Revert "Blacklist tst_QTimer::basic_chrono on macOS"
Incorrectly blacklisted.

This reverts commit 40a7c57ba9.

Task-number: QTBUG-61013
Change-Id: I7d9dc4a4b1c8d7ff77ab75c61027b908ffb74552
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-01-04 09:45:41 +00:00
Vitaly Fanaskov
f7dc6042cb Remove dead code
Task-number: QTBUG-44131
Change-Id: Ic092f2be5855840d6467560159c12f3c5aa36344
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-01-04 09:42:14 +00:00
Topi Reinio
66c9161d05 Doc: Fix link in QImage::load() documentation
Change-Id: I9a3a059a860f5b21253ab0e7cdc616cbfc9a3885
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-01-04 09:36:40 +00:00
Tor Arne Vestbø
4dc2bc323c macOS: Remove Mojave forward-declarations now that we build with Xcode 10
Change-Id: I8528932f3744fbf3473219b6eeda7c26ac039b67
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-01-03 18:38:18 +00:00
Tor Arne Vestbø
88e34b0a46 CoreText: Fix inaccurate use of pixelSize when dealing with pointSize
Change-Id: If46fa157bc921efd8145823c806b6b04f49233cf
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-01-03 18:38:15 +00:00
Vitaly Fanaskov
d8bbb5ee0e Respect roles of buttons added to QMessageBox
When a button added to QMessageBox has AcceptRole or YesRole, the signal
accepted() will be emitted upon click on the button. If the button has
RejectRole or NoRole, the signal rejected() will be emitted upon click
on the button. If a button has a different role, neither accepted() nor
rejected() will be emitted. This works for both standard and custom
buttons.
The signal finished() with result code will be sent regardless of a
clicked button role.
Also added documentation strings for some methods of private classes in
order to have better tooltips in IDE(s).

Task-number: QTBUG-44131
Change-Id: I521a4e5112eb4cf168f6fbb4c002dbe119aeeb09
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-01-03 18:38:12 +00:00
Andre de la Rocha
df27484fc0 Windows QPA: Fix mouse pointer capture and Enter/Leave events
Qt expects the platform plugin to capture the mouse on any button press
and keep it captured until buttons are released. The missing capture
logic was causing extra Enter/Leave events to be generated.

Change-Id: I5a78ea600374701c740f395b38ba5abd51f561d8
Fixes: QTBUG-72600
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-01-03 15:23:39 +00:00
Samuel Gaist
1606a8aa1c Doc: fix typo in QAbstractSocket::bind documentation
Fixes: QTBUG-72780
Change-Id: I16d89d29f573dba37ed8e1986ed9677117ca6aad
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2019-01-03 11:38:09 +00:00
Samuel Gaist
7ca39bf7bc Doc: cleanup semaphore example
This patch removes unused signal and variable.

Change-Id: Ia4eaf083493d3d37e3ff22e0380d5a5ee69f91cf
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2019-01-03 11:37:22 +00:00
Gatis Paeglis
dd988e2074 configure: add XCB GL integration features
This way Qt builders can see if everything has been configured
properly for XCB GL integrations at configure time, instead of
at the end of the build process.

Change-Id: I00740cc2edd7f6ecfcda0ddfb22649d1b4db4aa2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2019-01-03 10:29:17 +00:00
Gatis Paeglis
0decdcb754 configure: add X11 subsection in "Features used by QPA backends"
xcb-xlib is used by XCB and EGLFS_X11.

xlib is used by XCB, EGLFS_X11 and offscreen plugin (not listed
currently under "QPA backends").

egl_x11 is used by XCB GL integration plugin and EGLFS_X11.

Renamed X11 -> XCB under "QPA backends", because that is the
correct QPA name.

Change-Id: I455ac3a41da3ab84453d8de0edc657c3a5e064c9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2019-01-03 10:09:47 +00:00
Gatis Paeglis
7d8fe4d98f configure: make xcb-render a hard dependency for xcb plugin
Its been available by default since at least libxcb 1.5, and in Qt 5.12
we have even increased the minimal required libxcb version to 1.9.

Having configure switches for extensions is a legacy from Qt 4. There
are still few exceptions in Qt5, where the reason is that we have to
support Linux distributions that don't ship recent enough libxcb.

Task-number: QTBUG-30939
Change-Id: I0a02d93b6411119ec018b0cb8fe5c63beeab62ee
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-01-03 10:09:40 +00:00
Gatis Paeglis
6899117a59 configure: properly atomize render vs. renderutil
xcb-render is a C interface for X11 extension. xcb-render-util is a
utility library that complements xcb-render by providing convenience
functions and interfaces which make the raw X protocol more usable.

Bumped xcb-render-util version to avoid having include hacks. We were
bundling 8 years old release 0.3.8 (Apr, 2011). 0.3.9 is the latest
release and it was relesed 4,5 years ago (Jun, 2014). All CI machines
have 0.3.9. The only thing that have changed in xcb-render-util sources
since 2011 is that we don't need to have various hacks to include
xcb_renderutil.h in C++ files. Upgrading bundled XCB libs was also
requested in QTBUG-71109.

Task-number: QTBUG-71109
Change-Id: Ib261f7584ad81be95660123b007e2200a3042f4c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2019-01-03 10:09:34 +00:00
Nico Vertriest
651b4845de Doc: Fix linking errors qtbase
Change-Id: I225e59bea0a8eac14fd11ef2b091907ae955c447
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2019-01-03 09:45:23 +00:00
Eskil Abrahamsen Blomfeldt
ceddc14af1 Draw ShowTabsAndSpaces symbols with the correct font
We would draw the tab and space symbols without setting the correct
font on the painter first.

[ChangeLog][QtGui][Text] Fixed so ShowTabsAndSpaces will use the
correct font.

Fixes: QTBUG-62540
Change-Id: I3b7d6d317473e7aab722dafe1a128c57a830f634
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2019-01-03 08:48:41 +00:00
Oliver Wolff
f9d8762d37 winrt: Remove yet another Windows Phone leftover
Hardware and camera button handling are phone specific APIs we no longer
support in Qt.

Change-Id: Ib11f894a426b8e4b71acf24876437ddab2cea548
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2019-01-02 23:32:34 +00:00
Christian Ehrlicher
7ba16f4c1e QComboBox/WindowVistaStyle: restore focus rect
The focus rect for the QComboBox was removed during the refactoring done
in 5c60e4b8f9.
Readd the functionality in a similar to
QWindowsStyle::drawComplexControl().

Fixes: QTBUG-69239
Change-Id: I74e4060fbe52432318e3c986fc838cf353d99843
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-01-02 21:32:34 +00:00
Andre de la Rocha
29ea287716 Windows QPA: Avoid duplication of mouse events
The code being removed was added as a workaround to support the use of
QCursor::setPos() with unit tests. This function was used to move
the Windows mouse cursor, internally calling SetCursorPos(), which
generates only WM_MOUSE* messages, bypassing the pointer messages.
However, the workaround had the unintended effect of generating
duplicated mouse events for normal mouse movement, which caused issues
like the one described by QTBUG-70974. However, it seems the tests are
no longer depending on it, allowing it to be removed.

Fixes: QTBUG-70974
Change-Id: Iaf0d64c73951ab1b660e9bb90e7ee009e53fbd3a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-01-02 15:29:13 +00:00
Nico Vertriest
9636a43abc Doc: Update page Tamil Script Code for Information Interchange
Task-number: QTBUG-56668
Change-Id: I173d73ef5e9b08e865cb75fa03849665fcda652e
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2019-01-02 09:42:59 +00:00
Thiago Macieira
804eea08b4 Work around FreeBSD 12.0 breaking source compatibility with IFM_FDDI
The macro disappeared.
qnetworkinterface_unix.cpp:467:14: error: use of undeclared identifier 'IFM_FDDI'; did you mean 'IFT_FDDI'?

Fixes: QTBUG-72775
Change-Id: I548dbfddb69b4fd6a0a3fffd1574e1ad4e670e5b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2019-01-01 13:58:33 +00:00
Alexander Volkov
f05cc4144e QDialog: Pass transient parent as a parent to native dialogs
Sometimes it's needed to show a native dialog for another process,
for example in xdg-desktop-portal-kde. In this case we have WId
of a parent window which can be used for calling
QWindow::setTransientParent(QWindow::fromWinId(...)).

Pass this transient parent to a native dialog so it could use
it as a transient parent for itself. Rename
QDialogPrivate::parentWindow() for clarity.

Change-Id: I68974ddea35f9366a0ddffe602d9d028f45e26fa
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-12-24 16:51:14 +00:00
Luca Beldi
ff835a5030 Fix QStringListModel::setData to check for actual changes
QStringListModel::setData documentation states that
"The dataChanged() signal is emitted if the item is changed."
This patch actually respects the doc. setData will check that the data
actually changed before sending the dataChanged signal.

[ChangeLog][QtCore][QStringListModel] setData will now emit the
dataChanged() signal only if the string set is different from
the one already contained in the model

Change-Id: I4308a6f3b4851203fb899c5e29a36076e0c32f2f
Reviewed-by: David Faure <david.faure@kdab.com>
2018-12-24 08:07:36 +00:00
Paul Wicking
0c95c11e65 Doc: Add missing \since to QLineEdit's inputRejected signal
The signal was introduced in 5.12.0, according to
qtbase/dist/changes-5.12.0 (which refers to QTBUG-57448).
Also confirmed in qtdoc/doc/src/whatsnew/whatsnew512.qdoc.

Added in commit c901cdadc0.

Fixes: QTBUG-72386
Change-Id: I291dfefe40eea0e9208bda6eed6dd96e41ba6d2b
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-12-23 18:29:59 +00:00
Tor Arne Vestbø
3306b16239 macOS: Only do gamma-corrected blending for subpixel-antialiased text
The grayscale font-smoothing doesn't expect to be linearly blended,
as first assumed.

Amended nativetext manual test to better diagnose the native Core
Text behavior. Non-linear blending will result in the magenta
text having a dark outline against the green background.

Change-Id: I24a5f04eb1bd66fb98d621078d80ee9b80800827
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-12-23 12:00:07 +00:00
Tor Arne Vestbø
5af60d3b37 macOS: Prevent checking for stale SDK without the required SDK name
There's no need to check the SDK at the root exclusive-build Makefile,
we can leave it to the individual build passes where the SDK variable
is available.

Fixes: QTBUG-72449
Change-Id: Ic829babf4c76e6d20812de0b94120199ebfb300c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-12-23 11:58:48 +00:00
Morten Johan Sørvig
f0dd6655e1 Fix QSystemTrayIcon stale pointer access
The child imageCell is a NSView and may be retained by Cocoa,
which means it may outlive the parent QNSStatusItem.

Clear its parent pointer to avoid referencing a stale
pointer.

Task-number: QTBUG-47929
Change-Id: I6078070b8c9f512ecd034fee4e54b1d8282dabdf
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-12-23 09:23:50 +00:00
Morten Johan Sørvig
fb67ac6368 Modernize QNSImageView implementation
Use Objc properties instead of instance variables.

Change-Id: I4bddf2c9c824467d7c42dd5bb0c3b4aacd6b27be
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-12-23 09:23:42 +00:00
Morten Johan Sørvig
f4b77570e2 Make QWindow::type() reflect ForeignWindow status
The Qt::ForeignWindow flag is or’ed to d->windowFlags
by QWindow::flags(). Use this getter function instead
of accessing d->windowFlags() directly.

Change-Id: I6a82aa7e379ba51272954ffe7b87f108034da8c6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-12-22 21:51:48 +00:00
Morten Johan Sørvig
6881699d76 Fix layering violation in isForeignWindow()
QPlatformWindow::isForeignWindow() should return whether
the native window is of the foreign window type, or
false if the platform (plugin) does not support this
concept.

It should not call QWindow::type(), since that function
may itself be implemented in terms of isForeignWindow().

Change-Id: Ib67a5a44c5c1db0acb4d3bc155e187f8164146d1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-12-22 21:51:38 +00:00
Tor Arne Vestbø
69f7115c43 macOS: Merge qt_mac_createRoleFonts into only caller
Change-Id: Id6e61a70e4ebe47896dcbc8680d1d6b06c747871
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-12-22 14:33:33 +00:00
Kai Koehne
8915c9715a Doc: Remove pre-Windows 7 from QCollator documentation
The code path that this refers to was removed already for Qt 5.11 in
commit 53fb2c48ef.

Change-Id: I4a7ae1b89b24c0ab7ceaa43f763c7ef422ca4900
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-12-22 10:00:49 +00:00
Kai Koehne
b978cdcb26 Make sure -prefix documentation is also valid for top-level build
Fixes: QTBUG-71540
Change-Id: I1c8c66706beaa130f9eb7a6f2ee02a21f98d8afc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2018-12-22 09:59:35 +00:00
Kai Koehne
07e5edf991 Doc: Consistently mark QT_XYZ_CAST_FROM_ASCII with \c
Otherwise it gets linkified, which looks inconsistent. Instead,
use \sa for functions where QT_NO_CAST_FROM_ASCII
or QT_RESTRICTED_CAST_FROM_ASCII is referenced.

Change-Id: Ic3933d8c4c81c963215de7f3aac4d0a11e61cbc2
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-12-22 09:59:25 +00:00
Kai Koehne
28a28af182 QtCore: Unify license headers
Change-Id: Iff4f6da9f0bbf7a0627101f455dd8467681b2783
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-22 09:58:09 +00:00
Kai Koehne
f372714e96 Doc: Fix typo in QStyle
Change-Id: Ic979cb66acb3f8824aefb6ad858c0f746ce3e02b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-12-22 09:57:42 +00:00
Milla Pohjanheimo
4a0ed282cf Add binary compatibility files for 5.12 for QtBase
Binary compatibility files added.

Change-Id: I2543902fb7ac97270db7fb79ae09641898cc8ba4
Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-12-21 19:42:57 +00:00
Thiago Macieira
a7cea16005 MSVC x86: implement add_overflow for quint64
There's no 64-bit ADD instruction, so we make do with ADD+ADC. This is
what Clang generates. ICC uses the two as well, but then performs some
subtractions to find out if it overflowed. GCC for some inexplicable
reason attempts to use SSE2 if that's enabled, otherwise it performs the
subtractions like ICC.

Alternative implementation which generates better code, but violates
strict aliasing:

 uint *low = reinterpret_cast<uint *>(r);
 uint *high = low + 1;
 return _addcarry_u32(_addcarry_u32(0, unsigned(v1), unsigned(v2), low),
                      v1 >> 32, v2 >> 32, high);

Manual testing shows this works. tst_qnumeric passes in debug mode. MSVC
2017 15.9 still miscompiles in release mode (reported to MS as [1]).

[1] https://developercommunity.visualstudio.com/content/problem/409039/-addcarry-u32-wrong-results-with-constant-inputs.html

Change-Id: I61ce366d57bc46c89db5fffd15704d53ebd4af3c
Reviewed-by: Thomas Miller <thomaslmiller91@gmail.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-12-21 17:48:56 +00:00
Antonio Larrosa
9ab04795e2 Fix qfloat16 methods definition without declaration when using Q_QDOC
This fixes qtdoc failing to build on i586 because of an assertion in
libclang since Q_QDOC is defined and thus the declaration of the
qfloat16(float) constructor and operator float() are removed, thus
their definitions should be removed too, which is what this patch
does.

Fixes: QTBUG-72725
Done-with: Michal Srb <msrb@suse.com>
Change-Id: I6424873425d46345e09f411f9ce88f2520825da4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-12-21 17:21:34 +00:00
Andy Shaw
c879fc2ab7 Pass the alignment to QFontMetrics::elidedText()
When the text is elided, it needs to account for the mnenomic if
there is one so it does not end up eliding the text unnecessarily.

Change-Id: I77c15067f3e8d57d8deca83090bcb80554c3733f
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-12-21 13:26:08 +00:00
Andy Shaw
4aac07d023 Android: Add support for setting/getting html and uris from clipboard
This also updates the used API to use ClipData and not the deprecated
ClipboardManager API.

[ChangeLog][Platform Specific Changes][Android] QClipboard now supports
HTML and URI data.

Fixes: QTBUG-47835
Fixes: QTBUG-71503
Change-Id: I43f82bfc63b3d159087c0fb6c840c186a370e20c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-12-21 13:25:54 +00:00
Eskil Abrahamsen Blomfeldt
28b2232e78 Don't dither antialiasing on glyphs when converting to mono
When glyphs are converted to monochrome from an alpha map,
it does not make sense to apply high quality dithering, because
the result will be that some the subpixels along the edges
that cover only part of a pixel are filled. This causes the
glyphs to look jagged and ugly.

Instead, we use ThresholdDither to fill all pixels that are
>= 50% opacity.

[ChangeLog][QtGui][Text] Improved appearance of monochrome
text on some platforms.

Fixes: QTBUG-69702
Change-Id: I0f44a8d73f6b9f1eb59f297d66438575f1e9db10
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-12-21 10:27:22 +00:00
Eskil Abrahamsen Blomfeldt
e6880e7cd1 Fix text shifting vertically when elided
When eliding text we would check for the existence of the ellipsis
character and fall back to using the dot if it was not available.
However, when font merging was in use, we would also use ellipsis
from a fallback font if available. This could cause the metrics
of the text to increase if the fallback font had larger metrics,
and the result was that text could shift when elided.

It is better to prefer the dot from the current font than to use
the ellipsis from a fallback, so we only use the ellipsis if
it is in the main font.

[ChangeLog][QtGui][Text] Fixed a bug where eliding text could
change the height of its bounding rectangle for certain fonts.

Fixes: QTBUG-72553
Change-Id: Ib27fc65302465ddce661801bcc5ae32e55f1aeb9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-12-21 10:27:12 +00:00