Before running tests that depend on QWindow::requestActivate
Gets rid of several Wayland platform checks in tst_QWindow.
Change-Id: I7a5e029044a968dfcf87ecbb5105c01d52852d35
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
And make it easier to fix if platformName == wayland-egl etc.
Change-Id: Ia2d62ba003796e08f3e8a5bbfd0c3fd9d185e4e0
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Qt should be using its own API in the way it's meant to be.
If there's an issue with Qt's built-in styles it has to be fixed there.
Otherwise this causes problems with styles, such as KDE's Breeze,
which make use of both Selected and Active states for icons.
However, Qt's built-in styles do not have hover effects for tool bar
buttons and menu items, so there's somewhat of a conflict here which
was probably the reason for the workaround used.
Change-Id: Ieaed580f548caf181b1005b4e82e3f2adc1f9ce5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
If you enable both qt.qpa.input.touch and qt.qpa.cocoa.mouse you can
see the order and interleaving of the touch and scroll events.
Task-number: QBUG-66329
Change-Id: I8e1a63e2958b85f7964bb597e49cf8529cb3f32e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Mesa and NVidia have been supporting these extensions several years now.
It also means we can get rid of the dead unused code we had for advanced
compositions.
Change-Id: I6a2fcda13490abd977eb4cc3d8b34f186d05ca25
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Add a branch for QEvent::LocaleChange to the QAbstractSpinBox::event()
handler to call updateEdit(). This will update the edit in case the
locale's number features changed (decimal separator etc.).
Task-number: QTBUG-65315
Change-Id: I9015b3a5bbe8e7b80f7bafa13f0f431507bc4cf7
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Change-Id: I7d5f211e2441415134c5905b159b41dc3b2b231b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When QCocoaWindow::setWindowFlags is called, the window()'s flags have
not been updated, so re-computing the collection behavior based on those
would not be correct.
Change-Id: I5512da75104483eac7100880c164a9d08fd82984
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit adds support for DRM atomic to qtbase eglfs/KMS QPA when
libdrm and device supports it.
Compared To legacy DRM API, atomic API allows to update multiple planes
in one vsync. This is the first part of some work that should follow
and allow:
- DRM framebuffer upscaling for embedded devices that have weaker GPUs
- Sharing the drm atomic request if the KMSDevice so that applications
in userland can blend content on overlay in the same vsync loop.
One of the application for DRM atomic and Qt is typically videoplayer
integration at high resolutions (UHD) on embedded devices which cannot
use their GPU to render such videos, but are able to render it to a drm
overlay.
Change-Id: I047adf3e3d07a53440d52c2a7073c9ed054adf34
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Changed old signal/slot syntax to new version
Task-number: QTBUG-60635
Change-Id: I7cbe8851d321b7632a08c098b69a96cc346d5f83
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This is needed to be compatible with latest Qualcomm BSP releases.
This patch also makes it possible to select HW layer via
QT_OPENWFD_CLIENT_ID and QT_OPENWFD_PIPELINE_ID environment variables.
Change-Id: Ie795b21afc61a1de7c1d0b52cdb30a754e3f8266
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Timo Aarnipuro <timo.aarnipuro@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 00f693d3e5046999270c92731e34a3e7fcd01c6b)
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
By using qWaitForWindowExposed instead of qWaitForWindowActivated.
Task-number: QTBUG-66824
Change-Id: Idf604157070731d9c92ccf64d8349c8571960b7c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The test actually passes, so there's no need to skip it.
Task-number: QTBUG-66824
Change-Id: Id091776ff7ca7637fdcf0e0ced833982b5788d92
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The default value for a default constructed FindFlags QFlag is zero and
FindCaseSensitively is 0x2. Therefore the default behavior for find() is
case insensitive.
Change-Id: Id3419c3562fc6170fdb281098a22dd8205603847
Task-number: QTBUG-62660
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This adds subscription to additional config changes on Android to
avoid the application automatically restarting when the SIM card is
replaced or the logical density of the screen is changed (as a result
of the user changing it in settings).
These restarts are especially problematic when using Qt in a
home screen application due to the way they are launched.
[ChangeLog][Android] Avoid the system restarting application when
user replaces SIM card or changes the logical density of the screen.
Task-number: QTBUG-63735
Change-Id: Iba85fe6239b2d29b543b3c4e2f953efb9b54f713
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
To avoid needless detach()ing:
- don't make copy of tabArray unconditionally.
- use qAsConst to avoid detatch in for loop.
- For CoW types, prefer const methods.
Change-Id: I3273316bdd862fee4c66bad8291898a9ed913c60
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Has been flaky in CI.
Task-number: QTBUG-66815
Task-number: QTBUG-66216
Change-Id: I2c3eb42507eae618486aa402474b4b3f85ff310e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This follows on from a232251992 which
covered a similar instance of this. As with that change, we should not
abort the compilation, just ignore it.
Task-number: QTBUG-63772
Change-Id: Ide958080a90f43ed19edd8a320e7d45de1c96821
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
QTableView draws its gridlines at width/height of the cells. This
means that there is no gridline at x=0 and/or y=0. This is fine when
there is a header. But when the header is invisible, an additional
line at 0 must be drawn to have a boundary to the neighbor widget.
When a span is drawn, the clip rect has to be adjusted in this case
because x/y=0 belongs to the cell (and therefore would be clipped
out).
Also fix the drawing of the grid lines in RTL mode and with
ScrollPerPixel.
Task-number: QTBUG-22972
Change-Id: I1829770e3d5bf65421b590f7bb7354cbf222e3fb
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
When _q_sectionsChanged() is called from e.g. QSortFilterProxyModel
the LayoutChangeHint is set which can be used to avoid useless work
in this function.
Change-Id: I034db3fcc7a5f9ea7ebc0fa3ffd7429edb154eb7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Since pthread_cond_timedwait takes absolute time instead of relative
time like most POSIX API, there's a small gain in performance here: we
avoid an extra system call to get the current time.
Task-number: QTBUG-64266
Change-Id: I25d85d86649448d5b2b3fffd1451138568091f50
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The indentation of large code blocks in setModel() and clear() are not
correct. Needed for another change to avoid whitespace changeds in there.
Change-Id: I620c8c5e83e98747f5c17469738722cf976fb467
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Looks like this should be "super." instead of "super_"
Found by spotbugs.
Change-Id: I83d096eee332361d62e783581bfa15017536081d
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
When first starting an Android app we have invocation order issue, to
load the platform plugin we create the default QLocale (needed by the
resource locator code to see if :/qt/etc/qt.conf exists) so when the
android platform plugin loads and creates its own QSystemLocale, the
QLocale defaultLocalePrivate is already created and pointing to
globalLocaleData which means that systemData won't be called and thus
the code that triggers the call to QLocalePrivate::updateSystemPrivate
won't be called when calling QLocale().
I thought of two ways of fixing this, one was calling
QLocalePrivate::updateSystemPrivatea() from the QAndroidSystemLocale
constructor, but giving the responsibility to not break things to the
plugin seems a little fragile, so making the check on QLocale()
seems better.
Without this patch an Android app doing
QApplication app(argc, argv);
qDebug() << QLocale().name();
qDebug() << QLocale().name();
qDebug() << QLocale::system().name();
qDebug() << QLocale().name();
would print
""
""
"ca_ES"
"ca_ES"
now it correctly prints "ca_ES" the four times.
Task-number: QTBUG-41385
Change-Id: I2cf419f59aa008fa3aca11295fe7d42c40bcc32e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Silence debug output by setting QT_LOGGING_RULES
to turn off all debug output.
Task-number: QTQAINFRA-1631
Change-Id: I5c2366b4fe4bac341dcfd92f68b6da8071c5b089
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
When reading an HTML file with <H1> for example, we still set the font
size as before (that's how it always was done),
but now it remembers that it came from an H1 tag, so it writes
<h1 ...><span font-size:xx-large ...> ... rather than
<p ...><span ...> ... This will help with the upcoming Markdown
format, where heading level is saved but the font is not.
Now the style combobox in examples/widgets/richtext/textedit can set
list item type, heading type or "standard" formatting, and also shows the
current formatting of the line that has the cursor. It was always a
shortcoming in this example that it only allowed setting the current line's
block format but had no feedback to show the current format.
Change-Id: I0a7849b74f23fea84d3375c487c3a6b9f43240c1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Evaluating testlib's XML output in COIN would fail with:
"XML syntax error on line 7520: invalid UTF-8"
for the toLatin1() tests due to some Latin1/UTF8 mixup.
Add a helper function to convert the data to plain ASCII.
Task-number: QTQAINFRA-1797
Change-Id: I1c64878d4c2a67b8c2689905b5ffe6707b5963c1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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>