Commit Graph

34268 Commits

Author SHA1 Message Date
Thiago Macieira
ff1ffa7577 Add support for AVX-512 intrinsics found in MSVC 2017 15.3
It seems the compiler supports /arch:AVX512 and /arch:AVX512F but none
of the other switches (and neither are documented). And when you pass
those, you also get Conflict Detection (CD), Double & Quad (DQ), Byte &
Word (BW) and Vector Length (VL), which matches the ICC switch
"-xCORE-AVX512". Unlike ICC, there doesn't seem to be an option to
enable only the common part of AVX-512.

Support for Intel Xeon Phi's current features (Exponential &
Reciprocation and Prefetch) and future ones (IFMA, VBMI, 4FMAPS, 4VNNI
and VPOPCNTDQ) seems to be missing altogether.

See https://blogs.msdn.microsoft.com/vcblog/2017/07/11/microsoft-visual-studio-2017-supports-intel-avx-512/

Change-Id: I98105cd9616b8097957db680d73eb1f86e487e6d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-11-30 08:30:37 +00:00
Thiago Macieira
f984c45373 QStorageInfo: use Linux's /proc/self/mountinfo to get the subvolume
This allows us to get "subvolumes" on all filesystem types. We do that
by detecting the subdirectory that was bind-mounted.

/proc/self/mountinfo has been in the kernel since 2.6.26. Since btrfs
was only added on 2.6.29, there is no loss of functionality for btrfs
users.

I've tested this with subvolume or mountpoint names containing spaces,
tabs and newlines.

Change-Id: I57a1bd6e0c194530b732fffd14f4fa418255d839
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-11-30 08:30:21 +00:00
Thiago Macieira
498ef7f9d7 Merge "Merge remote-tracking branch 'origin/5.10' into dev" into refs/staging/dev 2017-11-30 00:51:32 +00:00
Konstantin Tokarev
4d0add31fd Add QNetworkRequest::ResourceTypeAttribute for use in QtWebKit
Often requested feature in QtWebKit is reporting what kind of resource
corresponds to particular QNetworkRequest, similarly to
QWebEngineUrlRequestInfo::resourceType(). This information can be used
to modify or block certain request types in user's implementation of
QNAM::createRequest().

The only clean way to pass this data is via attributes of QNetworkRequest,
so enum value needs to be reserved. It's unlikely to be used anywhere
outside of QtWebKit, however this is already the case for
SynchronousRequestAttribute.

Change-Id: I51a258e5e4b78e6e823c30c48d0c644356de6b17
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-11-24 23:28:07 +00:00
Giuseppe D'Angelo
c3632d8036 tst_qstringlistmodel: remove an invalid test
The test is removing 2 rows starting at the last row of a model.
As the comment indicates, that's clearly invalid.

Change-Id: I43ef00d602934965b206e2ba591ff8fd0a6ae398
Reviewed-by: David Faure <david.faure@kdab.com>
2017-11-24 18:23:40 +00:00
Giuseppe D'Angelo
77a7b5c916 tst_qitemmodel: do not pass illegal indices to QAbstractItemModel APIs
That's undefined behavior, so don't test it.

Change-Id: I468637ff1835f4f50859ac3d9876463221a3285a
Reviewed-by: David Faure <david.faure@kdab.com>
2017-11-24 18:23:37 +00:00
Alexander Volkov
bd72950fbe xcb: Use fallbacks for Xcursor names
Some cursor themes may not contain cursors with common names,
then fallback names should be used. The fallbacks in this
change were taken from the wayland plugin.

Change-Id: I7fcc47a71cafe41c88a21a7168acd3a274b71693
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-11-23 21:40:33 +00:00
Allan Sandfeld Jensen
597c83492a Fix search-replaced broken comment
Also we can't use constructors for multiple reasons now that it is C.

Change-Id: I27f3e011cc1f67f5aa134eaf3ab934456cead902
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-11-23 21:31:01 +00:00
Allan Sandfeld Jensen
f2820e8006 Fix qFloatFromFloat16_fast on NEON
An over-correction snuck in at some point.

