Commit Graph

33502 Commits

Author SHA1 Message Date
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
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
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
Francois Ferrand
fabedd399e Introduce OBJECTIVE_HEADERS
When a ObjC++ QObject subclass is listed in the regular HEADERS, qmake
creates a .cpp file. The moc file will then fail to compile, as it
requries ObjC++ headers. Using Q_FORWARD_DECLARE_OBJC_CLASS() can be
used to let the class be parsed by The compiler, but link will still
fail, as the generated methods (e.g. signals) must be built with ObjC++
compiler, in case they have ObjC parameters:

 Q_FORWARD_DECLARE_OBJC_CLASS(NSString);

 class MyClass: public QObject {
     Q_OBJECT
 signals:
     void objcSignal(NSString * myObj);
 };

The canonical workaround for that is including the .cpp file into the
corresponding .mm file. This also offers a compilation speed advantage,
but is somewhat counter-intuitive.

Therefore, we introduce a separate variable which instructs moc to create
.mm files directly.

Task-number: QTBUG-1581
Change-Id: Ia98af58006efd168ea37f3a63c396979e7e81baa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-25 12:15:36 +00:00
Tor Arne Vestbø
a980250a66 macOS: Deduplicate QNSWindow/QNSPanel code
By sharing the implementations of the methods between QNSWindow and
QNSPanel we don't need a helper, and can remove duplicated code. This
duplication would expand in the future, as for each method added to
the QNSWindowProtocol, we would have to add forwarding functions
in both QNSWindow and QNSPanel, forwarding to QNSWindowHelper, and
then two more functions in QNSWindow and QNSPanel in case we wanted
to call super from the helper, similar to [QNSWindow superSendEvent].

The only snag is that calls to super are hard-coded to a specific
superclass during complication, so we provide our wrapper for
objc_msgSendSuper that resolves the superclass at runtime.

The helper class QSendSuperHelper provides compile time implicit
instantiation of the right template without having to provide
the return type as a template argument, via operator T and
a fallback for the case of no return type via the destructor.

Change-Id: Iaf13f27675d90f884470f5005270ea0d9d0316f3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-24 23:54:43 +00:00
Giuseppe D'Angelo
f537dc0da2 PCRE2: upgrade to version 10.30
Minimal adjustments to config.h are necessary.

[ChangeLog][Third-Party Code] PCRE2 has been updated to version 10.30.

Change-Id: Iaca6a5ceffe4f5029212411eca8e2965ca7d9410
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2017-08-23 14:35:56 +00:00
Thiago Macieira
189e9c93d7 QTemporaryFile: Add support for Linux's O_TMPFILE
That means a file is never created, unless you ask for the name. There's
no chance of left-over temporary files being left behind. QSaveFile also
benefits from this, since the save file is not present on disk until
commit(). Unfortunately, QSaveFile must go through a temporary name
because linkat(2) cannot overwrite -- we need rename(2) for that (for
now).

[ChangeLog][Important Behavior Changes][QTemporaryFile] On Linux,
QTemporaryFile will attempt to create unnamed temporary files. If that
succeeds, open() will return true but exists() will be false. If you
call fileName() or any function that calls it, QTemporaryFile will give
the file a name, so most applications will not see a difference.

Change-Id: I1eba2b016de74620bfc8fffd14cc843e5b0919d0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-23 04:02:19 +00:00
Edward Welbourne
b6a6121128 Deprecate QDate methods using MonthNameType
These introduce an unwanted locale-dependency; clients should use
suitable QLocale methods instead.

Task-number: QTBUG-28581
Change-Id: Ie7dfe712c50b9f5da94e4b20af7b231d8963cbc9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-22 09:47:22 +00:00
Morten Johan Sørvig
8b3a120a3b macOS: Simplify and correct style mask determination
This function had accumulated a fair bit of accidental
complexity over the years.

- No early returns, make sure to preserve fullscreen
  state for all windows.

- Use windowIsPopupType() directly to set borderless
  for Qt::Popup (but not Qt::Tool).

- Handle Qt::Tool explicitly.

- Deduplicate Qt::CustomizeWindowMask handling.

- Remove case that used the absence of NSResizableWindowMask
  to remove the maximize button. Maximize is now
  disabled elsewhere (setWindowZoomButton). All windows
  now get NSResizableWindowMask by default.

