Commit Graph

34480 Commits

Author SHA1 Message Date
Gatis Paeglis
9dc7904556 xcb: update libXi version requirement in the README file
... from 1.7.4 to 1.7.5 (released Sep, 2015).

Some more locking issues were fixed after 1.7.4. Testing
for a prolonged period of time has showed that 1.7.5 does
not cause a system lock-up.

[ChangeLog][Platform Specific Changes][X11 / XCB] Minimal libXi
version requirement has been updated from 1.7.4 to 1.7.5. This
is because XIAllowTouchEvents is known to deadlock with libXi 1.7.4
and earlier. When touch events are never received, this is not
an issue. Plain mouse / keyboard systems are not affected.

Task-number: QTBUG-62224
Change-Id: Ie70264b9af0390df33c417f660350d4bce48c6d3
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-12-13 22:50:33 +00:00
Tor Arne Vestbø
ba44cdae38 Teach QPlatformWindow about safe area margins and implement for iOS
The safe area margins of a window represent the area that is safe to
place content within, without intersecting areas of the screen where
system UI is placed, or where a screen bezel may cover the content.

QWidget will incorporate the safe area margins into its contents margins,
so that they are are never smaller than the safe area margins. This can be
disabled by unsetting the Qt::WA_ContentsMarginsRespectsSafeArea widget
attribute, which is set by default.

QLayouts will automatically use the contents area of a widget for their
layout, unless the Qt::WA_LayoutOnEntireRect attribute has been set. This
can be used, along with a contents margin of 0 on the actual layout,
to allow e.g. a background image to underlay the status bar and other
system areas on an iOS device, while still allowing child widgets of
that background to be inset based on the safe area.

[ChangeLog][iOS/tvOS] Qt will now take the safe area margins of the
device into account when computing layouts for QtWidgets.

Change-Id: Ife3827ab663f0625c1451e75b14fb8eeffb00754
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-12-13 20:47:15 +00:00
Lars Knoll
59febb49e4 Fix a bug in the generation of the Unicode joining property data
The code that was supposed to initialize the joining property of
characters to the correct defaults was actually applied after reading
in the data from the Unicode file, and was in a couple of cases
overwriting explicitly specified data in ArabicShaping.txt

Task-number: QTBUG-63191
Change-Id: Ie35261039b2211a827322ca11afacd9555ccefc7
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2017-12-13 19:14:49 +00:00
Oliver Wolff
457fe3e8e2 ANGLE: Fix resizing of windows
Use the correct height/width values when calculating
the vector for resizing the window content and the
new size as viewport size.

Task-number: QTBUG-62475
Change-Id: I33a8dc1379a908e991b04bc31dfc6254a6d005c9
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-12-13 13:07:52 +00:00
Oliver Wolff
27c840f5d4 Fix typo
Change-Id: If6111c59b958ba03f6ec5966af5cf443cae5cf9b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-12-13 13:07:48 +00:00
Marc Mutz
27aacfb61e QString: fix documentation of NUL-termination of unicode(), data(), constData()
(or lack thereof).

* `QString::utf16()` reallocates if `*this` has been constructed using
  `fromRawData()`.

* `QString::data()` ensures a writable string, so will detach from raw
  data.

* `QString::unicode()`, `constData()`, and `data() const` do not. They
  just return `QStringData::data()`, which may point to raw,
  non-NUL-terminated data.

These functions can therefore not possibly have the same behavior, but
were documented the same.

Fix.

Also drop the discussion of operator[](size()), as that, too, was not
correct, and anyone who indexes with op[] beyond size() - 1 should not
rely on proper behavior.

[ChangeLog][QtCore][QString] QString::unicode(), constData() and
`data() const` do not return a NUL-terminated string. This was true
before, but the documentation claimed the opposite.

Change-Id: I1437f57cd02bdf80264e8559608b46aa749c23a8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-12-13 10:55:59 +00:00
Oswald Buddenhagen
91996d4ec4 Bump version
Change-Id: I752089caa4f2a0cb91d1c4bfa2c53fe25b6bb34e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-12-13 10:53:55 +00:00
Allan Sandfeld Jensen
ae55e75b1b Paint text decoration where the text is
For multi text-item texts we should render the text decoration at the
same position as the text-item part is, and not always from the
beginning of the line.

Task-number: QTBUG-60422
Change-Id: I9aa58fc164122ad1fae9716b8b18bdfbbbd778a9
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-12-13 08:43:39 +00:00
Samuli Piippo
98b7ad7682 QNX: fix slog2 for QNX7
Change the include header to sys/slog2.h, which is available
in both QNX 6.6.0 and 7.

