Commit Graph

33652 Commits

Author SHA1 Message Date
Thiago Macieira
541a031552 tst_QMutex: produce less noise with MSVC
Since MSVC doesn't have <chrono> (according to QT_HAS_INCLUDE), the QSKIP
in the test was printed for every line in the table. Instead, add the
skip in the _data() function.

Change-Id: I6e9274c1e7444ad48c81fffd14dbcee5e5a322aa
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-09-01 16:36:17 +00:00
Albert Astals Cid
6e18293299 Forward the readChannelFinished from the plain socket to the ssl socket
Task-number: QTBUG-62257
Change-Id: I12632b7ffd2012adc99b4784892cbb6f79e065f7
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2017-09-01 15:09:14 +00:00
Tor Arne Vestbø
362dcb4759 macOS: Respect responder chain when setting cursor
There's no need for us to walk our own ancestor chain to figure out which
cursor to set. AppKit will automatically call cursorUpdate: on the view
that would be the hitTest target of the current mouse position, and by
falling back to super when no cursor is set for the current view, we
automatically get the behavior that effectiveWindowCursor tried to solve.

In addition, it solves the case of applyEffectiveWindowCursor applying
the arrowCursor when no cursor was set, which would mean that if any
native parent view of our view _did_ have a cursor set, we would not
fall back to the native view's cursor, but instead override it with
the arrow cursor. Following the responder chain gives the correct
behavior in this case.

Unfortunately, due to rdar://34183708, if a subview of one of our
views uses the legacy cursorRect approach to cursor management, the
cursor will not be reset back to our cursor via cursorUpdate: when
leaving the child and entering the parent view (our view). Moving
our implementation over to the legacy API would solve this problem,
but just propagate it to native parent views of our views, which
could potentially use NSTrackingAreas, and would not have _their_
cursors re-set.

Change-Id: Id20cc03136f0b1d4b9120750fe63ddc455363aaf
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-09-01 10:04:52 +00:00
Friedemann Kleint
a72513cab7 Windows QPA: Hardcode a limit for the default point size
Windows uses deprecated API to obtain the default font which
has been observed to return bogus sizes in multi monitor setups.
Apply a limit in this case and add fixme comment for Qt 6.

Task-number: QTBUG-49374
Task-number: QTBUG-58610
Change-Id: I6e805ec792a3f425961a48ef4c4329c3cdf302b6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-09-01 09:15:32 +00:00
Tor Arne Vestbø
ca14d84197 macOS: Modernize masking of windows
Instead of masking window blitting via a CGImage mask, we use the window's
mask directly to intersect the region that we blit during flushing of the
QCocoaBackingStore. This approach also enables masking of child windows.

We now also support setting a mask for layer-backed views, by setting a
CAShapeLayer as the layer's mask.

The window shadow invalidation has been moved out of QNSView, as the view
should not be involved in that process. For layer-backed views, the shadow
is not invalidated as expected after the initial mask has been set, but
this bug has been left as a fix for a later stage as it requires more
research.

Change-Id: Ie0127d8df49d95b2d6144816b19559f3d3c95d13
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-09-01 02:42:38 +00:00
Tor Arne Vestbø
1f9284b624 macOS: Forward [QNSViewMouseMoveHelper cursorUpdate:] to view
Calling [self cursorUpdate:] doesn't make much sense, and was probably
an oversight. The event is also delivered straight to the view, not to
the owner of the tracking area (as the documentation says it should),
but we keep this method implemented just in case.

Change-Id: I176a2aa782da316d1fe11ce15a89195595d80618
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-09-01 02:42:37 +00:00
Tor Arne Vestbø
9507edddf2 macOS: Implement QWindow::requestUpdate() in terms of setNeedsDisplay
This is preferable to the timer-based default implementation of
QPlatformWindow, as it gives AppKit more control of when to schedule
the update, and makes sure the update is scheduled along with other
views in the normal display-cycle, reducing the number of push flushes
we do. QtWidgets still need to plumb the update() method to updateRequest
for that to have any real effect though.

In the future we may consider scheduling the update via a display link,
if the window surface is set up for GL, for example.

Ideally we'd also have a platform hook for the repaint() method, so that
we could funnel it through display and get synchronous painting with
AppKit still taking care of drawing and compositing child views.

Change-Id: I136a9afa087b922aad69086548c2aa190ce75b6b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-09-01 02:42:36 +00:00
Tor Arne Vestbø
28414f8e3a macOS: Update qt_on_cocoa manual test
- Add view to contentView, to allow checking parent view interaction
- Render via requestUpdate instead of manual timer
- Add two windows to check subview interaction