Change-Id: Ib67c4f6ecf8e6e244a0598c025a7cb7c15401070
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-11-23 21:30:51 +00:00
Liang Qi
153e8b49ad Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	src/network/access/qhttp2protocolhandler_p.h
	src/network/kernel/kernel.pri
	src/network/ssl/qsslkey_qt.cpp
	src/plugins/platforms/cocoa/qcocoascreen.mm
	src/plugins/platforms/windows/accessible/iaccessible2.cpp
	src/plugins/platforms/windows/accessible/iaccessible2.h
	src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
	src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp
	src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h
	src/widgets/widgets/qmenu_p.h
	tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
	tests/auto/other/qaccessibility/tst_qaccessibility.cpp
	tests/auto/testlib/selftests/expected_cmptest.lightxml
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt
	tests/auto/testlib/selftests/expected_cmptest.xml

Done-with: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
2017-11-23 09:36:03 +01:00
Błażej Szczygieł
29f4425921 xcb: Speed-up image scrolling
Prevent image scrolling on client-side whenever possible - do it on
server-side. When using shared memory use server-side pixmap for
scrolled contents.

Put new image which will be scrolled to the server-side pixmap and do
scroll on it. Then do a server-side copy of a scrolled area from pixmap
to he window. Also put non-scrolled image directly to the window.

When not using shared memory also don't do redundand client-side image
scrolling.

When using OpenGL compositing first copy scrolled image area from/to
server-side pixmap.

Task-number: QTBUG-64414
Change-Id: Ibf5f8cfb40cd4fb3e4a75a1b92eecb625f4fd74f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-11-23 07:01:41 +00:00
Timur Pocheptsov
d07ea0efbc A temporary fix for CI: define macros from the missing if_types.h
One of our CI machines has WatchOS SDK 3.2 which is missing
net/if_types.h. This block integrations and until SDK is updated
in VM, we provide the missing macros from if_types.h. To be
removed ASAP.

Task-number: QTBUG-64447
Change-Id: I202d3313b9a6a6d7bd29670f0bffc182d4660f81
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-11-23 04:11:08 +00:00
Andre de la Rocha
04da027439 Windows QPA: Detect a SetParent into a native window and set isEmbedded
Detecting that a Qt window has been reparented into a native window and
setting isEmbedded automatically. While there is no specific message for
the change in the parent window, a WM_WINDOWPOSCHANGING message
indicating a change in the Z order is sent. We can recognize an
embedding condition by detecting that our QWindow does not have another
QWindow as a parent, but the HWND associated with it has another HWND as
a parent, which is not the desktop window.

This change should cover the use case where a Qt-based plugin must
return a HWND to a host application, where the host application will
then reparent the HWND as it sees fit, outside of Qt control.

Task-number: QTBUG-64116
Change-Id: Iec417c0dd55ad68eff1ea75bb6f5b5495489c31e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-11-21 20:47:18 +00:00
Allan Sandfeld Jensen
b8e352ad37 Add functions for fast bulk conversion of qfloat16
Both ARM and x86 can convert fp16 much faster in bulk than one at a
time. This also enables hardware accelerated conversion on x86, when
F16C isn't unconditionally available at compile time.

This code is implemented in C to ensure that there's no leakage of
inline symbols from the .obj file that was compiled by Visual Studio
with AVX support. Unfortunately, simd.prf uses $(CXX) instead of $(CC)
for all its sources, which means the file gets interpreted as C++ by
g++, clang++ and icpc. Those compilers at least don't leak any symbols.

Done-with: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I9d26d99e83392861fb09564e0e8e8d76cd8483b3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-11-21 20:01:23 +00:00
Thiago Macieira
0ac2dca977 Add support for C11 static_assert and thread_local
Tested with Clang, GCC 4.5 & up, ICC 17 and MSVC 2017. No current
version of MSVC supports C11 and GCC implemented the features slightly
later in C than in C++.