Task-number: QTBUG-64033
Change-Id: I26d8c5451376bab33e11f4784ca772f84cd6fc28
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-12-13 06:50:53 +00:00
Laszlo Agocs
782eb1a114 Report modifiers correctly in mouse events with evdev and libinput
Task-number: QTBUG-60694
Change-Id: I7b1625e5f31e49cd2ab18a83bbd0f65f9b58088d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-12-12 20:21:15 +00:00
Laszlo Agocs
7257862fb2 Set sharedPainter correctly for QGraphicsEffect
Autotest is taken from the previously reverted
8b1377fde1.

Task-number: QTBUG-60231
Change-Id: I44dd79cba22b6baefdd6d95c176790bef0b7eafe
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-12-12 20:21:07 +00:00
Laszlo Agocs
6a5ca7240a Fix QEGLPbuffer::isValid() with surfaceless contexts
Task-number: QTBUG-65125
Change-Id: Idcd87804ab63031e48ff2f72eb98c986bfa39f25
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-12-12 20:21:00 +00:00
Friedemann Kleint
4a4efd5693 qwindowsopengltester.cpp: Fix -Wclazy-strict-iterators
Change-Id: Id22096197aa5bf406ea1f072e8b5ca2a90578eec
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-12-12 20:20:32 +00:00
Friedemann Kleint
9b597a09f1 QtGui/Windows: Fix wait cursors remaining active
In QWindowPrivate::applyCursor(), do not apply override cursors
when the platform supports QPlatformCursor::OverrideCursor.

Complements b05d1c2ebf.

Task-number: QTBUG-65001
Change-Id: Ie84cc30ad99b22e037aae829a2ce847ec4bf900f
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-12-12 20:20:17 +00:00
Friedemann Kleint
141bca90e1 Windows QPA: Fix handling of override cursors
Override cursors were not restored when nested or in a dual
monitor setups.

The default cursor stored in QWindowsCursor::m_overriddenCursor
was clobbered by subsequent calls to QWindowsCursor::setOverrideCursor().
This caused for example the wait cursor to remain active when
switching to Help Mode in Qt Creator. Add a check preventing that.

Make the variable static so that it is shared between the cursors
of multiple screens.

Amends b05d1c2ebf.

Task-number: QTBUG-65001
Change-Id: Iead5804d317f73dedd78d22c1c85c62b5349ab83
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-12-12 20:20:13 +00:00
Heikki Haveri
e55c7974db Fix Android Service thread getting stuck in service startup
This change allows services using QAndroidService to function properly.
A service using a plain QCoreApplication is still affected.

The original code uses postfix decrement, causing an off-by-one error in
reference counting, which, in turn, fails to properly release a semaphore.

Fix by using deref() instead, which is also more readable, and consistent
with the use of ref() elsewhere in the code.

Task-number: QTBUG-64728
Change-Id: I99b59307638d619506c594f86de6d7d202d755f2
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-12-12 20:12:49 +00:00
BogDan Vatra
280b8b79c0 Allow the users to disable the text handles
The user can set QT_QPA_NO_TEXT_HANDLES to 1 to disable the text handles.

Change-Id: I974af4d79c86259288035fe20b6a9d0c6d047af8
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-12-12 20:12:30 +00:00
Simon Hausmann
495833b796 [ChangeLog][QPA][eglfs] Fix crash when using cursors and multiple GL contexts
The hash from QOpenGLContext* to cursor texture/shader data can
accumulate dangling pointers if the program uses multiple contexts on
the same screen. This is fixed by moving the cursor data into the
platform context. The code for deleting the texture and shader program
is omitted as it is tied to the life time of the context and the GL
context deletes its resources automatically upon destruction.

Task-number: QTBUG-65119
Change-Id: Ic3b8e5669d14949af811bdf047e7d47000216180
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-12-12 19:18:38 +00:00
Christian Ehrlicher
06e903cf68 QHeaderView: Use correct font for drag'n'drop indicator pixmap
QHeaderViewPrivate::setupSectionIndicator() did not honor the font
set for the QHeaderView which results in a wrong font in the indicator
pixmap. Fix it by using the correct font for the dragged section as
it is done in paintEvent()