Change-Id: Ib028e62f585d45e42c0429e69ea6f45c8a90fe54
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-08-31 23:09:24 +00:00
Liang Qi
4fa90c1757 Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/dev 2017-08-31 14:34:38 +00:00
Liang Qi
112a4af107 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	examples/examples.pro
	qmake/library/qmakebuiltins.cpp
	src/corelib/global/qglobal.cpp
		Re-apply b525ec2 to qrandom.cpp(code movement in 030782e)
	src/corelib/global/qnamespace.qdoc
	src/corelib/global/qrandom.cpp
	src/gui/kernel/qwindow.cpp
		Re-apply a3d59c7 to QWindowPrivate::setVisible() (code movement in d7a9e08)
	src/network/ssl/qsslkey_openssl.cpp
	src/plugins/platforms/android/androidjniinput.cpp
	src/plugins/platforms/xcb/qxcbconnection.cpp
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/widgets/widgets/qmenu.cpp
	tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp

Change-Id: If7ab427804408877a93cbe02079fca58e568bfd3
2017-08-31 14:31:31 +02:00
Mårten Nordheim
1ff52e478b Modernize the json savegame example
Task-number: QTBUG-60625
Change-Id: I8d5bf860478ee2566b9f96854fc6491f088a28fa
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-08-31 11:46:04 +00:00
Alex Trotsenko
29ef0d2bcc Simplify QDataStream::skipRawData()
... by using the new QIODevice::skip() function.

Change-Id: I943c4feb896d677f3150da542950595d7f485e75
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-31 06:37:07 +00:00
Tor Arne Vestbø
fefbed5eae macOS: Determine opaqueness and backgroundColor of NSWindow declaratively
Instead of imperatively trying to keep the logic consistent in many
different call sites.

Task-number: QTBUG-61909
Change-Id: I8d647690c47656f34673555a8a8aa3ec6ffc73d1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-30 17:57:01 +00:00
Thiago Macieira
2a131b94db QHostAddress: remove our own sockaddr_in6
IPv6 is required now.

Change-Id: I209fcd5dbc2b4e5381cffffd14df2694bd5a92c8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-08-30 16:13:46 +00:00
Tor Arne Vestbø
1be1ed014b macOS: Use [NSObject superclass] instead of class_getSuperclass
The former takes into account dynamically generated key-value-observing
(KVO) subclasses, of the form NSKVONotifying_*, which would result in
class_getSuperclass returning QNSWindow and recursing back to the original
call site of qt_objcDynamicSuper.

Change-Id: I4b8b1aa64d2834d9d1baa395c877319e99084bc8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-30 13:29:49 +00:00
Joni Jäntti
e938150412 Revert "tst_qwidget::activation expect fail on Win 10"
This reverts commit 8561281768.

This change needs to be reverted because Windows 10 Creator's
Update doesn't fail on this test anymore during CI runs.
Reason for this is unknown.

Change-Id: Ice250ecedb14ac96fb3693b2d9884ef452a91cc2
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2017-08-30 12:49:02 +00:00
Peter Seiderer
b7722c251c Fix error attribute(target("+crc")) is unknown
Task-number: QTBUG-61975
Change-Id: I0b1b55c0737dad485b5ace8e6eb7cb842589453d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-08-29 20:30:59 +00:00
Peter Seiderer
6ce4b680cd examples: fix compile without opengl support
Compile examples/opengl only in case opengl support is available.

Task-number: QTBUG-62372
Change-Id: I742a1eb7b7639a5a722c4d5e9b4ee070b629b02e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-29 20:30:45 +00:00
Liang Qi
3088f73cf4 testlib: move strings from functions to array in benchmark metric
Change-Id: Ida7ba60d26171b95ba0e9709eec5c6553efeecca
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-08-29 15:52:08 +00:00
Allan Sandfeld Jensen
789f9d0d56 Avoid assert on large clips in qt_alphamapblit_generic
It is (end - start) that represent the number of pixels being worked on
and needs to be smaller than the buffer size.

Change-Id: I75a22bc2656ac1c7d231278c3a1931758090f8ce
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-08-29 13:56:59 +00:00
Dongmei Wang
63002b2f37 QFbVtHandler: Remove unused sys/signalfd.h include
Change-Id: Ia9fa3c4de0a1dbdd1b36730c82f5180c2128cbcf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-08-29 13:43:17 +00:00
Timur Pocheptsov
0270651dda Cocoa integration: do not use released session
QTBUG_10735_crashWithDialog started to show flakyness recently - it crashes,
but not every time (which fits the definition of UB perfectly).