Change-Id: I57a1bd6e0c194530b732fffd14f45c5074c9a052
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-11-21 20:01:18 +00:00
Martin Smith
ef7c0594bf Add template text to \fn commands in qmap.cpp
The \fn commands were not recognized by clang-qdoc because
the template stuff was missing from the \fn commands. This
update adds the correct template text and parameters.

Change-Id: I7def18f35745b984cc1e2da7c351403d98d8668c
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-11-19 11:48:37 +00:00
Shawn Rutledge
a4113d0c64 qfloat16(float) constructor: explicit cast on aarch64 to avoid warning
The warning was

global/qfloat16.h: In constructor ‘qfloat16::qfloat16(float)’:
global/qfloat16.h:124:18: error: conversion to ‘__fp16’ from ‘float’ may alter its value [-Werror=float-conversion]
     __fp16 f16 = f;
                  ^
cc1plus: all warnings being treated as errors

The warning was added by fb59760381.

Change-Id: I489348c4d5d672bfa5d4db99c837696a2a69a27e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-11-18 06:58:33 +00:00
Tor Arne Vestbø
f506e01665 Remove a few more uses of deprecated QDesktopWidget APIs
Change-Id: I3834ba7ce8f9bd7026f3d59f15d268b4c03e364a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-11-17 21:17:20 +00:00
Martin Smith
3e179f48fc doc: Fix some "Cannot tie this..." errors
These are errors where clangqdoc finds a qdoc comment, but
it can't find anything in the API to associate it with. There
are different causes. In many cases, soneone has documented a
function that isn't in the public API so it should not be
documented in the first place. In other cases, a function is
platform-specific and we need to add || defined(Q_CLANG_QDOC)
somewhere to make it visible.

Change-Id: I2b707548109f626e20d28f084072ef78f2ee6ac5
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-11-17 10:06:03 +00:00
Liang Qi
c4885b21d6 Merge remote-tracking branch 'origin/5.9' into 5.10
Also blacklist tst_QNetworkReply::ioHttpRedirectErrors(too-many-redirects)
on RHEL 6.6 in CI.

 Conflicts:
	tests/auto/network/access/qnetworkreply/BLACKLIST
	tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp

Task-number: QTBUG-64569
Change-Id: I7514fc0660c18fd3a3e1d0d0af3f15d879e3c6f4
2017-11-17 08:59:14 +01:00
Alex Trotsenko
2caebf42a7 QIODevice: do not clear error string on close
Keeping a description of the last device error is a more informative to
the user than forcing the string to 'Unknown error'.

Change-Id: Ie98fe1c94f24279fb633ce950bbe16450b0efdbd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-11-16 19:52:18 +00:00
Timur Pocheptsov
b975008131 QNetworkInterface - fix iOS/tvOS/watchOS builds
netinet/in_var.h, netinet6/in6_var.h, and  net/if_media.h are missing
in iPhoneOS.sdk(s). We only use several macros and data-structs from
these headers, so to work-around the broken build we provide the
missing definitionis.

Task-number: QTBUG-64447
Change-Id: I1b8169c12b4f33959f949bbf29e80f639ab31ad3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-11-16 18:52:40 +00:00
Martin Smith
ae93928a12 doc: Ensure GUID is declared for clangqdoc
Clang needs to see a declaration for GUID, or it
will ignore some function declarations that must
be documented.

Change-Id: Ic5d5a88b82c709be7f763a44994b1c077977731a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-11-16 18:49:09 +00:00
Friedemann Kleint
f6c9f03128 tst_QNetworkReply: Blacklist putToFtp for Windows
Task-number: QTBUG-62860
Change-Id: I9cea1414ae3761284f5ac9fab9d0db03c239b65f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-11-15 21:39:54 +00:00
Mikkel Krautz
55f8d7dfe5 qsslsocket_mac: handle 'OrLater' SslProtocols in verifySessionProtocol()
The verifySessionProtocol() method in the SecureTransport backend did not
properly handle TlsV1_0OrLater, TlsV1_1OrLater and TlsV1_2OrLater.

