The current state of (emulated) mouse buttons was being incorrectly
reported for touchpad events under some conditions. In the handling
of pointer messages, GetAsyncKeyState() was being used to retrieve the
mouse button state. However, it does not seem to work always with all
touchpads. Furthermore, its use is not necessary, since the button
state information comes as a set of flags with the pointer message
itself. This change makes the handler use these flags instead.
Fixes: QTBUG-71470
Change-Id: Ie2e35bd80778ef74db672604a0f2af659785efbf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
On Linux the correspondence between cursor functions and names
of cursors has never been standardized. Projects have either
assembled their own cursor function-to-name lookup table or
borrowed the table from other projects. The origins of our table
is described in QTBUG-71423.
On Ubuntu the default theme is called Adwaita. Before
bd72950fbe, we would not find a
cursor for 'openhand' and would fall-back to QXcbCursor::
createNonStandardCursor(). Which was sub-optimal, because the
cursors created by the fall-back path don't look like the
themed ones. But the situation was worse after bd72950fb (hence
the regression) - the 'openhand' fall-back name 'fleur' is a
symbolic link to 'grabbing', so we would get into a situation
where Qt::OpenHandCursor displays the same as Qt::ClosedHandCursor.
This patch adds a correct fall-back name for 'openhand' on Adwaita,
which is 'grab'. 'grab' actually is a symbolic link to 'hand1', but
'hand1' with other theams is a pointing hand cursor, that is why we
use the symbolic link's name in this case.
The lookup table still appears to be incomplete when comparing e.g
with KWin. Eventually we need to revise the table and put in a common
place so it can be shared between X11 and Wayland, but is out-of-scope
for this patch (see QTBUG-71423).
Fixes: QTBUG-71296
Task-number: QTBUG-71423
Change-Id: I247ed4b346c2cd3fe1c7fd0440d3763e0033346b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
The engine used to send a UDP datagram to the local address to check
the proxy setup, but the check fails in case of the proxy hosted in
WAN and the local address hidden behind a NAT. In other words the
check fails because a public proxy hosted somewhere in internet has
no access to local addresses such as 192.168.1.2.
Remove the check to fix the issue; we still have other means to
detect network errors.
Change-Id: Ib6df263c87ebd7d6e88a0b5e024e78a559995234
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
When a popup is active, we set the receiver of mouse events to
be the active popup widget. But when we send a mouse event to
the popup, the receiver might start a new QEventLoop (e.g by
executing a new dialog). And in the meantime, the popup will
be destroyed. This will cause a crash in the line after the
event delivery (where we sat "qt_last_mouse_receiver = receiver"),
since at that point, "receiver" would be a dangling pointer.
This patch will use a QPointer instead of a raw pointer to
store "receiver", to ensure that it's set to null for
such cases.
Fixes: QTBUG-71062
Change-Id: Ie017cfa97370513ecfdd62c056fcb0e6c991f9f6
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Also clean up QTextCodec usage in qmake build and some includes
of qtextcodec.h.
Change-Id: I0475b82690024054add4e85a8724c8ea3adcf62a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
By accident, when we erroneously tried testing TlsV1_3 on macOS with
SecureTransport (which does not support TLS 1.3) we hit this quite
subtle problem: it can happen that a server-side socket is never
created but a client (after TCP connection was established) fails
in TLS initialization and ... stops the loop preventing
SslServer::incomingConnection() from creating its socket. Then we
dereference nullptr.
Task-number: QTBUG-71638
Change-Id: I8dc5a4c53022a25aafe2c80a6931087517a48441
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Add an option that moves windows back to the top left corner,
which is useful when some window (of some application saving its
position) is lost after changing the monitor setup.
Change-Id: If358b1ed7f481f2bb98e375e88f11049f97a4a91
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
1. Remove the conditional inclusion of DTLS versions, they made difficult
and unnecessary ugly adding new protocols (something like TlsV1_2OrLater + 4).
2. OpenSSL 1.1.1 first introduced TLS 1.3 support. OpenSSL 1.1 back-end is
compatible with OpenSSL 1.1.1, but would fail to extract/report protocol
versions and set versions like 'TLS 1.3 only' or 'TLS 1.3 or better' on a
new context. Given 1.1.1 is deployed/adapted fast by different distros,
and 5.12 is LTS, we fix this issue by introducing QSsl::Tls1_3 and
QSsl::Tls1_3OrLater.
SecureTransport, WinRT and OpenSSL below 1.1.1 will report an error in case
the application requests this protocol (SecureTransport in future will
probably enable TLS 1.3).
Saying all that, TLS 1.3 support is experimental in QSslSocket.
Done-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Done-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change-Id: I4a97cc789b62763763cf41c44157ef0a9fd6cbec
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
For some reason some Visuals with semi-transparency incorrectly reports
a depth of 24.
Change-Id: If41ba1032fbe7d248f53f735cb84e61038b3300a
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
For this we can use whatever the current NSColor.gridColor contains.
While this is mostly needed by the 'Dark' appearance, it also affects
the 'Light' theme, since the color QCommonStyle returns is different.
Let's use whatever Apple suggests.
Task-number: QTBUG-71048
Change-Id: I084414bad546755e9e67792484fe4601826ed0fa
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
[ChangeLog][Documentation] Fixed the icons for the "file save" action
that were inaccurate representations of a 3.5-inch floppy disk (the cut
edge was on the wrong side). Now all floppy representations are
physically accurate.
Change-Id: Ia3b27ae12a1a4fefa3b7fffd155bb86fee5271c3
Fixes: QTBUG-71012
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The issue we had has been fixed for years, but was unfortunately in
libxcb which we can't check at runtime. Instead assume very recent
Mesa drivers works.
Change-Id: I5fdd726b480b77edbedc0f369ae82ab4acbb77c9
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Document the version in the process; and make the wordings of
copyright notices match those in DEJAVU-LICENSE.
Task-number: QTBUG-70008
Change-Id: I1c965e5d7afb18dc4dbdffed908512c5771ab717
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The existing copyright notice gave me a name; github found me a file;
but it doesn't match what we had before. Made some guesses at which
parts of the change relative to upstream to keep, documented the diff
as a patch and recorded details in qt_attribution.json
Task-number: QTBUG-70008
Change-Id: I423724435eaeeda7237f8b3df8691b436fed8652
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The implementation calls GetCurrentThreadId, not GetCurrentThread, so
the return value is not the pseudo-handle.
Task-number: QTBUG-67686
Change-Id: Ifde0cf603dcea01bc1c454a8bebe1e5c0f22617f
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Previously no documentation was generated for the global qScopeGuard()
function. Create a class documentation page and add the the function
as a related non-member using \relates.
Task-number: QTBUG-71502
Change-Id: Ida5d7044f4de962360dfee9321feb49005d4b299
Reviewed-by: Martin Smith <martin.smith@qt.io>
\variable must not include the variable type, QDoc will resolve that.
This commit resolves four documentation warnings.
Task-number: QTBUG-71502
Change-Id: I5e88cf66d3c3bb8f18495d5477e1271ac2cd9e74
Reviewed-by: Martin Smith <martin.smith@qt.io>
And fix a typo in Qt::ScrollEnd.
Task-number: QTBUG-71502
Change-Id: I3efdbd12415814e066edd1b2f102a792812d36d5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Commit 0a7aebad inadvertently removed two ANGLE-related files for
license information. This caused the licensing documentation to
fail to generate for those components.
Task-number: QTBUG-71502
Change-Id: I33ee673267c43474304d577e78fc1a0c3bd8691f
Reviewed-by: Martin Smith <martin.smith@qt.io>
These include typos, marking functions as \internal, documenting
trivial things, and fixing the function signatures passed to the
\fn command.
Task-number: QTBUG-71502
Change-Id: I24a9e1f7e1cdb39e5c31b99202bdd593c6b789ff
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
These are minor typos or documentation warnings that snuck in with
new features.
Task-number: QTBUG-71502
Change-Id: I03669cfecc3c3d80168ff7b1ca8bca7571e06d25
Reviewed-by: Martin Smith <martin.smith@qt.io>
When the environment variable QT_QPA_FB_HIDECURSOR is set to 0,
the two class members mCursorImage and mDeviceListener are nullptr
but this was not checked in the functions afterwards.
Task-number: QTBUG-64844
Change-Id: Ic0fd6a09851777643e59bedf2c006a6bb9a36801
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
AR and NM have different tools when LTCG is used,
override those also when cross compiling.
Fixes: QTBUG-71595
Change-Id: I5347bd1874688dd89395c50ff6dd08fb1c0ebab1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This allows a user to efficiently watch for services with a common
domain prefix.
This is exposed in the API via a wildcard character in the service name.
For example creating a watcher on "org.mpris*" will match
"org.mpris.foo" "org.mpris.bar" and "org.mpris" itself. It will not
match org.mprisasdf.
Internally the argument match rules have been expanded from a single
QStringList to a struct containing args and arg0namespace. This was done
so that we can easily use argpath in match rules in the future.
Change-Id: I55882ab603cc6ba478e8c0ea9a6800f6e483a50c
Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: David Faure <david.faure@kdab.com>
This avoids memory allocation and data copying in e.g.
QObject::property().
Detected by heaptrack's "Temporary allocations" counter in an
application using the breeze widget style (many animations).
Change-Id: Iabdb58a3e504cb121cce906ef707b0722de89df6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
No need to make a QStyleOptionButton copy, we can just use the pointer
we already have
Change-Id: I3ef5f59eb4fe25adf675e67ebf548f4358456379
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
It expands to the same thing in all three branches.
Change-Id: I343f2beed55440a7ac0bfffd15636a8bfd8fd21c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Implemented a new proxy model to transpose the source model.
Rows will become columns and vice-versa.
Both flat and tree models supported.
[ChangeLog][QtCore] New class QTransposeProxyModel to
swap rows and columns of the source model.
Change-Id: I902963c6b81aa0f63b5ad2bddca538f28b565084
Reviewed-by: David Faure <david.faure@kdab.com>
Replace BackgroundColorRole/TextColorRole with
BackgroundRole/ForegroundRole and explicit deprecate them for 5.13
Change-Id: I6b0d99844a32d2f5fdfd1878317a7b7422b800d3
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Replace all occurrences of QApplication::set/resetOverrideCursor with
the QGuiApplication::set/resetOverrideCursor since it's a static
function of QGuiApplication.
Change-Id: Ic898ab50a7ad4ed2bc9c6acb26cf4a979c2f82af
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
QAbstractOpenGLFunctions must not be copied but the copy and assignment
operators were not marked as deleted.
Add Q_DISABLE_COPY to prevent an accidentally copy.
Fixes: QTBUG-71422
Change-Id: I5fa508bc76a4142a4404d3529720e717b7f7fd41
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Niels Dekker
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The three public functions heightForWidth/minimumSizeHint/sizeHint were
accidentally marked as protected in QCommandLinkButton.
This patch makes sure it get fixed with Qt6.
Fixes: QTBUG-68722
Change-Id: I577e48cbe9274c8506a555dae1ec81044a889d6e
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This part was accidently left disabling after testing the
fallback still worked.
Change-Id: Ic2df939753641a9771e68bc8857c570d356cff44
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This update eliminates ALL parsing errors when clang parses the
Qt headers to build the precompiled header qdoc needs. These errors
are often cases where an old use of Q_QDOC no longer works because
clang sees the enclosed fake declarations as erroneous.
In a few cases, clang reported errors because two dummy function
declartations under the Q_CLANG_QDOC guard were indistinguishable,
so one of them was removed, and the documentation was patched
accordingly.
Using the macro Q_DECLARE_INTERFACE(...) causes clang to report errors
because the class parametewr is abstract. These uses of the macro are
not needed, so they are removed with #ifndef Q_CLANG_QDOC.
Some declarations of default GL types that had been provided for qdoc
were no longer needed, so they are removed.
Now there are some member function signatures in QDBusPendingReply
and QDBusPendingCall that have very long template clauses and qualifiers
in their signatures. These unwieldy signatures will be unnecessary in the
documentation and will look bad there, but for now they are correct. The
ultimate solution will be to add a metacommand to qdoc, something like
\simplify-signature to tell qdoc to generate the documentation for these
member functions without the long template caluses and qualifiers.
Change-Id: I012cf17a544fbba2ebc71002f31bdc865119bb8e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Martin Smith <martin.smith@qt.io>
Configuration 'compile' is obsolete and has been replaced with
'implementation' and 'api'.
It will be removed at the end of 2018. For more information
see: http://d.android.com/r/tools/update-dependency-configurations.html
Task-number: QTBUG-71570
Change-Id: I6f498d8cb3ff01ad641aee697496e3dc56059a72
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Opt out of switching between the normal and OpenGL based flush paths.
Once a QOpenGLWidget or QQuickWidget becomes visible in a window, the
window contents will be composed using OpenGL from that point on, even
if said widgets become invisible afterwards. Now that Qt Creator does
not rely on QQuickWidget the issue is less burning anyways.
Task-number: QTBUG-68329
Change-Id: I177e6e6094ee06ea26d8d0343bd3d84aadfa5913
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>