While the test itself is doing weird things and puts our event dispatcher
into a weird state, our API allows to:

1. Using QDialog to enter event loop (with runModalSession under the hood), then ...
2. to call from a slot (e.g. timer-attached) QApplication::closeAllWindows() while ...
3. we are still inside that special loop and using the 'session' object, thus ...
4. on the next iteration with [NSApp runModalSession:session] we'll re-use already released
   session (released by endModalSession which in turn was called indirectly by closeAllWindows).

And Cocoa gives us a warning/hint: "Use of freed session detected. Do not call
runModalSession: after calling endModalSesion:."

Task-number: QTBUG-62589
Change-Id: Ie651cee1fba43cfd2b0fc44af5eddc5fd52e2907
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-08-29 12:49:58 +00:00
Joni Jäntti
de6d6eb13e Revert "tst_qgraphicswidget expect fail on Win 10"
This reverts commit 3d5bf00f18.

This change needs to be reverted because Windows 10 Creator's
Update doesn't fail on this test anymore during CI runs.
Reason for this is unknown.

Change-Id: I9f1c88606c97afc5952af34e04310612b783a9c2
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2017-08-29 11:59:23 +00:00
Alessandro Portale
c827afa282 QWidgets/CommonStyle: Fix tooltip drawing under HighDPI
Delegating the border painting to qDrawPlainRect ensures that there are
no off-by-one pixel issues.

Task-number: QTBUG-61849
Change-Id: I56dc849da80fad00d02a0f9c60dbb621e6de7c48
Reviewed-by: Michael Winkelmann <michael.winkelmann@qt.io>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-08-29 11:53:03 +00:00
Eirik Aavitsland
01af6771c3 Fix: WebP missing from QMovie::supportedFormats()
Use QImageReader::supportsOption() instead of ::supportsAnimation(),
since the former checks what the handler supports in general, not just
the particular device.

Task-number: QTBUG-61642
Change-Id: I57db24425b4fd8821446659936e6a8ca55008921
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-08-29 11:38:37 +00:00
Eike Ziller
3b962d16db Fix jumping to anchors with offline style
If the style changes after the browser already jumped to an anchor,
the resulting browser position will be messed up.
So, after we changed the style we need to make sure that we jump
to the anchor again.
Since browsers do not jump to anchors that they already jumped to,
that means first jumping to the top, then to the actual anchor.

Task-number: QTCREATORBUG-18448
Change-Id: I86c736adab6940903276f8a896b4054ddae11ebe
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-08-29 11:25:27 +00:00
Friedemann Kleint
041df6e2ae QFileInfo: Clarify documentation on symlinks
Explain symbolic links vs shortcuts.

Change-Id: I12176616be72c97607ee1f441d1ea05af5e9e549
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-29 11:15:42 +00:00
Kai Koehne
afb7d99af9 New AA_DisableWindowContextHelpButton to globally hide ? button
Dialogs and Sheets by default have the WindowsContextHelpButtonHint
set, which adds a question mark button to dialogs on Windows. This
button then triggers the 'What's this' mode by changing the cursor,
and letting the user explore the UI by showing whatsThis tooltips.

Anyhow, the paradigm is little used today and a lot of applications
do not set any whatsThis properties, leaving the mode pretty
non-functional. It's therefore common to explicitly remove the
WindowsContextHelpButtonHint from dialogs. However, this has to
be done for _every_ dialog.

Instead, this patch adds a global application flag to not set the
WindowsContextHelpButtonHint by default. This allows developers to
already buy into the Qt 6 behavior, where the flag will not be set
anymore by default.

[ChangeLog][QtWidgets] Added AA_DisableWindowContextHelpButton
attribute. Setting this attribute globally prevents the automatic
"What's this" button on dialogs on Windows
(WindowsContextHelpButtonHint).

Change-Id: I497a79575f222c78b2d5d051a6de346b231f72d3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-08-29 07:23:44 +00:00
Shawn Rutledge
3ea09e4474 QLocale docs: remove useless \sa links
It's true that formattedDataSize is useful for formatting file sizes
from QFileInfo, but these links don't make sense here, and also cause
qdoc warnings due to lack of class scoping.

Change-Id: I9dd28200aa9d0da048db0c02ac66dc20c1b42e5c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-08-29 06:18:04 +00:00
Friedemann Kleint
dca1423fc9 Fix documentation of QThreadPool::stackSize
Fix warning
qthreadpool.h:61: warning: No documentation for 'QThreadPool::stackSize'

Amends e44ff19783.