- Qt::ForeignWindow now gets a standard window style
  mask instead of NSBorderlessWindowMask. The old
  code did not handle this case and left the mask
  value unmodified.

Change-Id: I56499e9f05c3f481b5a96e0507da2fb195f207fa
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-22 08:06:31 +00:00
Giuseppe D'Angelo
12c5264d9a QCryptographicHash: re-add support for Keccak hashing
88a8feeacb fixed QCryptographicHash's
implementation of SHA-3 -- before, QCryptographicHash was
calculating Keccak, not SHA-3. The change however breaks downstreams
that were relying on the "wrong" values calculated by earlier
versions of Qt. To restore compatibility with such calculations,
add the support for Keccak back, as deprecated and to-be-removed
in Qt 6.

[ChangeLog][QtCore][QCryptographicHash] In order to preserve
compatibility with earlier versions of Qt, QCryptographicHash is
now able to calculate Keccak message digests.

Task-number: QTBUG-59770
Change-Id: I740684cb3d0774292fa837a06b444c73fb4eed52
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-22 07:54:31 +00:00
Thiago Macieira
9c112a37ba QFileSystemEngine::cloneFile: expand the Linux cloning process
FICLONE only works on (currently) btrfs and xfs, and then only if it's
the same mount, so it's of very limited use. There are a couple other
techniques we may try that do not involve I/O through user-space, though
not immediate:
 - sendfile(2) can be used on regular files, even across mountpoints
 - sendfile(2) can be used on block devices too, but we need to get the
   device's size first
 - splice(2) can be used on pipes (FIFOs)

We only implement the first technique (earlier iterations of this patch
implemented all).

Change-Id: I81480fdb578d4d43b3fcfffd14d4b47cd70495a3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-22 06:56:25 +00:00
Thiago Macieira
974b3adf8a QFileSystemEngine::cloneFile: add support for fcopyfile(3) on macOS
For some reason, fcopyfile(3) works on directories, so we need to make
we aren't operating in one.

Change-Id: I81480fdb578d4d43b3fcfffd14d4f2f485348515
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-08-22 06:56:16 +00:00
Thiago Macieira
26094982f8 Move the file-cloning code from QFSFileEngine to QFileSystemEngine
Change-Id: I02d22222fff64d4dbda4fffd14d1c1bbf48385ff
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-22 06:56:08 +00:00
Morten Johan Sørvig
750a252b89 Blacklist tst_QMessageBox::defaultButton on osx ci
Has become flaky on CI. Does not fail locally.

Change-Id: I42938849571938db78b16a72c215442a69f7c2d5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-22 05:10:54 +00:00
Morten Johan Sørvig
d044b0b1e3 Remove timer checks from testQuitLock
This test sets up two timers:
	- a 100ms recurring timer
	- a series of 10 200ms single-shot timers.

After quitLock lets exec() return it then uses a signal
spy to check if the 100ms timer fired at least 17/20
of the times it should.

However there is no guarantee that the 100ms timer
will fire more often than the 200ms timer. If the
native timer callbacks happen at 500ms intervals then
Qt will fire both timers (once) at that interval.

In practice this seems to happen on macOS CI under
system load and/or with the test app napping.

The primary goal for the test is to verify that exec()
returns when it should; we can remove the timer signal
spy.

Remove testQuitLock from BLACKLIST.

Timely timer:

  524429311.389913 runLoopTimerCallback
  524429311.389979 200ms fire
  524429311.389997 100ms fire
  524429311.490056 runLoopTimerCallback
  524429311.490130 100ms fire
  524429311.589752 runLoopTimerCallback
  524429311.589929 200ms fire
  524429311.589976 100ms fire

Delayed timer:

  524429428.690887 runLoopTimerCallback
  524429428.691002 100ms fire
  524429428.691143 200ms fire
  524429433.692103 runLoopTimerCallback
  524429433.692205 100ms fire
  524429433.692331 200ms fire

Change-Id: Iff4faaa1de3741cf4e217949d5ed17d4e70c6af2
Task-number: QTBUG-61499
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-22 05:10:48 +00:00
Morten Johan Sørvig
1497e5853b QTestLib: Disable App Nap on macOS
App Nap may cause stalls or timer delays during test runs.

