Having those characters in QMAKE_EXTRA_COMPILERS broke the generated
VS project file. They must be replaced by XML entities.
Fixes: QTBUG-1935
Change-Id: Iff1edbeabec4cedef777071682412970b7769f19
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Calling [NSWindow orderBack] will make the window visible
again, and will e.g. bring back closed menus on application
modality changes.
Fixes: QTBUG-77281
Change-Id: I2f89b852ea9f8ab34c709cec96d93fe305984fb9
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 3729695cc9)
RC_FILE is not an internal variable that "rarely needs to be
modified". Mention that it's about Windows resources and link to the
corresponding section.
RES_FILE: Add link to RC_FILE and the more general section. Also
rephrase "compiled Windows resource file" to "Windows resource
compiler's output file" which is more precise.
Fixes: QTBUG-8709
Change-Id: I19c61e6a9505d45fc13fefbcd0ba9441191aa42e
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Kavindra Palaraja <kpalaraja@luxoft.com>
The current explanation refers to itself rather than Format_RGBA64.
This patch fixes that.
Change-Id: Idc4c44ca71813ea2bdddba0c936f772cb7091ca8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
The sendMouseMove() function calls QTest::mouseMove(),
which again calls QCursor::setPos() to move the cursor.
It then creates and sends a MouseMove event, using
the constructor which picks up the global position
by calling QCursor::pos().
On macOS 10.14, QCursor::setPos() may silently fail
if the user does not grant the application permission
to move the cursor (via a dialog). As result of this
the mouse move event gets an incorrect global position.
Provide the global position directly when creating
the event to make sure it gets the correct value.
Task-number: QTBUG-75786
Change-Id: I3e8df450fea802783a3d1dbe471753f502b42de3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
We were loading “Background.png” from the KeyboardSetupAssistant
app bundle. As of macOS 10.14 that image is no longer
there.
Adjust auto tests and document the behavior.
Change-Id: Icb4dd73b3fa88927e87bb86db2bc9f7b4a8094f7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Calling [NSWindow orderBack] will make the window visible
again, and will e.g. bring back closed menus on application
modality changes.
Fixes: QTBUG-77281
Change-Id: I2f89b852ea9f8ab34c709cec96d93fe305984fb9
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Commit b6ded193 added an unconditional dereference
of the platformScreen pointer, for calls where nativePostion
is non-nullptr.
Change-Id: I4a6fbbd0337f91d4fcb76c17b4dc60e1b9ad10ed
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Not tested because we're not promising to fix them all. Just those two
that were reported.
Fixes: QTBUG-77391
Change-Id: Iec9c051acd73484c8d94fffd15b91f5e6348635d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Because 256 MB * 8 = 2 Gbit, but length*8 is a signed integer overflow,
hence UB.
Can't really autotest this. Not all systems where we're going to test
can allocate 256 MB of RAM.
[ChangeLog][QtCore][QCryptographicHash] Fixed a bug that caused the
SHA-3 and Keccak algorithms to crash if passed 256 MB of data or more.
Fixes: QTBUG-77362
Change-Id: Iec9c051acd73484c8d94fffd15b91f4b1450f5d7
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The conversion from int to uint is deliberate here, so let's cast and
avoid a warning for users compiling with warnings enabled.
Change-Id: I7136d6161ace735be49f8d987338f6d401a5c78a
Fixes: QTBUG-77245
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
clang-cl will never support C++ standards newer than
C++14 without these flags.
I didn't add them to msvc-based-version.conf because
on Windows, only clang-cl use the same flags with MSVC,
both ICC and MinGW have their own flags. So they are
clang-cl specific flags.
Change-Id: Ia44a5ea4237c77ea5e897fffded32cbc008a4729
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When I initially added it, it was ony for QCborValue, but I never added
the tests. Turns out there were two bugs:
[ChangeLog][QtCore][QBitArray] Fixed two bugs that caused QBitArrays
created using fromBits() not to compare equal to the equivalent
QBitArray created using other methods if the size was zero or not a
multiple of 4. If the size modulus 8 was 5, 6, or 7, the data was
actually incorrect.
Fixes: QTBUG-77285
Change-Id: Ife213d861bb14c1787e1fffd15b70573d162042c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
If the host architecture is different from -platform (canadian cross
build with -external-hostbindir) then we cannot use QMAKE_HOST.os to
deduce the executable extension for that platform, because this value
comes from the qmake binary that was pointed to by
-external-hostbindir.
Move the target name deduction mechanism to the actual configure test
.pro files to make sure the right scopes are available, and write the
deduced target name to a text file. That text file is read by
qtConfTest_architecture to get the right binary to analyze.
Fixes: QTBUG-77286
Change-Id: I68b844dd51dbfda6432a4b0dca6331899c82255f
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Look it up when needed instead. Also, simplify our
ownership logic - do not retain/autorelease that
is already owned by a menu (via its itemArray).
Fixes: QTBUG-76523
Change-Id: I60a2ed0d192396baf99eec7b37fa5cc10e5db626
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Simply return a Glyph pointer and not a QImage to avoid allocating and
deleting lots of d pointers for QImage when drawing text. Saves one
new/delete pair per glyph drawn and speeds up text drawing by 10% for
relatively large glyphs (probably more for smaller ones).
The qtext::paintLayoutToPixmap() benchmark shows a 16% improvement
in performance with this change.
Renamed the method to glyphData().
Change-Id: I7a353de521e4f4321c770fb1ac6043d33f6f332c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This enables building against the latest SDK, while still opting out
of features that this SDK normally enables, by lowering the SDK version
set in the BUILD_VERSION/VERSION_MIN_MACOSX load command.
Change-Id: Id5f13524740bfbf5eda10a5d0c2e3fda04bf3f52
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This fixes rendering artifacts for the specific case of the first
unselected vertical (west) tab button in a tab bar. The popup button
gets drawn at the beginning of the tab bar instead of translated to the
actual location of the tab.
Fixes: QTBUG-76385
Change-Id: I17112c56eabacf34e470314d4cc6b263ba632ec1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
We were missing attribution for the AGLFN tables.
Task-number: QTBUG-70968
Change-Id: Ib84cbd25c9f7c49611761c9eba16624de5b77dd2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
When calling QTextDocument::clearUndoRedoStacks() with UndoStack,
there were two bugs: The first was that we were retrieving
the item at "undoState" and deleting this. This is actually the
upper limit of the for loop. If the stack does not contain any
redos, then it would be == undoStack.size() and we would assert.
If there were redos, then we would delete the item at undoState
multiple times (actually undoState times).
In addition, when the loop exited, we first removed the dangling
pointers using remove() and then there was a weird resize() to
the new size minus the old undoState.
This would either assert because we tried to resize to a negative
number, or it would arbitrarily remove items from the stack.
[ChangeLog][QtGui][Text] Fixed a crash bug in
QTextDocument::clearUndoRedoStacks(QTextDocument::UndoStack).
Task-number: QTBUG-69546
Change-Id: I8a93e828ec27970763a2756071fa0b01678d2dcd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
The platform menu tags in Qt are actually the pointers, so they are
64-bit values when the build is 64 bit. Since menu IDs in Android
are 32-bit ints, we cannot cast back and forth like we do. To fix
this, we add a separate hash of menu IDs to allow mapping between
Java and C++. For easier book-keeping, we add the hashes to the
menu bar and menu classes, so that we can easily recycle old menu
IDs when they are no longer in use.
Note that overriding the tag on the menus by calling setTag() will
not work, since Qt Widgets will later override it again by setting
it back to the menu's pointer.
[ChangeLog][Android] Fixed an issue where menus would not work on
64 bit builds.
Task-number: QTBUG-76036
Change-Id: Icaa1d235d4166331669139251656ea0159e85195
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
some assumptions were incorrect: our test server immediately sends
its SETTINGS frame, as a result we have to reply with client preface +
SETTINGS(ACK). So QVERIFY(!prefaceOK) was wrong from the beginning and
was only passing by pure luck.
Change-Id: Ie43f0d4ac41deb0e5339badaae6149a9b2f9d9b3
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Also sanitize the initial WebAssembly hack. Both eglfs and wasm lack the concept
of true raster windows. A QWindow with RasterSurface is rendered with OpenGL
no matter what. The two platforms took two different approaches to work around
the rest of the machinery:
- wasm disabled the QOpenGLContext warning for non-OpenGL QWindows,
- eglfs forced the QWindow surfaceType to OpenGLSurface whenever it was
originally set to RasterSurface.
Now, the latter breaks since c4e9eabc30, leaving
all raster window applications failing on eglfs, because flush in the backingstore
is now checking the surface type and disallows OpenGLSurface windows. (just like
how QOpenGLContext disallows RasterSurface windows)
To solve all this correctly, introduce a new platform capability,
OpenGLOnRasterSurface, and remove the special handling in the platform plugins.
Change-Id: I7785dfb1c955577bbdccdc14ebaaac5babdec57c
Fixes: QTBUG-77100
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
QWidget does not handle QWindow and QPlatformWindow being destroyed
behind its back, and the QWidget state for internalWinId and the
Qt::WA_WState_Created attribute can easily get out of sync with
reality.
To avoid QWidgetBackingStore mistakenly thinking that a widget does
not have a platform window it can operate on we use the QWindow and
QPlatformWindow handles directly, instead of relying on the winId.
This is a stop gap until we can teach QWidget to deal with dynamic
changes to its underlying window handles.
Change-Id: Ib09bea2ad62c42e9667a20ca6b5faf0f957288da
Fixes: QTBUG-74559
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The array of QAtomicPointer<QMutex> can be initialized using relaxed
stores of nullptr, since nullptr is the whole data. But once we store
an actual QMutex pointer in the array, we need to publish the indirect
data thus created. We did this, with testAndSetRelease(); what was
missing was a corresponding acquire fence on load, without which there
is no happens-before relationship between the writes performed by the
QMutex ctor and the reads performed by a subsequent mutex.lock(), say,
on the same data.
Fix by adding acquire fences to all loads. That includes the dtor,
since mutexes may have been created in different threads, and never
been imported into this_thread before the dtor is running.
As a drive-by, return a new'ed QMutex that was successfully installed
directly to the caller, without again going through a load-acquire.
Fixes: QTBUG-59164
Change-Id: Ia25d205b1127c8c4de0979cef997d1a88123c5c3
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 65b8f59e04)
(cherry picked from commit da38f0d691d9d7eacfac5fbcbd47b887bd59bd39)
If this function is called by multiple threads, more than one could
reach the mutex locking and call TlsAlloc(), but only the last one would
save the data. The others would be leaked and, worse, be used by those
other threads.
[ChangeLog][QtCore][QObject] Fixed a resource leak caused by a race
condition if multiple QObjects were created at the same time, for the
first time in an application, from multiple threads (implies threads not
started with QThread).
Fixes: QTBUG-77238
Change-Id: Ife213d861bb14c1787e1fffd15b63a5818bcc807
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Libtool cannot cope with absolute paths in the dependency_libs entry.
We split absolute paths into -L and -l here.
Change-Id: I30bf11e490d1993d2a4d88c114e07bbae12def6d
Fixes: QTBUG-76625
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Change-Id: Iaa6eb4d64f549a31aa5c53145e8b37facec4ea78
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Added checking corner cases (more specific formulas) in
color_dodge_op()/color_dodge_op_rgb64() and color_burn_op()/color_burn_op_rgb64()
to produce correct results for any input.
Task-number: QTBUG-77231
Change-Id: I274f80b356bd4236a9176a84a95604c2eb01787a
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
One of the tests above was unsetting a variable that enforces
the use of a temporary keychain. We have to set it back, otherwise
the test is failing. What surprises me though - why I had this
problem only locally and not on CI? Apparently, SecureTransport
is not covered by our configurations ...
Change-Id: I0ff1e3e304632869391ed61213c245b949d8c778
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Allow AppKit to resolve screen for NSWindow lazily in the case where the
position is outside any known screen. And explicitly set the style mask
if detecting the corner case of positioning a window in the unavailable
space on a rotated screen.
In testing the effect of creating the window with a borderless style mask
and then updating the mask did not seem to have any visual consequences,
but we try to limit this mode just in case by only enabling it in the
corner cases we detect.
Change-Id: I4b7fcc6755a1ad5ff2683bec79d80a78226edae0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The user may have assigned the application to start up on a specific
display, in which case the window's screen is nil after creation, and
the resulting screen will be delivered as a normal screen change once
the window is ordered on screen.
Fixes: QTBUG-77154
Change-Id: Idade6d833e31654db239243f2430166b5d86eca2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
std::not1 is deprecated in C++17, removed in C++20.
Use its replacement, std::not_fn.
Change-Id: I37d4929c81c2a5befeb44f954ae77b23960d2ff0
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
For some reason, the overload resolution of the
High DPI scale() functions introduced by
b6ded193ee chose the
wrong overloads for QPointF and/or QPoint; it fell
back to the generic template intended for qreal,
QSize, etc, ignoring the origin. Remove the
template and spell out all overloads.
Fixes: QTBUG-77255
Change-Id: I5661f16f7326f65156f646f430f5a0c71d5302d2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The m_windowState member is never updated regarding active state;
isActive is instead reimplemented to query the window manager, so use
that.
To extend the area where the user can move the window over the entire
titlebar of fixed-height windows, just test whether the mouse position
is within the titlebar.
Change-Id: I6b87aacd0bdab511cfd4959df1114af5c6013852
Fixes: QTBUG-77220
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>