Change-Id: I060de623b2befcc55846e1827b9cd58aacf3a3c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-08-29 06:10:58 +00:00
Thiago Macieira
9f5aec777a QProcess: add docs that the PID from startDetached() may be recycled
Change-Id: I209fcd5dbc2b4e5381cffffd14de2742eb1d8cd7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-29 03:49:05 +00:00
Alexander Volkov
d61e61fa1a uic: Use nullptr instead of Q_NULLPTR in generated code
nullptr can be used directly in the Qt code since Qt 5.7.
Use it in generated code for consistency.

Change-Id: I249aeaf0a39b46ce1106b29d3ea4569a399908b7
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2017-08-28 15:25:07 +00:00
Robert Loehning
e81f430e30 Doc: Fix example
Change-Id: Ic678b69c6c9820701c4cc10c7797f599e5d71b7a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2017-08-28 14:36:49 +00:00
Jesus Fernandez
eeaaac8f0e Remove unneded pointer check
CID 158429 (#1 of 1): Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking ctx suggests that it may be null, but it has already been dereferenced on all paths leading to the check.

Coverity-Id: 158429
Change-Id: I6d202599e962dae5ea4a45401f34237dd496d38b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-08-28 13:58:46 +00:00
Gabriel de Dietrich
48784486a3 QCocoaMenu: Stop update timer
This amends patch f27d1ccbb2.

Change-Id: I4c7a390a5f2cdd3307007c7b6708692c36f861b4
Task-number: QTBUG-62396
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-28 13:45:41 +00:00
Joerg Bornemann
ea168ead1a Remove unused mkspecs variable QMAKE_LIBS_NIS
Change-Id: I09a161fe4706c19eba4ff54cdb03a10edc34871a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-28 13:10:44 +00:00
Joerg Bornemann
d7438593a8 Remove QMAKE_LIBS_CORE variable
Define the lib dependencies for corelib in corelib.pro, where they
belong.

Change-Id: I973d3b0c571782d869b27dea243e899db4dddc43
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-28 13:10:38 +00:00
Joerg Bornemann
3380c7949e Remove QMAKE_LIBS_NETWORK from QSqlQuery benchmark
This was added in c6612de3 for WEC7 which we do not support anymore.

Change-Id: I329374bb8375d629a6f7619236371c0fc953792d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-28 13:10:34 +00:00
Joerg Bornemann
1bb70830d4 Make it possible to override QT_LOGGING_TO_CONSOLE in test cases
It is currently impossible to get output from autotests in Visual Studio
or Qt Creator when running under the debugger. Qt Creator's cdb
integration cannot distinguish between the inferior's console output and
cdb's console output. If the inferior's output came from
OutputDebugString we'd be able to catch and display it.

Pave a way to force QTestLib's logging facility use OutputDebugString.

Task-number: QTCREATORBUG-16161
Change-Id: Iccd69c283626266ee4384a6163a8b72bb0e7df27
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-28 11:01:17 +00:00
Orgad Shaneh
30331afda1 MSVC: Support precompiled header also for C files
It was already done correctly in the GCC generators, but lacked in MSVC.

Task-number: QTBUG-11117
Change-Id: I5e6c2e4802dbe33c0f15c46a227a08c3f0cc5707
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-28 07:28:01 +00:00
Gabriel de Dietrich
f1a857c079 QCompleter: Add check before setting the widget
This prevents unnecessarily removing and reinstalling the completer
as event filter on the same widget.

This does not prevent what's going on in QComboBox::focusInEvent(),
where we'd set the line edit as widget just to immediately override
it with combo box itself.

Change-Id: I70c081a920f4daf4d7560e5cd7158e4070042d42
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-08-28 07:10:48 +00:00
Simo Fält
f480a25d1a Drop 32 bit iOS configs from mkspec
Qt 5.10 won't support 32 bit iOS.

Task-number: QTQAINFRA-1288
Change-Id: If3cfdb65ed94166d685d3cf444b5ab03d18680a9
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-28 05:03:36 +00:00
Thiago Macieira
23d52de321 QUdpSocket: use faster ways to get datagram size on Linux and macOS
With MSG_TRUNC on Linux, recv/recvfrom/recvmsg will return the full size
of the datagram, even if it won't fit the buffer you passed. On Darwin,
we have a getsockopt() option to get that value.

Change-Id: I6e9274c1e7444ad48c81fffd14da7d5b93815f90
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-08-27 16:38:50 +00:00
Thiago Macieira
db0585d63a Fix crashes with libproxy+webkitgtk: it's not threadsafe
I'm getting crashes in Akonadi processes due to libproxy. I don't have
direct evidence that this was caused by a threading condition, but it's
clear from the source code of libproxy that the plugins it runs for
expanding PAC scripts are not thread-safe. To overcome this problem, we
only run libproxy functions in one thread only.

 #0  0x00007f745f0ac1d8 in JSC::HeapTimer::timerDidFire() () at /usr/lib64/libjavascriptcoregtk-4.0.so.18
 #1  0x00007f745f0ac287 in  () at /usr/lib64/libjavascriptcoregtk-4.0.so.18
 #2  0x00007f748e5ae9c5 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
 #3  0x00007f748e5aed88 in  () at /usr/lib64/libglib-2.0.so.0
 #4  0x00007f748e5aee1c in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
 #5  0x00007f7494f4268f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
 #6  0x00007f7494eeb35a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
 #7  0x00007f7494d1b31a in QThread::exec() () at /usr/lib64/libQt5Core.so.5
 #8  0x00007f7494d1fd2e in  () at /usr/lib64/libQt5Core.so.5
 #9  0x00007f74913174e7 in start_thread () at /lib64/libpthread.so.0

The pacrunner implementation of libproxy uses libdbus-1 which
(officially) is thread-safe, but experience tells that it has
problems. Since it is not running a JS engine, we don't need a thread,
but we do need to lock around it.

Change-Id: I84e45059a888497fb55ffffd14d2f638f21e807d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-08-27 16:37:08 +00:00
Alex Trotsenko
5de734bc18 QSslSocketBackendPrivate::transmit(): improve writing to OpenSSL
This patch avoids intermediate copying of the data by using a
new QIODevice::skip() API.

Change-Id: I358a83b21e2a58b59481745162fce1894549c0ac
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
2017-08-27 06:17:52 +00:00
Friedemann Kleint
eb93d7b517 Testlib: Format QVector2/3/4D in QCOMPARE
Change-Id: Ia0709e598d2fddd6c2f448633b484749146265f7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-08-27 06:17:32 +00:00
Alex Trotsenko
ca0df4b269 Introduce QIODevice::skip()
[ChangeLog][QtCore][QIODevice] Added skip() method to improve
performance in read operations.

Change-Id: I79068a3e9df108756abe37ba3d431e27e7413621
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-27 06:17:09 +00:00
Timur Pocheptsov
53357f0156 HTTP/2 - implement the proper 'h2c' (protocol upgrade)
Without TLS (and thus ALPN/NPN negotiation) HTTP/2 requires
a protocol upgrade procedure, as described in RFC 7540, 3.2.
We start as HTTP/1.1 (and thus we create QHttpProtocolHandler first),
augmenting the headers we send with 'Upgrade: h2c'. In case
we receive HTTP/1.1 response with status code 101 ('Switching
Protocols'), we continue as HTTP/2 session, creating QHttp2ProtocolHandler
and pretending the first request we sent was HTTP/2 request
on a real HTTP/2 stream. If the first response is something different
from 101, we continue as HTTP/1.1. This change also required
auto-test update: our toy-server now has to respond to
the initial HTTP/1.1 request on a platform without ALPN/NPN.
As a bonus a subtle flakyness in 'goaway' auto-test went
away (well, it was fixed).

[ChangeLog][QtNetwork][HTTP/2] In case of clear text HTTP/2 we
now initiate a required protocol upgrade procedure instead of
'H2Direct' connection.

Task-number: QTBUG-61397
Change-Id: I573fa304fdaf661490159037dc47775d97c8ea5b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-08-27 04:54:55 +00:00
Orgad Shaneh
0f11fab6f7 Fix resolution of relative symlinks from relative path on unix
Consider the following:
/root/target - a file
/root/path/link -> ../target
/root/path/other/exe - executable

Running from /root/path/other.

exe is:

#include <QDebug>
#include <QFileInfo>

int main()
{
    qDebug() << QFileInfo("../link").symLinkTarget()
    return 0;
}

The link references /root/target, but the current output is
/root/path/target.

The link doesn't depend on the PWD. It depends on its own directory.

Change-Id: I61e95018154a75e0e0d795ee801068e18870a5df
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-27 02:39:57 +00:00
André Klitzing
e51dbda067 Update bundled libpng to version 1.6.32
Also add import script.
The remaining diff to clean 1.6.32 is archived in the qtpatches.diff file.

[ChangeLog][Third-Party Code] libpng was updated to version 1.6.32

Change-Id: I1b4b78e39a6eb098d1b66c2528e47544bd9e6713
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-26 18:04:32 +00:00