This commit teaches verifySessionProtocol() about them.
It also adds TlsV1_0OrLater, TlsV1_1OrLater and TlsV1_2OrLater to the
protocolServerSide() test in tst_qsslsocket.

Backport from 5.10 to 5.9 (LTS).

Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 9c765522d1)
Change-Id: I58c53bdf43e0f19b4506f3696d793f657eb4dc6f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-11-15 21:06:49 +00:00
Timur Pocheptsov
7c334301bd HTTP/2 - fix header processing
httpReply->setHeaderField does not simply append (name|value) pairs,
it first erases all entries with the same name. This is quite
wrong when we have _several_ 'Set-Cookie' headers, for example.
Found while trying to login into a facebook account :)

Task-number: QTBUG-64359
Change-Id: I51416ca3ba3d92b9414e4649e493d9cd88f6d9a0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-11-15 21:06:29 +00:00
Gabriel de Dietrich
c1780b9322 QMacStyle: De-HITheme item views headers and a couple arrows
This one is all manual. The arrows were manual before and the
header sections are now plain rectangles. Removes one usage
of HIThemeDrawButton and related logic together with a cached
pixmap and its rendering.

Still broken in some places, but not worse than before. In
particular, sunken or selected header sections will not render
the left hand side section separator properly. Look can be
improved in the header label with different shades for the
selected or current rows/columns.

Change-Id: I6b1c1f529909341bbf72e82e5a3fc61905c75fa8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-11-15 19:05:30 +00:00
Gabriel de Dietrich
67e3d19239 QMacStyle: Render tool button even when a11y is missing
Tool buttons were being skipped a couple cases (CE_ToolButtonLabel
and CC_ToolButton) when accessibility was disabled. Although unlikely
anyone would disable accessibility on macOS, we fall back to the non-
toolbar rendering if that were to be the case.

Change-Id: Ie8ee11475efbe4b418c34842317bafeba80c3c57
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-11-15 19:05:21 +00:00
Gabriel de Dietrich
1939cb0210 QMacStyle: Make backingStoreNSView mutable
Even thought the resolve function is effectively not const,
it's more straightforward to call.

Change-Id: I7c881183862c3c0b326daf001b2f9e569153ee76
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-11-15 19:05:15 +00:00
Gabriel de Dietrich
9af0601fd9 QMacStyle: Replace HITheme info structs with QMSP::CocoaControl
This is not yet a full replacement, but a scaffolding stage until
we can remove all traces of HITheme info structs.

Change-Id: I10eb6a60662c6b102bc687e335d0d1bedd6a4a12
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-11-15 19:05:06 +00:00
Gabriel de Dietrich
dbc1c79043 QMacStyle: Remove unused code
Change-Id: I6e71871b19ce12daddd4cfbbe7c1d9beede13a9b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-11-15 19:04:52 +00:00
Gabriel de Dietrich
d7dce54ba0 QMacStyle: Rename Cocoa controls enum names
For easier sorting and grouping by actual Cocoa NSControl class.

We also shorten the names and move the types inside QMacStylePrivate.

Change-Id: Iac093fd359da66abd263aca841b870ea84337f50
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-11-15 19:04:46 +00:00
Gabriel de Dietrich
2698627653 QMenu: Refactor insertion of action in QPA menu
First, remove a bit of code duplication around the creation of
the platform menu item. Then, we move copyActionToPlatformItem()
inside QMenuPrivate to get rid of one parameter.

Change-Id: I5a33103566367f2313930479844365e79773d82f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-11-15 19:04:32 +00:00
Błażej Szczygieł
c8a5f331c8 QMenu: Update menu action sizes if popup is (not)caused from menu bar
Menu width differs if it contains key shortcuts or not.

Amends 6634c424f8

Task-number: QTBUG-49435
Task-number: QTBUG-61181
Task-number: QTBUG-64449
Change-Id: I8c479af550128069ca91dd089dfc7bd8c24c66ba
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-11-15 17:08:01 +00:00
Morten Johan Sørvig
7416fc5e80 Cocoa: Set NSImage (point) size
when converting from QPixmap. This will make the image
display correctly when used by native API.

