Enabled via configure --ccache, or CONFIG += ccache in 3rd party
projects.
Ensures that we use the right sloppiness and other ccache options
during compilation.
Task-number: QTBUG-31034
Change-Id: I696b3d3f0398873a29b93d1bc2b4d4e06ef23dc9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The backing store was assigned the sRGB color profile
as an unintended side effect of the QImage -> CGImage
conversion function refactoring in ac899f6d. This
caused Core Graphics to add a color convert step, which
in some cases caused performance issues.
Restore fast, previous behavior by assigning the target
display color profile to the backing store image.
Color correctness is still a goal, but we’ll add API
for it and make it opt-in.
Task-number: QTBUG-61384
Change-Id: Ia36d29404c64d8030a100f6a71816d84e484308b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The backing store was assigned the sRGB color profile
as an unintended side effect of the QImage -> CGImage
conversion function refactoring in ac899f6d. This
caused Core Graphics to add a color convert step, which
in some cases caused performance issues.
Restore fast, previous behavior by assigning the target
display color profile to the backing store image.
Color correctness is still a goal, but we’ll add API
for it and make it opt-in.
Task-number: QTBUG-61384
Change-Id: I107f06a881a34fa711b386265d8dc2edfb246624
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Adds QWindowsDropDataObject as a QWindowsOleDataObject subclass
specialized for handling Drag & Drop, which only allows "text/uri-list"
data to be exported as CF_HDROP, to allow files dragged from
Qt applications and dropped into other applications to be recognized as
attachments or opened. Otherwise, files would be imported as URLs and
inserted as local hyperlinks.
[ChangeLog][Important Behavior Changes][Windows] On Windows, a drag
& drop operation of local files URIs, like QListView items backed by a
QFileSystemModel, will result in the attachment or opening of the files
by the target application, instead of the creation of hyperlinks.
Task-number: QTBUG-62662
Change-Id: I51efa4a56574b5e5fb3ee736ede14b5da24caac4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Follow up of fc37e03699:
while the file is #included from pcre2_compile.c, it's never
actually compiled (seems to be about a debugging aid for developing
PCRE2). So it's safe to get rid of it.
Change-Id: I0affaad730e8c5678d3431e47d5fee0dbedc0e78
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Both iOS and tvOS need to have JIT disabled, so use the uikit qmake
scope for that. This was already done for PCRE 1, but the corresponding
change was lost for PCRE 2 (probably due to a bad merge).
Change-Id: Iac7997880c13b34ced46c63b748980c6fb700a0f
Task-number: QTBUG-62993
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
AppKit will clear the needsDisplay state of a view when finishing the
display cycle, so if the client requested an update when delivering
the expose event, the update request would not be delivered unless
the view was otherwise exposed in some way at a later point.
Task-number: QTBUG-62964
Task-number: QTBUG-62963
Change-Id: I5ac9bf2f19af775294d093c8b7a414af22efee92
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This patch does not attempt to add the necessary functionality
to support other tablet buttons, it simply replaces deprecated
version of QWindowSystemInterface::handleTabletEvent(), by keeping
the previous logic.
Task-number: QTBUG-62886
Change-Id: I23597077774d482492136fda2e998700f8b27e9c
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Logic that utilizes these event handlers was added by
f610814b05 and few months
later broken by 2b20ed5af4.
The original code used an event mask to select press/release/
motion events when creating window with XCreateWindow.
The XCB replacement (xcb_create_window) changed event mask to 0,
which means that these event handlers have been unused for
about ~4 years and can be safely removed. The eglfs_x11
integration receives mouse input directly from libinput/evedev.
Change-Id: Iac1521365445b8423898a16c3e609deb0806ce5e
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The QWindow passed to eventFilter is static so it might be in a
different screen when we call getNativeMousePos, resulting in negative
position and all sorts of glitches.
Change-Id: Ibc848c6d85d8b6932ee379aa77851094212a0db2
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
When the focus object inside a window changes and we are
currently composing text, we have to cancel composition to avoid
getting into an inconsistent state. This is what already happens
if you switch to a different top level window.
Note: Because we limit the user's ability to change focus inside
a window when composing text, this would only happen under
certain circumstances, such as creating a new MDI window with
an editor while still composing text in a previous one.
[ChangeLog][macOS] Switching focus objects inside a top level window
while composing text using dead keys or input method events would
leave the application in an inconsistent state. The composition
now automatically cancels when the focus object changes.
Task-number: QTBUG-59222
Change-Id: I06792a7db1441dcc5c87e4bf0861b422a25f7f7c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
[ChangeLog][QtCore][QFileInfo] Relative symbolic links on Windows are
now resolved to their absolute path by symLinkTarget().
Task-number: QTBUG-62802
Change-Id: I5826517130bd389aef994bf3f4b6d99b2a91b409
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
pcre2_printint.c does not need to be compliled as a standalone source
file, as it's #included from pcre2_compile.c. Apparently qmake does not
detect this in all cases, and sometimes tries to compile pcre2_printint.c,
resulting in compile errors.
Change-Id: If494e5853b52ff1387bfb24f3847b73edcc837b7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Comparing pointers not belonging to the same array requires using
std::less.
Change-Id: I2725aa0899f6b9fece73dadd9ee5c10242d50ae1
Reviewed-by: David Faure <david.faure@kdab.com>
They aren't used in the API, so let's stop wasting library size.
Change-Id: I6e9274c1e7444ad48c81fffd14db247ecf825a57
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
If one wants to add them on demand, threads may have started, so these
functions should be thread-safe. That includes the calling of the
registered functions: some other thread could be adding post routines
too. Of course, if you're racing, it's your own fault, but we need to
support the routines registered with qAddPostRoutine adding more post
routines.
[ChangeLog][QtCore] qAddPostRoutine() and qRemovePostRoutine() are now
thread-safe.
Task-number: QTBUG-62915
Change-Id: I38341f8155354cc4a776fffd14dffa68bde8345d
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Since MSVC doesn't have <chrono> (according to QT_HAS_INCLUDE), the QSKIP
in the test was printed for every line in the table. Instead, add the
skip in the _data() function.
Change-Id: I6e9274c1e7444ad48c81fffd14dbcee5e5a322aa
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
There's no need for us to walk our own ancestor chain to figure out which
cursor to set. AppKit will automatically call cursorUpdate: on the view
that would be the hitTest target of the current mouse position, and by
falling back to super when no cursor is set for the current view, we
automatically get the behavior that effectiveWindowCursor tried to solve.
In addition, it solves the case of applyEffectiveWindowCursor applying
the arrowCursor when no cursor was set, which would mean that if any
native parent view of our view _did_ have a cursor set, we would not
fall back to the native view's cursor, but instead override it with
the arrow cursor. Following the responder chain gives the correct
behavior in this case.
Unfortunately, due to rdar://34183708, if a subview of one of our
views uses the legacy cursorRect approach to cursor management, the
cursor will not be reset back to our cursor via cursorUpdate: when
leaving the child and entering the parent view (our view). Moving
our implementation over to the legacy API would solve this problem,
but just propagate it to native parent views of our views, which
could potentially use NSTrackingAreas, and would not have _their_
cursors re-set.
Change-Id: Id20cc03136f0b1d4b9120750fe63ddc455363aaf
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Windows uses deprecated API to obtain the default font which
has been observed to return bogus sizes in multi monitor setups.
Apply a limit in this case and add fixme comment for Qt 6.
Task-number: QTBUG-49374
Task-number: QTBUG-58610
Change-Id: I6e805ec792a3f425961a48ef4c4329c3cdf302b6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Instead of masking window blitting via a CGImage mask, we use the window's
mask directly to intersect the region that we blit during flushing of the
QCocoaBackingStore. This approach also enables masking of child windows.
We now also support setting a mask for layer-backed views, by setting a
CAShapeLayer as the layer's mask.
The window shadow invalidation has been moved out of QNSView, as the view
should not be involved in that process. For layer-backed views, the shadow
is not invalidated as expected after the initial mask has been set, but
this bug has been left as a fix for a later stage as it requires more
research.
Change-Id: Ie0127d8df49d95b2d6144816b19559f3d3c95d13
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Calling [self cursorUpdate:] doesn't make much sense, and was probably
an oversight. The event is also delivered straight to the view, not to
the owner of the tracking area (as the documentation says it should),
but we keep this method implemented just in case.
Change-Id: I176a2aa782da316d1fe11ce15a89195595d80618
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This is preferable to the timer-based default implementation of
QPlatformWindow, as it gives AppKit more control of when to schedule
the update, and makes sure the update is scheduled along with other
views in the normal display-cycle, reducing the number of push flushes
we do. QtWidgets still need to plumb the update() method to updateRequest
for that to have any real effect though.
In the future we may consider scheduling the update via a display link,
if the window surface is set up for GL, for example.
Ideally we'd also have a platform hook for the repaint() method, so that
we could funnel it through display and get synchronous painting with
AppKit still taking care of drawing and compositing child views.
Change-Id: I136a9afa087b922aad69086548c2aa190ce75b6b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
- Add view to contentView, to allow checking parent view interaction
- Render via requestUpdate instead of manual timer
- Add two windows to check subview interaction
Change-Id: Ib028e62f585d45e42c0429e69ea6f45c8a90fe54
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Conflicts:
examples/examples.pro
qmake/library/qmakebuiltins.cpp
src/corelib/global/qglobal.cpp
Re-apply b525ec2 to qrandom.cpp(code movement in 030782e)
src/corelib/global/qnamespace.qdoc
src/corelib/global/qrandom.cpp
src/gui/kernel/qwindow.cpp
Re-apply a3d59c7 to QWindowPrivate::setVisible() (code movement in d7a9e08)
src/network/ssl/qsslkey_openssl.cpp
src/plugins/platforms/android/androidjniinput.cpp
src/plugins/platforms/xcb/qxcbconnection.cpp
src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
src/widgets/widgets/qmenu.cpp
tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
Change-Id: If7ab427804408877a93cbe02079fca58e568bfd3
... by using the new QIODevice::skip() function.
Change-Id: I943c4feb896d677f3150da542950595d7f485e75
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Instead of imperatively trying to keep the logic consistent in many
different call sites.
Task-number: QTBUG-61909
Change-Id: I8d647690c47656f34673555a8a8aa3ec6ffc73d1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The former takes into account dynamically generated key-value-observing
(KVO) subclasses, of the form NSKVONotifying_*, which would result in
class_getSuperclass returning QNSWindow and recursing back to the original
call site of qt_objcDynamicSuper.
Change-Id: I4b8b1aa64d2834d9d1baa395c877319e99084bc8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This reverts commit 8561281768.
This change needs to be reverted because Windows 10 Creator's
Update doesn't fail on this test anymore during CI runs.
Reason for this is unknown.
Change-Id: Ice250ecedb14ac96fb3693b2d9884ef452a91cc2
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
Compile examples/opengl only in case opengl support is available.
Task-number: QTBUG-62372
Change-Id: I742a1eb7b7639a5a722c4d5e9b4ee070b629b02e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
It is (end - start) that represent the number of pixels being worked on
and needs to be smaller than the buffer size.
Change-Id: I75a22bc2656ac1c7d231278c3a1931758090f8ce
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>