Change-Id: I828282d12127918439a9a2a4f7d7be6cac457b42
Task-number: QTBUG-61499
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-22 05:10:43 +00:00
Morten Johan Sørvig
8b8578a155 macOS: Add support for OpenGL Core Profile 4.1
NSOpenGLProfileVersion4_1Core is available starting
with macOS 10.10.

Task-number: QTBUG-62333
Change-Id: I75d8c3bc1093ff38c6ca1db2d2da50fd448a149f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-22 05:08:04 +00:00
Tor Arne Vestbø
0a7eb034f4 macOS: Restore support for layered mode
After 871966 we now do drawing as a result of drawRect calls, but layer
backed mode was not taken into account. This restores support for both
pull and push-mode drawing in layer-backed mode.

Change-Id: I35039ee9eb4486206f9f92f8230df104473368c9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-08-21 10:18:12 +00:00
Tor Arne Vestbø
23697466ca Reduce usage of QDesktopWidget to resolve screen properties in QtWidgets
Removes the need to initialize QDesktopWidget, just to look up which
screen a widget would map to, the geometry of a screen, number of
screens, etc.

Change-Id: Ieb153b9ff6d3fba645fc528d6e430e8392f990bf
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-18 13:10:23 +00:00
Tor Arne Vestbø
52ad5afe1c macOS: Redraw window bottom corners after synchronous backing store flush
Flushing outside of the display cycle does not care about any ordering
between views, including the NSThemeFrame responsible for drawing the
rounded corners of the window.

Since Qt Widgets is doing a lot of synchronous flushing (for now, until
we plumb update() to requestUpdate(), or enable layer-backing), we add
a workaround that explicitly draws the corners after flushing, just like
the logic in [NSView displayIfNeeded]. This is the same workaround used
by WebKit: https://trac.webkit.org/changeset/85376/webkit

Change-Id: I884152cdb2685569704e577b64b5ae278ed82c21
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-18 13:10:21 +00:00
Shawn Rutledge
dfdb94410a Revert "macOS: Create NSView as initially hidden, to match QWindow behavior"
It seems to break the ability to grab an offscreen QQuickView.
That in turn breaks the tst_qquickimage::hugeImages autotest.
This reverts commit 096b56f336.

Task-number: QTBUG-62548
Change-Id: I11ce452341bfc2cc3cbc832b613c7366049b31d5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-18 12:40:01 +00:00
Alex Trotsenko
3ce555a3de QProcessPrivate::tryReadFromChannel(): remove dead code
'readBytes == 0' condition is checked in the code above.

Change-Id: I9448f47939b174fdef9f0cd5413254d41a8b4273
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-17 18:27:23 +00:00
Andreas Hartmetz
90749ecf09 QLineEdit: Create a separate undo entry for each middle-click paste
Previously, a sequence of middle-click pastes produced just one undo
item to undo/redo all of the pastes at once.
The new code seems to be the intended way to paste the selection anyway.

Change-Id: Ifc2e9714628da9e394053ff8c34709578656f54d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-17 18:05:53 +00:00
Paul Olav Tvete
2e1ad4335c Don't send extra mouse press to popups on dblClick
QWidget::event() will turn an unhandled double click into a
mouse press. Therefore, we must avoid sending a separate mouse press
in that case.

This copies the logic from 9063edef79,
the previous fix for QTBUG-25831, which only applied to the non-popup
case.

Task-number: QTBUG-25831
Change-Id: I616f398a5ebe1f95d4b65b9f6ce2fe39a6fad83e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-17 12:25:10 +00:00
Thiago Macieira
0dee566e98 QFileSystemEngine: verify that the file name isn't empty
Making system calls with empty file names is not a good idea. When you
run qmake $srcdir, you see this in strace:

 stat("", 0x7ffed229e250)                = -1 ENOENT (No such file or directory)
(twice)

I've also inlined the isEmpty() function for better code generation.

Some functions take QSystemError and some don't. That needs to be
corrected at some point, possibly with something like std::expected.

Change-Id: I1eba2b016de74620bfc8fffd14ccbfa162f93631
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-17 04:45:29 +00:00
Tor Arne Vestbø
9a50333dd0 Fix CMake version resolving
Otherwise 3.8.1 is treated as not recent enough than the required 2.8.3