Task-number: QTBUG-65017
Change-Id: I5393c6861073de22f30ffa13e12c5e2cf8aa7776
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-12-12 19:07:10 +00:00
Christian Ehrlicher
26aa20407d QHeaderView: Fix painting vertical headers in rtl mode
In rtl mode, the headers were not painted correctly. The style option
selectedPosition was not filled correctly and the paint rect needed
to be adjusted by one pixel to fit the table grid.

Task-number: QTBUG-56520
Change-Id: Ib92d5ab6ff730bba67eca35c83cd638e613f58b9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-12-12 19:07:07 +00:00
Christian Ehrlicher
eff7a5f38c QFileSystemModel: properly align file size column
The file size column was not properly horizontally aligned. The model
only returned Qt::AlignRight with no horizontal alignment. This lead
to a top alignment within QStyle::alignedRect().

Task-number: QTBUG-64098
Change-Id: Iaef30200a63bd0975c88a67d0af2eb1d5254f588
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-12-12 19:07:04 +00:00
Thiago Macieira
48d677365a QStandardPaths: fall back to a default if PATH isn't set
Change 28666d167a simplified
QProcess::start{Process,Detached} by using findExecutable() instead of
using execvp, but this introduced an unintended side effect when the
PATH environment variable isn't set. It turns out that most libc have a
default fallback in that situation, which we didn't apply.

This commit applies the default directly to findExecutable(), which
seems sensible.

[ChangeLog][QtCore][QProcess] Fixed a regression that made QProcess be
unable to find executables when the PATH environment variable on some
Unix systems wasn't set. This behavior should not be relied upon since
many systems do not have sensible fallback values for PATH.

[ChangeLog][QtCore][QStandardPaths] findExecutable() will now apply the
default value for the PATH environment variable (as returned by the
POSIX confstr(3) function or found in <paths.h>) if the variable
isn't set in the environment.

Task-number: QTBUG-65076
Change-Id: I9407dcf22de6407c83b5fffd14feda6c1f509210
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2017-12-12 19:06:57 +00:00
Friedemann Kleint
e055efb445 Do not allow drag events when window is blocked by modal window
Check for QWindowPrivate::blockedByModalWindow in
QGuiApplicationPrivate::processDrag().

Task-number: QTBUG-46287
Change-Id: I8f43de8389f34458f9e10b37b94806b47a50d40a
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-12-12 07:19:54 +00:00
Tor Arne Vestbø
b0f142e353 iOS: Ensure that the cursor rect doesn't trigger an inverted scroll
If the cursor is at the top of the screen, it may end up with a cursor
rect that extends beyond the screen after we pad it. We need to make
sure it's constrained by the screen geometry before checking if it's
within the available geometry.

Task-number: QTBUG-65041
Change-Id: I115f49d359b3c2e10219a6b8aa5ad051f44256a7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-12-11 21:17:39 +00:00
Tor Arne Vestbø
3d720f38fa iOS: Implement QIOSScreen::refreshRate to account for 120Hz displays
Task-number: QTBUG-64968
Change-Id: If96f6cde8f2fc6d91beb842d82a881fe057260b5
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-12-11 21:17:34 +00:00
Friedemann Kleint
fefd9de52a Windows QPA: Emulate aboutToHide(), aboutToShow() signals of QPlatformMenu
Wrap the call to TrackPopupMenu accordingly.

Complements 7849aa6e96.

Task-number: QTBUG-64628
Change-Id: Ia370e566266e96ab690ce5ed41d06dea7cafd4e4
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-12-11 19:06:30 +00:00
Thorbjørn Lund Martsum
d2d6c6f781 QWidgetResizeHandler - undo (potential) move break
When the mode is center we are typically moving the dock widget,
but we should however not stop if the mode is Center.
Though the regression
(in commit e662b4ed721ee36f0a17cc413494b7d09395d52e)
is not easy to reproduce it is clear
that the code later may call "mouseMoveEvent(e)" and the
mode is also checked for being Center and in that case
the eventfilter (function) returns true (not false).

Change-Id: I3936ec56833d613f78920d9ccf8ddb66e19e9802
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-12-08 20:47:22 +00:00
Jake Petroules
f0d226e4c5 Add a "shim" to allow use of Clang 5's __builtin_available everywhere
This is mostly relevant for Apple platforms, where we can use the new
unguarded availability warnings to guarantee that proper version checks
are present when using APIs that are not necessarily available on the
deployment target.

