Commit Graph

34369 Commits

Author SHA1 Message Date
Nico Vertriest
64298b42a3 Doc: drop Application Chooser Example
There are plenty of other examples showing how to use QStateMachine

Task-number: QTBUG-60635
Change-Id: I82300b2a0f4e7733f08579a2aa9b548cb7d87efa
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-11-20 09:32:38 +00:00
Nico Vertriest
b00feb8cfc Doc: Add screenshot to Validators example
Task-number: QTBUG-60635
Change-Id: Ie68e611b57900847a00587fdf8558be4be38f23d
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2017-11-20 09:32:31 +00:00
Nico Vertriest
6e7cf8b918 Doc: update screenshots in Addressbook Example doc
Task-number: QTBUG-60635
Change-Id: I5b098120f0e47687ac90d7f05b91a2a60f1eab32
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2017-11-20 09:32:20 +00:00
Nico Vertriest
f39f813113 Doc: drop Lighting Effect Example
Task-number: QTBUG-60635
Change-Id: If455a778ff6ebd53d8110b3dc25d8b9e27255bac
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
2017-11-20 09:31:55 +00:00
Nico Vertriest
0bdbefa3c0 Doc: add doc to Style Sheet example
Task-number: QTBUG-60635
Change-Id: I6c80427bce1efc67bbf4ec67b0afeafc27088d79
Reviewed-by: Martin Smith <martin.smith@qt.io>
2017-11-20 09:31:22 +00:00
Nico Vertriest
a78cae73b1 Doc: review Star Delegate Example
- update screenshot
- minor corrections description example

Task-number: QTBUG-60635
Change-Id: I2351160ee9ec0a926fddb122e720c887f851dba5
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2017-11-20 09:30:58 +00:00
Thiago Macieira
8e387e7fa7 qsimd.cpp: Remove workaround for GCC 4.2
That's long fallen out of support in Qt.

Change-Id: I938b024e38bf4aac9154fffd14f7a603baa24e04
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-11-19 23:27:38 +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
Christian Ehrlicher
ba2f3a156e QTreeView: recalculate row heights in hide/showColumn()
When calling QTreeView::hideColumn() the row heights are not
recalculated. This can lead to rows which are unnecessarily high due to
hidden columns may contain large (e.g. multiline) content. The same
applies to showColumn() - there the row might be to small.
Hiding columns directly via QTreeView::header()->hideSection() is not
covered by this patch since QHeaderView has no way to inform about
newly shown/hidden sections.

Task-number: QTBUG-8376
Change-Id: I20b1198e56e403ab8cf649af76e5e2280821dd68
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-11-17 20:28:34 +00:00
Christian Ehrlicher
5c0a9fc532 QTableView: do not draw grid behind last section
QTableView::paintEvent() drawed the grid lines behind the last section
when the region to repaint contained rects which were completely
behind the last section.
This also lead to unnecessary repaints for cells inside rect.top() to
rect.bottom()

Task-number: QTBUG-60219
Change-Id: I42bb42bea504dfd3c92352ac5c65a43c246a05af
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-11-17 20:28:25 +00:00
Gabriel de Dietrich
f55a40ac03 Menurama: Fix custom application class constructor signature
Change-Id: I989b9205dde9280f97dedbaad47ef4a8d75004ac
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-11-17 13:30:40 +00:00
Gabriel de Dietrich
4532a9590b QToolBar: Don't crash on macOS with 'minimal' QPA plugin
'minimal' doesn't provide any native interface.

Change-Id: I116c9905977ccc6ededf0c6c41b92b6f785f2875
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-11-17 13:30:26 +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
Eirik Aavitsland
77ee9bd1d3 QPixmap without QGuiApplication: do not crash, terminate gracefully
Any attempt to create a non-null QPixmap in a QCoreApplication-based
app would give a hard crash without a warning. This commit adds a
check and instead calls qFatal with an explanatory message.

This was originally fixed in Qt 4 (ref. QTBUG-17873) but that was lost
in the migration to Qt 5.

Note that this fix still allows null QPixmaps to be created under
QCoreApplication, since that has worked in all Qt 5 versions.

Task-number: QTBUG-53572
Task-number: QTBUG-64125
Change-Id: I60ae29b90f1bd3663aeed2ce88dc1690fe66552c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-11-16 20:59:14 +00: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
Svenn-Arne Dragly
ce08318a46 Add QThreadPool autotest to detect stale threads after tryTake
This test makes sure that we do not introduce a regression where the
threads exited the inner loop over the queue before the queue was
empty. This was triggered by calling tryTake at least maxThreadCount
times, which left the same number of null pointers in the queue
and caused the inner loop to exit too soon for all the threads.

Change-Id: I3a9d800149b88d09510ddc424667670b60f06a33
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-11-16 12:42:44 +00:00
BogDan Vatra
4d8ae444c2 No debugging and extra env & params processing on sealed packages
A "sealed" package is a *release build and signed* Qt for Android package
with no debugging capabilities.
By default sealed packages have no debugging capabilities, but the user
can force debugging capabilities also on a sealed package. This is useful
in corner cases when the user really needs to debug a sealed package.

Change-Id: I840526092556067f2659facf1525861bbabe0edd
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-11-16 05:15:28 +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
Timur Pocheptsov
0f0726d36e QSslSocketPrivate (SecureTransport) - add ALPN support
Starting from iOS 11.0 (SDK) Apple has exposed two new functions:
SSLSetALPNProtocols and SSLCopyALPNProtocols. This allows us to
negotiate http/2 (and any other application layer protocol) via TLS on
iOS. Unlike OpenSSL, SecureTransport's version is very limited - we
have to compare protocols manually after the SSL handshake has
finished. Still, this is better than nothing. These two functions are
also declared in macOS SDK starting from 10.13, but unfortunately the
symbols are missing and for now this feature is only enabled on iOS.

Change-Id: I3ed2f287bfa864f8aca0c231171e804f7d6b8016
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-11-14 16:12:51 +00:00