Change-Id: I198fc7d54e3da935fd163c9b9bb7dc12b986d1c2
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
2017-08-16 15:35:40 +00:00
Ville Voutilainen
38db7b1464 Fix an ABI break caused by too-aggressive deprecation
Task-number: QTBUG-62516
Change-Id: Ia3b36cddae982cc6fb9f857505be6e38bc8aaa64
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-16 15:35:26 +00:00
Liang Qi
106d3b9bf9 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/plugins/platforms/cocoa/qcocoamenu.h
	src/plugins/platforms/cocoa/qcocoamenu.mm
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/widgets/styles/qstylehelper_p.h

Change-Id: I54247c98dd79d2b3826fc062b8b11048c9c7d9bb
2017-08-15 16:31:48 +02:00
Oswald Buddenhagen
8bebded9ab qmake: don't limit command line length when not actually on windows
QMAKE_LINK_OBJECT_MAX is actually a property of the host, not the
target.

this works around binutil's inability to use thin LTO objects in
conjunction with an MRI script
(https://sourceware.org/bugzilla/show_bug.cgi?id=21702).

Task-number: QTBUG-61335
Change-Id: I90a1334b9c905c433b35546e8f3f3b5089d2c65b
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-08-15 10:55:52 +00:00
Oswald Buddenhagen
d64abf8166 refuse to build examples inside the qt source tree stand-alone
doing so is somewhat likely to cause follow-up issues, as it turns the
source tree into a build tree as a side effect.

note that this change does not affect building examples inside an
install tree, even if doing that is still ugly.

Change-Id: I386bf2ab959269f55553c70b7551dd9afec2bcba
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-15 10:55:48 +00:00
Oswald Buddenhagen
1da25fe85a fix excessive execution of code meant for examples only
qt_example_installs.prf is loaded by every sub-project inside the qt
tree, as qt_build_config adds it.

Change-Id: Ice7e81b280b6964ed5cc1b9f1501bf74df737d7e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-15 10:55:44 +00:00
Oswald Buddenhagen
1480066592 employ return() inside qt_example_installs.prf gainfully
reduces the indentation level.

Change-Id: I7851ffc5e9ecaaa3ae375d14fd245ea3747f61b2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-15 10:55:40 +00:00
Oswald Buddenhagen
4e5af88a8c configure: fix detection of icu in static build
don't complain about library inline sources which have 'builds' but no
'libs'.

Task-number: QTBUG-62150
Change-Id: Ib215d438fc02ebdafde95f31cd48088b1bafc663
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-15 10:55:35 +00:00
Oswald Buddenhagen
ad70f2ed20 configure: simplify construction of QMAKE_CONFIG_CACHE
there doesn't appear to be a reason for the former complexity.
QMAKE_CONFIG_LOG was already assigned the simple way.

Change-Id: I6b7e3b5b97c7647237841fa5e16c4959079edc16
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-15 10:55:31 +00:00
Oswald Buddenhagen
190aa94be7 Change source identifier type in ProString
The strings remember in which file they were created/assigned.

However, this used a non-counting reference to a ProFile, which could
become dangling. If a subsequent ProFile re-used the exact same address,
a string's source would be mis-identified, which would be fatal in
conjunction with discard_from().

Since we actually need only a unique id for comparison, let's use an
integer for that.

Task-number: QTBUG-62434
Started-by: Simon Hausmann <simon.hausmann@qt.io>
Change-Id: I395153afaf7c835d0119690ee7f4b915e6f90d4a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-15 10:54:50 +00:00
Topi Reinio
79f679da94 Doc: Add styling for function groups
Add CSS rules for grouped function documentation; that is, multiple
function signatures sharing the same documentation body.

Change-Id: I28de3805a8f5f972a59f6ea4ae32262ac36b69a6
Reviewed-by: Martin Smith <martin.smith@qt.io>
2017-08-15 09:40:13 +00:00
Stephan Binner
e6fad35155 Convert features.graphicsview to QT_[REQUIRE_]CONFIG
Change-Id: I1083097802772624e5d414678b4612308683a56f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-15 05:10:10 +00:00
Gabriel de Dietrich
306071e50e QCocoaMenu: Sync menubar menu when adding items
Empty menus on a menubar are hidden by default. If the menu gets
added to the menubar before it contains any item, we need to get
the menubar to sync the menu, which will update its native menu
item hidden property.

Menurama manual test's 'Add Many Items' button should now work.

Change-Id: I8ce1df21031c171789318fdf28ae495819458d71
Task-number: QTBUG-62260
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-15 01:21:44 +00:00
Gabriel de Dietrich
f27d1ccbb2 QCocoaMenu: De-pessimize the number of calls to validateMenuItem:
Calling -[NSMenu update] every time we add a new item can result in
a quadratic behavior since the function itself will iterate over all
the items in the menu. We solve this by using a 0-timer which will
trigger the call to update the next time the event loop spins.

Menurama manual test updated.

Change-Id: Ic155d364515cc93eb81b1c8085c8e44c93799954
Task-number: QTBUG-62396
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-15 01:21:37 +00:00
Romain Pokrzywka
c161c6db78 Fix a race condition in QEvdevTabletHandler::readData()
Statics and threads don't mix well. There can be multiple threads
calling QEvdevTabletHandler::readData() simultaneously if you have
several tablet devices registered with the plugin, creating a race on
the static buffer array.

Make the buffer a simple local variable instead, the array is small
enough that we can afford the per-thread stack allocation.

Change-Id: I4487add8df50743b8178ca6faeb9be45231ccb78
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-08-14 19:02:23 +00:00
Romain Pokrzywka
9193b6cc85 QNAM: requeue pipelined HTTP requests after unrecoverable socket errors
If we reach the maximum reconnect attempts for an HTTP request with
pipelining enabled, those also need to be requeued during cleanup for
the connection channel. Otherwise future successful requests on that
same channel will incorrectly assign the data to replies from the old
pipelined requests, resulting in swapped data in the replies.

Task-number: QTBUG-62286
Change-Id: I804b8ac280957b518d63b2341e469a13315a8c27
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
2017-08-14 14:20:52 +00:00
Milla Pohjanheimo
0273391dbe Update binary compatibility files for Qt 5.9.0 for QtBase
Added binary compatibility files for Qt 5.9.0.
'QOpenGLExtraFunctionsPrivate::Functions' and
'QOpenGLExtraFunctionsPrivate' have been blacklisted in
qtqa/tests/postbuild/bic/tst_bic.cpp, because those give false
positive fail in the binary compatibility tests.

Change-Id: I2231daef61a0c4677af36c85575b8dcd81070d44
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-14 13:48:17 +00:00
Thiago Macieira
b7bcd03d19 Doc: indicate the QSharedMemory::size() that the size may be bigger
Task-number: QTBUG-62468
Change-Id: I6e9274c1e7444ad48c81fffd14da78718828c4a6
Reviewed-by: Martin Smith <martin.smith@qt.io>
2017-08-13 20:47:37 +00:00
Thiago Macieira
10b46fe474 Autotest: Fix test when running on a non-Unicode-capable locale
Like my default FreeBSD environment.

Change-Id: I3868166e5efc45538544fffd14d8a7f2dffa6ac9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-12 07:56:39 +00:00
Jarkko Koivikko
8de79dbcec Widgets: Fix ImSurroundingText query for a QLineEdit with mask
QLineEdit with a mask does not return empty fields with the
ImSurroundingText query. This is a problem for the input
context that is not aware of the mask and relies on the
fact that the cursor position never exceeds the boundaries
of the surrounding text.

This change fixes the issue by returning unmasked text with
the ImSurroundingText query.

[ChangeLog][QtWidgets][QLineEdit] Fixed behavior of the
ImSurroundingText query. Previously, it returned a masked
text whose length may be less than the cursor position.
Now it returns unmasked text, so the text length is always
greater than or equal to the cursor position.

Task-number: QTBUG-60319
Change-Id: I1c8009164836a1baa2e3a45958bf1ea5fa9be38d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-08-11 13:27:37 +00:00
Mårten Nordheim
858634d5f4 Fix 64-bit build using MinGW
The relevant changes was made for 32-bit, but not 64

Change-Id: I7dc1a299d72a742efca7c56717274c0c2ea0c579
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-08-11 13:10:46 +00:00