Task-number: QTBUG-60769
Change-Id: Iec3160affbe2902d34a219b6816f503dc2f56f74
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-11-15 17:07:57 +00:00
Edward Welbourne
ed5f36eb10 Avoid duplicate rules in QWinTimeZonePrivate::init()
It was iterating the full range of years, adding a rule for each year.
The rules have a startYear member and are used for later years until
the next rule's startYear, so we don't need to duplicate them; and the
system APIs we get them from do support recurrent rules (with wYear
set to 0), that apply to ranges of years.  So propagate that
recurrence and reuse rules where we can.

Change-Id: Ifdd292d3f3d3e07969d7a02bb01f2a0110d32950
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-11-15 14:17:35 +00:00
Edward Welbourne
fd7fc981d8 Restructure Dynamic TZ query to same form as Registry variant
Break out the reading of an individual rule to a function and add a
fall-back that tries to get a non-dynamic rule when there's no dynamic
data for the zone.  At the same time, change the first rule, in all
cases to apply for all time (i.e. set its .startYear to MIN_YEAR,
instead of 1970 or the advertised start range): we'll use it when
extrapolating backwards into the past.

Change-Id: Ife548c7c7deebef2427d2838f3e12ed7abb631c1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-11-15 14:17:30 +00:00
Edward Welbourne
f0fc28ee30 Replace ruleForYear() method with a local index-based function
Removed private method of QWinTimeZonePrivate in favor of a local
static that returns a rule index rather than a rule; this prepares the
way for smarter searching in transition-finding methods.  In the
process, re-work the function to use binary chop instead of a linear
search through a potentially long sorted list.

Change-Id: I2171e3f01afa3037b9718e1be7d0c9343aa74ff0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-11-15 14:17:25 +00:00
Edward Welbourne
10745de279 DRY: eliminate code duplication in calculateTransitionsForYear()
Replace with calculateTransitionForYear(), which just does one of the
transitions, and wrap that with a pair-struct type to call it for DST
and standard time, respectively.  This also eliminate in/out
arguments, which is said to be good for optimisers.

Change-Id: I1e397404a0abceee7654524902af5be4eb88a625
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-11-15 14:17:20 +00:00
Richard Moe Gustavsen
7465329fe1 QAbstractButton: don't clear 'pressed' flag unless left button is released
As it stood, we would set 'pressed' to false regardless of which button that
was released. This would end up wrong if pressing the left button, and
at the same time, did a click with the right button. This would clear the
flag prematurely, and cause a release signal not to be emitted when later
releasing the left button.

tst_QAbstractButton: adding autotest

Adding tests to simulate the bug report's cases:
1) left press button
2) click right/middle key
3) move mouse out of button's boundary
4) test if the released() signal triggered properly

Taks-number: QTBUG-53244
Change-Id: Ifc0d5f52a917ac9cd2df5e86c0475abcda47e425
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-11-15 10:06:16 +00:00
Liang Qi
ecc4754cab Merge remote-tracking branch 'origin/5.9' into 5.10
Change-Id: I2f8f6b1d196548087219739faa3ad1517626da1e
2017-11-15 09:08:46 +01:00
Andy Shaw
3dab19ffed OCI: Match the constraints on the index_name column
When looking for the primary index, it is possible that the
constraint_name in the all_ind_columns table does not match that of the
index_name. Whereas the index_name will match in this case, so the query
should set the where clause on the index_name in both tables.

Task-number: QTBUG-64427
Change-Id: I1bf1fb580e620b9f75f2fde1ecf408842e377365
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2017-11-15 06:40:45 +00:00
Liang Qi
fd6d2eb2c3 test: blacklist tst_QNetworkAccessManager_And_QProgressDialog::downloadCheck(with-zeroCopy)
on Windows.

