Because it allocates memory, it may call system functions that set errno
or Win32's GetLastError().
[ChangeLog][QtCore] Fixed a bug that made qErrnoWarning() say there was
no error when generating the error message.
Fixes: QTBUG-77322
Change-Id: Ife213d861bb14c1787e1fffd15b811a4f83cf3e7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The source code is still only using the old negative define check.
Change-Id: I7e2775d6d4664cb5b802b0a40fb3f1711c8f6915
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
It can happen that AppKit calls -mouseDown: on a popup's view, but
we consider the click to be outside of popup's area (happens on the
1-pixel edge of a 'geometry', QRect::contains() returns false).
If we send close event to essentially 'self', m_platformWindow
is becoming nullptr. So we bail out early, no further processing
is needed.
Fixes: QTBUG-77348
Change-Id: I224943e6bcf4ae052412ef7dc7b23a94f999aa19
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Makes the code a little cleaner, avoiding an issue caused
by UB and/or optimization bug in msvc2019.
Fixes: QTBUG-77119
Fixes: QTBUG-77230
Change-Id: I9bc8f427a90e6fe32b3c26301bbb703a3c4ad846
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
The paths to the libraries and prl files should have the "_debug"
suffix for the debug configuration. This prefix is added to the TARGET
when by qt_module.prf when doing a debug build, but not during a
debug_and_release build.
Make sure to strip the _debug suffix if it's there, and re-add it later
always, to be consistent in both debug_and_release builds and in
debug builds.
Amends a12b6e7bf6.
Task-number: QTBUG-38913
Task-number: QTBUG-75520
Task-number: QTBUG-77092
Change-Id: I29e88f2b991e2be06b23652d64edc768fa35a5ae
(cherry picked from qt/78d67d17a6c108a419816b8bd47f78864ddbb07f)
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
While there is likely no example of it in Qt itself, applications can
use QOpenGLShaderProgram instances on different threads. These instances
have nothing to do with each other but they do share a global cache object.
This becomes problematic without proper synchronization.
Change-Id: I80faf73f34af7e67349eee916bb3f216e22c07fd
Fixes: QTBUG-77469
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Observed infrequently in the QDBus tests, it would deadlock when
destroying QDBusServer at the same time as qDBusNewConnection was being
executed as they were locking the same locks, but in opposite order.
QDBusServer locks d->lock, then QDBusConnectionManager::instance()->mutex.
While qDBusNewConnection locks QDBusConnectionManager::instance()->mutex,
then serverConnection->lock (and serverConnection here
is QDBusServer's d-pointer).
QOrderedMutexLocker cannot be used in this situation because it
operates on QMutex*, which d->lock (QReadWriteLock) is not.
Change the code to lock QDBusConnectionManager's mutex before d->lock
and then unlock the QMutexLocker where it would previously destruct.
If QDBusConnectionManager has already been destroyed then we pass a
nullptr to the QMutexLocker which is fine and will not do anything.
Fixes: QTBUG-74635
Change-Id: I7f02d7759da67377996ef042c81b0969ccb8aadb
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
As is said in RFC7301 in section 3.1 [1]:
Protocols are named by IANA-registered, opaque, non-empty byte strings
[...]. Empty strings MUST NOT be included and byte strings MUST NOT be
truncated.
[1]: https://tools.ietf.org/html/rfc7301#section-3.1
Change-Id: I38168ac570a433807e16121d5dec46d4ac73c4bf
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
As is said in RFC7301 in section 3.1 [1]:
Protocols are named by IANA-registered, opaque, non-empty byte strings
[...]. Empty strings MUST NOT be included and byte strings MUST NOT be
truncated.
[1]: https://tools.ietf.org/html/rfc7301#section-3.1
Change-Id: I2c41fa99984a53cc58803e5a264d06edac964cc6
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Qt for QNX is, by default, built without the clipboard feature.
Change-Id: Ie8a36ceb0c0f0a695ae7d0fcf6f0bd70d2a43e0c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Dan Cape <dcape@qnx.com>
Reviewed-by: Rafael Roquetto <rafael@roquetto.com>
Follow up to 091a386eaf
Defaulting to querying from the egl config is fine, but dropping support
for the "format" key in the output list in the json config file is not
ideal.
Task-number: QTBUG-76748
Change-Id: I25dc99369d118c300cdef25b464426f6be85453b
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Add support for astc format files as an experimental feature.
To enable, configure with "-feature-texture_format_astc_experimental"
(Backported from commit 5a4db421bd94acd12a4ac1f77031996b95f85dbf)
Change-Id: I9a2f7b1fa20ba344b79637bafb50ff2bd0596747
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@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>
(cherry picked from commit 53a6f7b783)
Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
Turns out that kern.uuid is not as unique as we thought. Googling for
mine finds other instances of the same being used.
Fixes: QTBUG-75371
Change-Id: I95ecabe2f50e450c991afffd159850cc975ec0da
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
...with a failing test case for QTBUG-77299.
Task-number: QTBUG-77299
Change-Id: I42c4fc4bb96f8660f8ff9bea97e6096ca6cec972
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
With things like sample count reducing a format (16 -> 8 -> 4 -> ...)
and trying again is perfectly fine. There is no need to show warnings
in this case. Even some of our own examples in qtdeclarative do a
setSamples(16) which is rarely supported. These all show warnings since
8ec98fc2dc. Avoid this.
Change-Id: Ice83d5720b02e92f77cfd63918c98ad222513b6a
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
This was introduced by accident in 4da47d0f.
Fixes: QTBUG-77429
Change-Id: Ic3d9052e1fc83dab5ed3b8725629588208b0d7bb
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Avoid unreasonable threshold values for extremely wide pens, since
that can lead to a very high processing cost.
The rare usecases where this would make a noticeable difference will
necessarily also be using scaling, and so is anyway depending on
setting a suitable curve threshold manually.
Fixes: QTBUG-77241
Change-Id: I27cea7d566d144389bb430739fde4f6033c4a28c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Some servers seem to be unable to properly calculate our window size
from a delta we send via WINDOW_UPDATE frame immediately after our
client preface and the SETTINGS frame. The remote replies with a
GOAWAY frame blaming flow control error. Guessing what's this
magic number they use seems to be not feasible, we now use a
half of what we had before.
Fixes: QTBUG-77308
Change-Id: I41dacfd25a395a27003f330d01b6d8d60b8f407c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
QTreeView allowed to set the sort column to -1 which shows the data in
it's natural order (when the model supports it). This functionality was
removed during the porting away from the deprecated sortByColumn(int)
functionality done in d0f909f8db
Readd the functionality and also allow it for QTableView.
Fixes: QTBUG-77419
Change-Id: I96b0c09ab9da36ca0a9de58fe0f37e2c56b1d51b
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: David Faure <david.faure@kdab.com>
It doesn't work since it relies on cups to do the heavy lifting and cups
is not used when printing to PDF
Task-number: QTBUG-77351
Change-Id: I1bdda58b50112b9bb3d7991f3cfd860d6b4f4fc4
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This is needed to copy the .qdocconf files from that directory to
QT_INSTALL_DOCS.
Task-number: QTBUG-74391
Change-Id: Ia73d5c38c3c9588820401e8098b01f09e63292e4
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
QTRY_IMPL() exercises QTRY_LOOP_IMPL() twice, once directly, the
second time via QTRY_TIMEOUT_DEBUG_IMPL(); and QTRY_LOOP_IMPL()
deliberately doesn't bound its scope (e.g. with the canonical
do{...}while(0) trick) so that the latter can access its local
variable. Unfortunately, this means the local's declaration in the
second use of QTRY_LOOP_IMPL() shadows the first. So enclose the first
in braces to bound the scope.
Fixes: QTBUG-77297
Change-Id: I849bfe0b8abfb517ed3e783abf86c602163db137
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This is necessary in order to use the properties of QCompleter that use
these enums.
Change-Id: I9f7edfc1137f200810b6bc98d27709695f37de5d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
src_gui_dialogs_qfiledialog.cpp had two snippets labeled "14". This
change bumps one of them to "15" and fixes the the snippet lookup for
QFileDialog::getOpenFileContent accordingly.
Also, fix two typos:
"QSting" -> "QString" and "contents has" -> "contents have".
Change-Id: Ic018c23b6ca585f30c116b8a6eb29293560c7a35
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
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>