The test has been crashing flakily recently.
1) It is creating a QGLWidget
2) It is stealing the QGLContext of that widget and moves it into a separate
thread.
3) In that secondary thread it makes the context current.
4) Meanwhile the QGLWidget itself may receive for example a resizeEvent or
other events and - since it assumes that it owns the context - attempts to
make it current.
5) Attempting to call makeCurrent() on a QGLContext that is in a different
thread than the current thread (via QObject thread affinity) will result
in a call to qFatal() and consequently the test aborts.
The conclusion from Simon Hausmann is that this test is testing a pattern from
Qt4 times that may or may not have worked back then. Nowadays with the Qt5
QOpenGL* API we do support this properly and there appears little sense testing
this.
Therefore remove the test altogether.
Task-number: QTBUG-66411
Task-number: QTBUG-66216
Change-Id: Ie2d66705bc7c3914ace6abcba9557c7c67ad4db3
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This test executable was not flaky in the normal sense that when run, it
sometimes passes and sometimes fails. Instead, in some builds it would fail
consistently and in some builds it would pass consistently.
The first test to fail was version(ok00, default to last version) which gives
"mylib" as the library name and -1 as the library version. The description
implies that QLibrary selects the biggest or last used version when given -1.
However, versions less than 0 are not used at all. Instead the loading uses only
the name to select the library. Change the description to match.
So why did the test sometimes pass, sometimes fail? The test uses two library
projects lib and lib2 which install two different major versions of libmylib.
That includes the symbolic links:
libmylib.so -> libmylib.so.1.0.0*
libmylib.so.1 -> libmylib.so.1.0.0*
libmylib.so.1.0 -> libmylib.so.1.0.0*
libmylib.so.1.0.0*
libmylib.so -> libmylib.so.2.0.0*
libmylib.so.2 -> libmylib.so.2.0.0*
libmylib.so.2.0 -> libmylib.so.2.0.0*
libmylib.so.2.0.0*
The key thing being that both set the libmylib.so symbolic link. In a
multithreaded installation it's undefined which happens to set the link last.
The test code expected libmylib.so to point to libmylib.so.2.0.0. Ensure that by
building and installing lib2 after lib.
Task-number: QTBUG-66722
Task-number: QTBUG-66216
Change-Id: Ic513c772902273049c28e43fc1d83d550aafcd23
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][QtCore][QJsonValue] fromVariant() conversion now converts
from QUrl and QUuid using special encoding forms to ensure best JSON
compatibility.
Change-Id: I56b444f9d6274221a3b7fffd150cdc5ca1f87ff1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
For compatibility with other parsers that may expect it to be so.
Change-Id: I56b444f9d6274221a3b7fffd150cd66390f98fd5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Seems this issue is still there with Adreno 5xx and 6xx is suspected to
have it as well (no device to test though), so added both 5xx and 6xx
to cover these. Updated 30x to 3xx in order to cover Adreno 320 and 330
as per https://en.wikipedia.org/wiki/Adreno.
Amends 9ae028f507
Task-number: QTBUG-66702
Change-Id: I6ce3f6499d3ff9da884be45039e5f5e0990f7e1f
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
After a37785ec76 went in, it become
apparent that multi mouse button state handling in qtestlib is
non-existent, for details see QTBUG-64030 and QTBUG-63786. What
happened behind the scenes often was not what one would expect based
on the provided QTest::mouse* input sequence - events went missing,
incorrect events were generated, each subsequent test function
started with a state set from the function that run earlier. It is
easy to see how a minor change in one test could easily affect outcome
of other tests.
With a37785ec76, Qt platform plugins
are now responsible for sending explicit mouse button type and state
information; qtestlib should take full responsibility now as well.
But using the new API from a37785ec7 alone in qtestlib is not sufficient.
We need to reset mouse state between each new test function run (we do
this at function scope as that fits with the current qtestlib API user
expectations). This patch implements the necessary reseting logic.
Updated tst_qwindow.cpp::generatedMouseMove() to use QTest::mouse* APIs.
That test requires pressing multiple buttons, it was not possible with
QTest::mouse* APIs before this patch.
Added an auto test for multiple mouse button pressing/release in
tests/auto/testlib/selftests/mouse/. And few other tests which are
currently QSKIP-ed, but should be considered when re-designing qtestlib
APIs.
Task-number: QTBUG-64030
Change-Id: I39fdcbc73a467a7463ce2aed622bf22484095635
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
QXcbScreen::format() was producing console warning and returning invalid
format if rgb-swap was necessary. Let it match possibly reversed formats
since the backing-store will swizzle it anyway.
Change-Id: I6a53cb8ceda029e9d708d25ad635832f1163ffe7
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Factor out a function to calculate the size and update the size when a
style sheet parent is set.
Task-number: QTBUG-64550
Change-Id: I3afe997085eae3cd48b7fe0a4c98582a8f572260
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Return value of qWaitForWindowActive should be checked as it is marked
Q_REQUIRED_RESULT.
One of the calls was failing, so remove it and wait for the next condition
instead.
Amends d0dffdfc01.
Change-Id: I0c0b2bf11504730477158a5e1fb3018f359a6fb9
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
The stdout of the processes used in the test was dumped if there was an error,
but the processes write their error messages to stderr.
Use MergedChannels process channel mode to dump both output streams.
Change-Id: I1645fd31c394da0871ee6ae36d37ca9a04d86052
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This avoids issues when using dependencies installed in a custom or
dedicated $prefix, when PCRE2 is configured to install its headers
in their own directory under instead of directly in $prefix/include.
Task-number: QTBUG-66355
Change-Id: Ia99464820600282d61237e5bcff38101d2c9684b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Before there was a risk looking up e.g index -1 if there
were no visible sections in layoutAboutToChange.
Change-Id: Ic911e4292e8e8c4892fef1c0f34cf7dccaad2bac
Task-number: QTBUG-65478
Reviewed-by: David Faure <david.faure@kdab.com>
This fixes cross compilation with mingw from a case
sensitive filesystem.
Change-Id: I0f5ba708b7138cae325ff564559d3e40eba4e714
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The refactoring to support multiple providers broke alias resolving
(e.g. "text/directory" would be an invalid mimetype, instead of being
resolved to "text/vcard"). The unittest didn't catch it because most of
it was running with a single mime directory (and therefore a single provider,
in the new model). Fixed by re-running a number of test methods once we
have a second mime directory.
Change-Id: Ib5da89ba79c11ed41813b2aff4bc71c30afcde7d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
that parameter is never set, and if it was, it wouldn't work: the
recursively found files were not qualified with the subdirectory.
Change-Id: I24a3f74de3545c19bcd175c24ad1daf2af77a720
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
it needs to fall back to -outdir if only the latter is specified, as
otherwise funny things will happen.
this didn't affect the calls in qt_module_headers.prf (both options
used) and the unix configure script (neither option used), but it
affected configure.bat, and possible callers outside qt's build system,
which apparently includes our packaging scripts.
amends ede6c44756.
Task-number: QTBUG-66626
Change-Id: I08633033c04152616545501490c9b3fb939cab6c
Reviewed-by: Lionel CHAZALLON <longchair@hotmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The UBA in Qt was out of date, implementing the spec from pre
Unicode 6.3 days. It missed handling of directional isolates and
paired brackets.
This adds a completely new implementation of the UBA, that is
compliant with Unicode 10.
Added the test data from Unicode 10 to the qcomplextext auto
test and ensure that we pass the test suite.
Task-number: QTBUG-57743
Change-Id: Ie2d957bc9775d82f0a51d1c78dc6bd154f22847c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
If the script item is rtl, we need to subtract the offset inside the
ligature again, as the full width of the ligature would have already
been added in the loop before.
Change-Id: I544ac6fa19484b35335767e1ba1befc3dfa07693
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
We recreate the window of our QNSView in various situation such as changing
the styleMask, which results in either a new QNSwindow or QNSpanel being
set as the window of the view. KVO-observing the window property of the
view will fail we then have a new window instance, and will crash when
trying to remove the observer from the new window.
Unfortunately catching the NSRangeException that happens when removing
an observer from a 'switched' window is not possible, so the user is
left with:
Terminating app due to uncaught exception 'NSRangeException', reason:
Cannot remove an observer <Foo 0xabc> for the key path "bar"
from <QNSPanel 0xdef> because it is not registered as an observer.
Change-Id: Ib2adbb99f19303a054fb1eb65e959aecd32b1162
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
qtbase/src/gui/painting/qoutlinemapper.cpp: In member function ‘QT_FT_Outline* QOutlineMapper::convertPath(const QVectorPath&)’:
qtbase/src/gui/painting/qoutlinemapper.cpp:182:76: error: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type ‘class QPointF’ from an array of ‘const qreal’ {aka ‘const double’} [-Werror=class-memaccess]
memcpy(m_elements.data(), path.points(), count* sizeof(QPointF));
Change-Id: Ieca99f0262c57e58adbcf48ac923ae11bd428b00
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
qtbase/src/corelib/tools/qvector.h:782:16: error: ‘void* memmove(void*, const void*, size_t)’ writing to an object of type ‘class QRingChunk’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]
memmove(b + 1, b, (d->size - offset) * sizeof(T));
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../../include/QtCore/5.11.0/QtCore/private/qringbuffer_p.h:1,
Change-Id: I6583241223fe3fc76c0b792779993a34aa9485fe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Has been flaky in CI.
Task-number: QTBUG-66708
Task-number: QTBUG-66216
Change-Id: I69878574a98139681100c1424d5bbf46cc4a87b8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
The test's client processes are prepared for the server not being ready when
they try to connect and handle QLocalSocket::ServerNotFoundError by waiting and
trying again.
However, on Ubuntu 16.04 and 17.10 and possibly other systems, sometimes the
error returned by qt_safe_connect inside QLocalSocket is ECONNREFUSED instead of
ENOENT. This has caused flaky failures in CI, so wait and try again in the case
of QLocalSocket::ConnectionRefusedError also.
Task-number: QTBUG-66679
Task-number: QTBUG-66216
Change-Id: I61e3d5b052d84c5ba9d1746f2c71db37cedbf925
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Has been failing a lot lately
Task-number: QTBUG-66247
Change-Id: Id940a573eb299379cacceb836890cbe0b3c896b7
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Based on the information we got from Unity developers, we need
to check for window's frame geometry to be set, not just window's
position to be set. On various window managers, a window is
'ready' once the frame geometry is set. This fixes autotest
flakiness of tests that use qWaitForWindowActive.
Task-number: QTBUG-66216
Change-Id: Icb664e7b802b474919f3b058c00681574522ccbe
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Windows does not send a mouse release by itself, which can
leave Quick controls believing the mouse is still pressed.
Synthesize an event.
Task-number: QTBUG-66447
Change-Id: Ia865edddc0c77a1b42b9ad2c38323379e74b6704
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
On Debian 9, the sanitize library exports only dlopen symbol, but
it doesn't export the other ones.
We need to check all dl symbols that we use, otherwise "-ldl" will
not be added to the libs list.
Task-number: QTBUG-64864
Change-Id: I3e62b82985348c40b8b61302ba589d5564598e18
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The coordinate conversion was wrong. Use
QCocoaScreen::mapFromNative() instead.
Task-number: QTBUG-53184
Change-Id: I50f18d68ba5d7e1cb5046523a608bfa2e076d7ea
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
We don't need xkb state APIs to check for keys on first level.
Change-Id: I728e6bfe09bce127ad8eae78ecee7cefd620f52e
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
This will allow us to reuse these functions on systems that
do not rely on X11, but use libxkbcommon for handling keyboard
input.
Task-number: QTBUG-65503
Change-Id: I78034238771be96fbb38e8187801fefbee1a5fed
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This is a more correct fix for QTBUG-48795. The original fix
was unnecessarily using non-XKB code path for updating state
for all incoming key events. This would result in losing some
valuable bits from xkb state.
Task-number: QTBUG-48795
Change-Id: Ic4fb28b2d834272f1db2cbf5888cafb209707847
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
xkbcommon-keysyms.h is generated from X11 header files, so it
contains all the same values.
Removed all of #ifndef XK_* as those keysyms are present in
xkbcommon-keysyms.h (checked the header from 0.4.1, the minimal
required version). The same for XF86XK_* defines.
This will allow to reuse some of this code on platforms that
don't depend on X11, for details see QTBUG-65503.
Task-number: QTBUG-65503
Change-Id: I68083e11cea1f29d775a6ed46503a06b04b9a05c
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
- Use smart pointer for handling xkb state.
- Make it more clear (in the code and the comment) when a latin
keysym is used.
Change-Id: Iee8106c72177c22b1a8fe875027b1dda82196b36
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Now also digits from other alphabets e.g ۲ (arabic two) are mapped
to Qt::Key_* digit keys.
Re-factored logic:
- All known dead keys have direct mappings since
1d86e5f84a. Don't special treat them
in "unicode mapping" code path.
- Removed the ISO8859-1 legacy logic, which is leftover from Qt4
where keysym to Qt decoding was done from raw data. In Qt5 we always
get a utf8 string from xkb_state_key_get_utf8(). Furthermore,
ISO8859-1 and utf8 encode ASCII exactly the same way.
- Set Qt::KeypadModifier from key input handler methods. This logic
does not belong in keysymToQtKey().
Note:
KeyTbl[] and keysymToQtKey() have been duplicated in several places
in Qt. That stuff will be cleaned up as part of QTBUG-65503. This
change will make those cleanups easier.
Task-number: QTBUG-58865
Task-number: QTBUG-65503
Change-Id: Iaf10205a26804f7fc03eb8a16a0879f1bd7bf332
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
3edcd9420e added more robust support
for keyboard input on XKeyboard-less X servers. The various fallbacks
that we had did not work that well in practice. We can remove them now.
The xkb_keymap_new_from_names() function relies on reading XKB config
files from a file system. Since we don't use this function anymore, we
can also simplify xkb context creation (see XKB_CONTEXT_NO_DEFAULT_INCLUDES),
as we don't care about DFLT_XKB_CONFIG_ROOT (which we previously set
via -xkb-config-root for the bundled libxkbcommon).
This patch also changes the code to use smart pointers for managing
the global xkb context, keymap and state.
[ChangeLog][X11] The -xkb-config-root command line switch has been
removed as it it no longer needed when configuring with -qt-xkbcommon-x11.
Change-Id: I80eecf83adae90af5cd20df434c1fba0358a12fd
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Remove the Xlib dependency by extracting XConvertCase
from libxkbcommon sources (xkbcommon/src/keysym.c).
libxkbcommon >= 0.8.0 exposes case conversion APIs, but
we should prefer using the slightly adjusted version (see
the patch for more details).
This change also is necessary for follow-up cleanups.
Change-Id: Icf1716e0ad26f46a7aefb23722cfc57957754d5e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If _Thread_local is used on a block-scope declaration, it must be
combined with either static or extern to decide linkage.
Change-Id: I228b3520767197c6cdf5134ff5a666ab2aca33ea
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This change amends 305dd1b61f, which lost
1514b4e8 and brought src/corelib/json/qjsonarray.cpp back, which got
removed in c9c9adeef9. In
a6b697ca13, it was moved to
src/corelib/serialization/qjsonarray.cpp in 5.11.
Change-Id: Ic6134a78d75a9c245934cf70a67a54c80a3e7c85
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This change amends 305dd1b61f, which lost
40334303 and brought src/corelib/xml/qxmlstream_p.h back. In
a6b697ca13, it was moved to
src/corelib/serialization/qxmlstream_p.h in 5.11.
Change-Id: Ia1e9841b866ff49f7274b1b13fd224c0a20a017e
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>