Change-Id: Ie408704b2924e1220491a9ea30f0141dfa4867d9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry-picked from 70422449ef)
2017-12-08 19:23:04 +00:00
Michael Dippold
dbabe27b5b Android: Support caps lock
MetaKeyKeyListener augments the meta state of the keyboard, we need
to also check the KeyEvent.getMetaState().

Task-number: QTBUG-61369
Change-Id: I07a5d7b1b741a958bc94e1f1677dc1f2256220b6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-12-08 18:22:51 +00:00
Liang Qi
812bb236dd Merge remote-tracking branch 'origin/5.10.0' into 5.10
Change-Id: I6dcf85067ec226136c207ea69ca9d66736c84db5
2017-12-08 13:56:17 +01:00
Gatis Paeglis
79d78d814a xcb: verify if xrandr present before using xcb_randr* APIs
Not doing so might break the connection. We have had similar
issues before, e.g. QTBUG-45312.

Change-Id: I95f15d24773fc92b052578bd72d1ba264d0a5f63
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Uli Schlachter <psychon@znc.in>
2017-12-07 17:56:10 +00:00
Tor Arne Vestbø
a73de7ce2d iOS: Harden logic for when it's safe to use the graphics hardware
To fix QTBUG-52493 we tied the exposed state of a window to the
application being in the foreground. This has the result of a
visible flash of black between hiding the launch screen and showing
the first frame of the application, as the application is still
waiting for UIApplicationStateActive to begin rendering, which
happens after iOS hides the launch screen.

According to the iOS OpenGL ES Programming Guide, it should be safe
to render GL in UIApplicationStateInactive as well, and even in
UIApplicationStateBackground, as long as the rendering finishes
before the UIApplicationDidEnterBackgroundNotification returns.

To ensure that we catch any bugs in this area, checks have been
added that verify that no rendering happens while in the background
state.

Task-number: QTBUG-63229
Task-number: QTBUG-52493
Task-number: QTBUG-55205
Change-Id: Ib42bedbeddd7479ab0fb5e5b7de9f5805658e111
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-12-07 00:12:42 +00:00
Tor Arne Vestbø
933497bace iOS: Ignore view layouts while in the background
Despite the OpenGL ES Programming Guide telling us to avoid all
use of OpenGL while in the background, iOS will perform its view
snapshotting for the app switcher after the application has been
backgrounded; once for each orientation. Presumably the expectation
is that no rendering needs to be done to provide an alternate
orientation snapshot, just relayouting of views. But in our case,
or any non-stretchable content case such as a OpenGL based game,
this is not true.