Task-number: QTBUG-64471
Change-Id: I8ec7e86b7734eda606c5a5bf07bd39ed4bb91336
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2017-11-15 05:12:15 +00:00
Liang Qi
2884c652b5 A brute-force solution to get QRandomGenerator build on Integrity
Task-number: QTBUG-64451
Change-Id: Ife11c3448f54609ba6e85a269a3b5376c43a075f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-11-15 05:12:10 +00:00
Timur Pocheptsov
66bace390b tst_qnetworkreply::getFromUnreachableIp - fix win64 also
Looking at the failures in grafana it appears this test is also failing
on Windows 64. The same fix applies then, and we use Q_OS_WIN now.

Change-Id: Iafcfd6d1e747f3c816878cad072fbfae3aee19ca
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-11-15 04:50:18 +00:00
Jake Petroules
2614108696 qmake: properly filter simulator devices by minimum deployment target
This fixes an issue where a build error may be introduced by a simulator
being selected whose OS version is lower than the application's
minimum deployment target.

Task-number: QTBUG-64456
Change-Id: Ic7c834a1473c183ebb910bc01a416fe1e23a5a14
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-11-15 02:08:54 +00:00
Andre de la Rocha
4c4ac0d976 Fix accessibility info for tri-state checkboxes
The state information provided by QAccessibleInterface::state() was not
correctly reflecting the state of tri-state checkboxes: checkStateMixed
was never set. This change fixes this issue and also adds accessibility
update notifications for changes in checkStateMixed, which were missing.

Change-Id: Ia4a114559d5a957ca85bf2f169a6cece2c98d077
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2017-11-14 23:39:24 +00:00
Andre de la Rocha
0cf6297c15 Add support for Windows UI Automation
Replaces the Qt Accessibility Windows back end, formerly based on legacy
MSAA, with a new implementation based on UI Automation. Fixes issues with
accessibility tools like screen readers and magnifiers, and with the
automatic showing and hiding of the virtual keyboard in touchscreen-based
Windows computers.

[ChangeLog][Windows] The Windows Accessibility back end, formerly based on
Microsoft Active Accessibility, was replaced with a new implementation
based on Microsoft UI Automation.

Task-number: QTPM-487
Task-number: QTBUG-53024
Task-number: QTBUG-43190
Task-number: QTBUG-61926
Task-number: QTBUG-38499
Task-number: QTBUG-38337
Task-number: QTBUG-38501
Task-number: QTBUG-38502
Task-number: QTBUG-38504
Task-number: QTBUG-38505
Task-number: QTBUG-38507
Change-Id: I20b4f8f5e938fef791c6e9c577fcd919140999bd
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2017-11-14 23:31:04 +00:00
Thiago Macieira
a95936f376 QSemaphoreReleaser: Move private members to the usual position
Change-Id: Ic632b4163d784b83951cfffd14f67b902d096d8b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-11-14 17:00:12 +00:00
Eskil Abrahamsen Blomfeldt
ee2ad9df70 Add QFontMetrics(F)::horizontalAdvance() function
A source of constant confusion is the QFontMetrics::width() function,
which does not return the bounding width of the text, but the advance
width. We deprecate this and add horizontalAdvance() instead, to avoid the
confusion in the future.

Note that there was an internal width() overload which was only there
for the purpose of supporting the Qt::TextBypassShaping flag. This
flag has already been replaced by public API, so no such
overload is added. Instead, we deprecate the TextBypassShaping flag
as well, which makes sense, since a replacement has been made.

Also note that there was a consistency problem with QFontMetrics and
QFontMetricsF, which are supposed to be interchangeable. The
QFontMetrics::width() functions for strings took an optional int length
argument, while the floating point version did not. This error is
corrected in the advance() functions.

[ChangeLog][QtGui][Text] Added QFontMetrics::horizontalAdvance() and
QFontMetricsF::horizontalAdvance() to replace the confusingly named
width() function. The latter has now been deprecated.

Change-Id: I0dfda43aa65c8235be32c62fade82cae05b29c79
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-11-14 16:28:45 +00:00