Instead of continuing layout, which will send potentially expensive
geometry changes (with isExposed false, since we're in the background),
we short-circuit the snapshotting.

iOS will still use the latest rendered frame to create the application
switcher thumbnail, but it will be based on the last active orientation
of the application.

To ensure that we pick up the right geometry when rotating the device
while the app is in the background, we treat applicationWillEnterForeground
as Qt::ApplicationInactive, which matches the recommendations of the
OpenGL ES Programming Guide to "re-create any objects and restart your
animation timers".

Change-Id: Ia9c27f85f996ecf30284c825b43447aa7099224e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-12-06 20:47:05 +00:00
Tor Arne Vestbø
e37c9d5d5f iOS: Harden application state change logic
Make sure we catch application state changes as early as possible,
and deal properly with any changes delivered before we have an app
to send them to.

Change-Id: I6d0ea0398f9fab88fc182342769b075cb144227f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-12-06 20:46:51 +00:00
Tor Arne Vestbø
77942a1bdf iOS: Try to detect and deal with delayed touch delivery due to gestures
A UIGestureRecognizer may have its delaysTouchesBegan or delaysTouchesEnded
properties set, which causes iOS to not deliver touch events to the view
until the recognizer has failed recognition of its gesture.

In that case, the touch event is not delivered via [UIWindow sendEvent:]
as usual, but via _UIGestureEnvironmentSortAndSendDelayedTouches. The
latter function is apparently not reentrant, as opening a native alert
dialog in response to the touch delivery will result in the dialogs's
buttons to stop working, probably because they themselves use gestures.

Unfortunately iOS maintains two internal gesture recognizers on iPad,
of type _UISystemGestureGateGestureRecognizer, probably related to the
swipe-from-bottom gesture used for multitasking. Without any workaround,
these two recognizers will result in any tap on the bottom part of the
screen to be delivered delayed, which may introduce stuck alert dialogs
as described above.

UITouch has a gestureRecognizers property, but unfortunately this property
does not give us any information in the cases where we need it, so we
have to use an heuristic involving a UIWindow subclass to detect the
case where event delivery is delayed. As there is no way to prevent
the user from recursing into an event loop when delivering the event,
our only hope is to deliver the event asynchronously.

Task-number: QTBUG-64577
Change-Id: I11d9caa8c4542dc80426a9e58ea555914bed433e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-12-06 16:17:18 +00:00
Tor Arne Vestbø
58a409c6dc iOS: Implement QPlatformScreen::name for easier debugging
Change-Id: I077bec93fe2086c38ebe986b322977a50a1ab27d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-12-06 16:17:15 +00:00
Alex Trotsenko
d02a6b938e QAbstractSocket: clear error code to match the error description
Since 5.10, QIODevice resets the error string on opening. So, we should
set the error code to UnknownSocketError accordingly.

Change-Id: I0dd314788ffc182d6837f9d06b51e41d6de59d7e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-12-06 11:09:01 +00:00
Eric Lemanissier
b08c195264 fixup oversight in QStringView::lengthHelperPointer
amends 3b61cd6ad7

Change-Id: I3afa008299b8fcccae8943e545b536a68b17bd1a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-12-06 07:04:31 +00:00
Thiago Macieira
1853aeb50a tst_QUdpSocket: remove Bearer portions of the test
Test fails to start on FreeBSD:

FAIL!  : tst_QUdpSocket::initTestCase() 'networkSession->waitForOpened(30000)' returned FALSE. ()
   Loc: [/usr/home/tjmaciei/src/qt/qt5/qtbase/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp(234)]

This commit is basically a revert of the Qt 4.8 commit
a951fb79139498774d021759d0466b4b2ff50e68. FORCE_SESSION was only used by
manual testing, as the commit message said

> 8. For manual testing, added the FORCE_SESSION macro to test behaviour
>   of UDP sockets when they have an explicit network session associated

So I doubt it has been tested recently.

Change-Id: Ifb5969bf206e4cd7b14efffd14fb569ebf53497b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-12-05 21:59:35 +00:00
Liang Qi
3d175cd541 Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into refs/staging/5.10 2017-12-05 21:59:30 +00:00
Andy Shaw
87efdd8c7f Android: Reserve space for the QVarLengthArray, so we can use append
When the QVarLengthArray was initialized with a size then append would
add to the end of that. Therefore we need to use reserve to get the
desired effect.

Task-number: QTBUG-64905
Change-Id: Ia1ebeb26cd31bc5e92bd7f81079506a266b845bf
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2017-12-05 17:07:39 +00:00
Thiago Macieira
138d34b9c8 QFileSystemEngine: Work around Android bug in rejecting hardlinks
Android Marshmellow intentionally forbids use of hard links. See
 https://code.google.com/archive/p/android-developer-preview/issues/3150

However, instead of using EPERM or another error code that indicates the
hard linking operation itself has a problem but there are no other
problems, Android developers stupidly chose to use EACCES, an errno code
that only indicates permission problems.

In any case, since the call will never succeed, we shouldn't even try.

Task-number: QTBUG-64103
Change-Id: I9e2892cb6c374e93bcb7fffd14fc5d1082bd60a3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-12-05 15:36:23 +00:00
Thiago Macieira
81a88639ac tst_QUdpSocket: fix linkLocalIPv4 test
I broke it in commit 4da2dda2aa. It wasn't
flaky or anything: it was plain broken and would never pass. That
indicates no node in the CI has an IPv4 link-local address (and
apparently neither did I at the time).

Change-Id: Ifb5969bf206e4cd7b14efffd14fb62176546916e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2017-12-05 15:33:12 +00:00
Thiago Macieira
637e8ebcc3 tst_QUdpSocket: Don't test for .bytesAvailable on untrusted platforms
FreeBSD, for example, does not have SO_NREAD and its FIONREAD returns
the full socket buffer size, including IP and UDP headers.

Change-Id: Ifb5969bf206e4cd7b14efffd14fb5d8ca778d16a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2017-12-05 15:32:29 +00:00
Dongmei Wang
ff7dbda3b0 xcb_qpa_lib: Fix "undefined reference to `dlsym'" error
Change-Id: I37515542571ef37f4361e72b8db4547ff1e1b86a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-12-05 15:17:49 +00:00
Liang Qi
53b141dceb Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	src/plugins/platforms/ios/quiview.mm

Change-Id: I88384c70047391c75d9ff166c8d9881ff6751dbf
2017-12-05 13:37:21 +01:00
Friedemann Kleint
77687bc64e QFileSystemModel::index(): Add a list size check
This prevents an out of range assert when monitoring directory
with activity (for example, temp).

Task-number: QTBUG-62841
Change-Id: Id3aa4098e9bbd665c7b17a667516885fa7c7f473
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Martin Rotter <rotter.martinos@gmail.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-12-05 09:05:38 +00:00
Dongmei Wang
b8a6e2b6e8 QColor: write signed 64-bit integer in a platform-independent way
When building Qt 5.6.2 with gcc 4.1.2 on Fedora 8, a compilation error
happened when compiling the code below
QColor::name()
{
...
   case HexArgb:
       return QLatin1Char('#') + QString::number(rgba() | 0x100000000, 16).rightRef(8);
...
}

qtbase/src/gui/painting/qcolor.cpp:527: error: integer constant is too large for ‘long’ type

gcc 4.1.2 was unable to handle 0x100000000. The patch is to use Q_INT64_C to
append "LL" to 0x100000000 to avoid the compilation error.

Change-Id: I000e65a5c897ef2d78fcfe4e212d832eb488a762
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-12-05 07:29:25 +00:00
Friedemann Kleint
2c6c044500 Fix qdoc warnings for 5.10
src/corelib/global/qrandom.cpp:915: warning: Cannot find 'bounded(...)' in '\fn' qreal QRandomGenerator::bounded(qreal highest)
src/corelib/tools/qstring.cpp:774: warning: Command '\snippet (//! [qCompareStrings-QSV-QSV])' failed at end of file 'qstring/main.cpp'
src/corelib/tools/qstring.cpp:5281: warning: Cannot find 'qTrimmed(...)' in '\fn' QStringView qTrimmed(QStringView s)
src/corelib/tools/qstring.cpp:5281: warning: Cannot find 'qTrimmed(...)' in '\fn' QLatin1String qTrimmed(QLatin1String s)
src/corelib/global/qrandom.h:171: warning: No documentation for 'QRandomGenerator::System'
src/corelib/global/qrandom.h:105: warning: No documentation for 'QRandomGenerator::bounded(double highest)'
src/corelib/global/qrandom.h:84: warning: No documentation for 'QRandomGenerator::generate64()'
src/corelib/global/qrandom.h:77: warning: No documentation for 'QRandomGenerator::generate()'
src/corelib/global/qrandom.cpp:799: warning: No such parameter 'sseq' in QRandomGenerator::seed()
src/corelib/global/qrandom.cpp:1096: warning: Can't link to 'operator()()'
src/corelib/tools/qstring.cpp:8982: warning: Can't link to 'qStartsWith()'
src/corelib/tools/qstring.cpp:9203: warning: Can't link to 'qTrimmed()'
src/corelib/tools/qstring.cpp:4798: warning: Can't link to 'qConvertToLatin1()'
src/corelib/tools/qstring.cpp:4825: warning: Can't link to 'qConvertToLocal8Bit()'
src/corelib/tools/qstring.cpp:4928: warning: Can't link to 'qConvertToUcs4()'
src/corelib/tools/qstring.cpp:4884: warning: Can't link to 'qConvertToUtf8()'

Change-Id: I5c7c89b230d3d1de8a679c10833319a470a44e80
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-12-04 18:04:04 +00:00
Gatis Paeglis
bcd0e43eb9 xcb: fix regression with missing XI_PropertyEvent
Wacom stylus proximity detection had stopped working: it was not
detecting which type of tool is in use, so all stylus types
acted as a generic drawing stylus.

Selecting XI_PropertyEvent on a root window fixes the problem.
There is nothing in the XI2 specification that says that this
property would not be supported on non-root windows. Possibly
it is bug in the X server. Anyways, selecting XI_PropertyEvent
on a root window in this case actually is better. Property event
contains a global state information, there is nothing window
specific in it, so there is no need to select it for every native
sub-window.

It is worth noting that XI_HierarchyChanged also seems to work
only when selected on the root window (according to my testing
results). And on XI2 author's blog post about XI_HierarchyChanged
it says [1]:

"These events are sent to all windows, so it doesn't really
matter where you register. The traditional approach is to
register on the root window."

This kind of further confirms that it might be bug in X Server's
implementation.

[1] http://who-t.blogspot.no/2009/06/xi2-recipies-part-2.html

Task-number: QTBUG-64911
Change-Id: I8582675bf835239932e23f4596966dc167495e30
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-12-04 16:20:33 +00:00