The code was actually there, but not connected to the command line
parser.
Task-number: QTBUG-76375
Change-Id: I801cf2bbd2f207a6ce1dabd1ee1dfbd892089bbc
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Fix warnings:
QWWARN : tst_QImageReader::readFromFileAfterJunk(xpm) Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt.
QWARN : tst_QImageReader::readFromFileAfterJunk(xpm) Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt.
QWARN : tst_QImageReader::readFromFileAfterJunk(xpm) Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt.
introduced by qtbase/c2d2757bccc68e1b981df059786c2e76f2969530 (5.14).
Refactor write_xpm_image() to use a QByteArray and append().
Change-Id: I25e6270e2e5fcb868d4ee38e3b294afc7ee27dcc
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Fix warnings showing in network tests:
tst_QNetworkReply::headFromHttp(rfc+socks):
Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt.
introduced by qtbase/c2d2757bccc68e1b981df059786c2e76f2969530 (5.14).
Replace index access by QByteArray::append().
Change-Id: I0b4aed563d076237d5f9cc6aa438c7502eb3568c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
- Fix some spelling
- Use QT_CONFIG for shortcuts
- Quick C++ brush up, use member initialization
Preemptively fix sanity bot warnings about missing space after flow
control keyword, introducing range-based for on this occasion
- Remove unused member variable
Task-number: QTBUG-69478
Change-Id: I6af21886d5a0b48f4b2d11082991a877bd8d817d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Apply fixits by Creator and results of manual search focusing on
QCore/Gui/Applicaton(Private) methods and variables to prepare for
splitting out some classes.
Task-number: QTBUG-69478
Task-number: QTBUG-76497
Task-number: QTBUG-76493
Change-Id: Iaf468166793e0cabb514b51c827b30317bf45a2d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Make aligned a template, fixing:
rhi\qrhid3d11.cpp: In member function 'void QRhiD3D11::updateShaderResourceBindings(QD3D11ShaderResourceBindings*)':
rhi\qrhid3d11.cpp:1627:53: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
Q_ASSERT(aligned(b->u.ubuf.offset, 256) == b->u.ubuf.offset);
Change-Id: I6b747ebaf78e5accb9b7ed145df71a80d0a15762
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The old code used the implicit conversions from QAtomicInteger<T> to T
and vice versa. The semantics of these differ from the ones std::atomic
uses, so we're going to deprecate these, like we did for load() and
store(), too.
This patch fixex some users of these APIs before we deprecate them.
Change-Id: I4877276581757cd57e042efea8296fe535a493d1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The loop iterates over a collection of QExplicitSharedDataPointer, which
traditionally doesn't propagate const. In Qt 6, it will, so prepare the
code for this change, by taking the loop variable by non-const reference.
Since the loop is followed by container.clear(), make it a consume-loop
by looping over qExchange(container, {}).
Change-Id: If12ab005544183598fd76a0c486b2df1582710d5
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Define the static QAtomic at file scope to avoid GCC's pessimisation with
function-static QAtomic (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79561),
and make sure the initial value is 0, so it ends up in BSS, not TEXT.
In QRhi..., don't create a static instance of the wrapper class, use a file-
static atomic, too. This turns the class into a glorified namespace.
Change-Id: I707f628e2b434330028077223071716d5704ba32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Blocks are likely to have been created in a differnt thread from the one
performing their deletion, so we need an acquire fence.
The rest of the atomics use in the class looks ok, but nevertheless warrants
a deeper analysis.
Change-Id: I1571ded3a06695b0d58b5bf1d80d6283ac21f959
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Suppress warnings:
C4244: 'argument': conversion from 'const uc16' to 'char', possible loss of data
caused by various character handling routines.
Amends 327bfdb671.
Change-Id: I3818c5d0aecb9b6cee174f866b5e7e77aa96d877
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This fixes the usability issue of a modal dialog showing up behind a
splash screen, not visible to the user, but blocking user input and the
application startup sequence until discarded.
[ChangeLog][QtWidgets][QSlashScreen] On macOS, lower the splash screen
when a modal dialog is shown to make sure the user sees the dialog.
Change-Id: Ibae768f76909d930cb25dcf5cee31edc5f15c29a
Fixes: QTBUG-49576
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Don't go through the doScaledRead path (i.e. calling read_image_scaled)
when reading an image that the target size is the image of the file we
are opening.
This makes the loading of the file much faster while keeping the output
correct.
[ChangeLog][QtGui][QImage] Improve loading time when loading png files
that have the same size as the target.
Change-Id: I2a33c49fe1ce52ec296c2175ee542b5bcdec2c4b
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This reverts commit 79bdc7cf1d.
We haven't ported every usages to loadRelaxed() / storeRelaxed() yet.
And warning as error is enabled in dev. We will revert this change
when new qt5 baseline got integrated.
Task-number: QTBUG-76611
Change-Id: I5b1f608fefbaca481311f376f22718f2c5047106
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
When using a http proxy (and presumably other proxies) we might have
failed/aborted (aka "finished") the request and _then_ receive a
"proxy authentication required" message from the proxy. In this case
there is no spdy/http2 reply in the queue, so asserting is wrong.
Change-Id: Id9b76b580299f6a6cd6efad62d6aaf63183816fb
Fixes: QTBUG-76426
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
In some scenarios with QNAM we call socket->close, leading to a flush,
leading to an error, leading to another error emission... To work
around this scenario we stop trying to close the socket if the network
channel is already closing.
Change-Id: Id15504f476484ce61f11ba83a5755ceb5f581f9b
Fixes: QTBUG-76567
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
May very well be called within an active pass when going
through beginExternal() (think examples like d3d11underqml)
Change-Id: Ie98e72609308f47497d83fbe10c19ad1ae8eade3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Also revise how we reset shader input/outputs at the beginning
of a pass.
Change-Id: I6d4057f32318ca09b12e16c602bb1033a3ec8e3c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Inspired by:
https://codereview.appspot.com/6812076/
Resizing a window larger results in the newly exposed region being invalidated
but the old region is treated as valid.
This can result in the old region no longer updating.
Was added to D3D9.
Improving a fix from Filippo Cucchetto:
https://codereview.qt-project.org/c/qt/qtbase/+/195336
and pushing to D3D11.
ifndef protects against compilation error for WinRT.
Invalidate() should be used only for desktop apps.
Task-number: QTBUG-46074
Change-Id: Ie24b8dffe130b970f2362337ac4f9bee666f82b2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The directory must be prepended by = to denote the sysroot.
This amends commit 797f686e.
Change-Id: Ib85c0abc58fce3504ecccef0e223b2618ac9149a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
We must use the same two-level replacements like for .prl files.
This amends commit d5071a40.
Change-Id: Iea065d01dee61cf2d1ff78640d045c3c76db9ac8
Fixes: QTBUG-76625
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Converts from OpenGL formats to Vulkan formats.
There are commented out lines for the formats in QOpenGLTexture::TextureFormat
for which it was hard to find an unambiguous mapping to vkFormat.
Task-number: QTBUG-75108
Change-Id: I06a7fd8df7d98cef314410ffd79ca9cff6599357
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit b21b07877a)
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
See comment in qnumeric_p.h:convertDoubleTo for details.
Change-Id: Ifcd13f7f67995af6a60e50ccabe843a855be04ae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is usually the case on Android, where running this test would
require deployment of files to the emulator. This doesn't give us any
further testing that we don't already do by running this test on regular
Linux, so skipping the test instead if the preconditions aren't met.
Change-Id: I3722796634871213ba51c89ae7f40b19f954f2cb
Fixes: QTBUG-73566
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Fix our generation of font-family CSS so it contains the full list of
families.
Change-Id: I37d5efa64faeb4b6aeb7e2c5d6a54ff07febe9cc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This saves us lots of .toQString() and .toQStringList() typing when
qDebug()'ing qmake code.
Change-Id: I037e5e1816f2dcb6a20dec4c275f3d886f155ad5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
'make clean' removed the import libs for DLLs which makes them quite
unusable. Move the import lib removal to the 'distclean' target.
Fixes: QTBUG-51977
Change-Id: I727d520435f88a83a7fb14cb0ad81f8fe7c6d61b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
... in case the submenu is set from a slot, attached to the aboutToShow()
signal. Normally, with a 'statically' pre-populated menu, we set 'submenu'
property on a menu item from 'updateItem' callback in our menu delegate.
After that, AppKit calls our delegate's willOpen call back and this is
where we emit 'aboutToShow'. Unfortunately, if an application tries to
create a nested menu 'dynamically' at this point, it never becomes 'submenu'
of the item, since 'updateItem' was already handled at this point.
We catch this case in QCocoaMenuItem and call setAttachedItem if needed.
Fixes: QTBUG-76060
Change-Id: I676bf1d8529b9ddbfc90e4dff422b39668b7a5fa
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Used const variables for the SQL statements,
so that the code looks similar to its
couterpart in Qt for Python.
Change-Id: If2a505a404deff77d3d37c5ffad913c8c538d0b3
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Calls like
QHighDpi::fromNativePixels(point, window)
would return device independent coordinates outside any
screen in cases where the window is spanning multiple
screens and the native point was not on the main screen.
Correct this by looking up the correct screen and use
its scale factor and origin when scaling coordinates.
Task-number: QTBUG-73231
Change-Id: I01a3a42f42121b8d9f4ced2bb0fb023d6ae6bfe7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Using QImage allows creating the style before the application has
been created, and is the more modern API.
No changes to the documentation needed.
Change-Id: Ifa0e5fa1113802fca18fbd45bb3c0a5ba1dbfeab
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Fix most clang warnings about override, nullptr, range-based for loops.
Change-Id: Id47e57adb63a38e2f397a31511b788a2432c97cf
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The source of this is likely a "window" grab from Qt Quick. Requesting
a new drawable is an error in this case since we do not enqueue a present
for the current one.
Change-Id: I64bab03ff46743ce1f270b251229be126f9ad9fb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The completer popup has focus, making QShortcut direct to it's window
rather than to the window the completer belongs to. As QShortcut handles
the case for Tool windows that have a parent, but doens't do the same
for popups. And they shouldn't be treated the same way, as a context
menu popup for a e.g. text edit should in fact block the text edit's
shortcuts while open.
However, the completer popup is special, in that it explicitly makes the
widget completes for its focusProxy, which is what we can use to fix
this issue.
Change-Id: Ie7177d39668b3af14a1d9e0ee5d93eca9c67c8af
Fixes: QTBUG-4485
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Static libraries may get installed and used by other builds, which may
be done with a different version or build of the compiler. So this
commit introduces two new flags:
- no-static-ltcg: disables LTCG completely for static libraries
- fat-static-lto: forces static libraries to produce fat LTO objects
fat-static-lto is useful for Linux distributions, since installed static
libraries should not carry LTO information, but that information is
useful during Qt's own build. This feature should be used alongside some
compiler-specific method of removing the LTO information from the
static libraries prior to installation, so only the regular part
remains.
For current GCC versions, this command suffices:
strip -R '.gnu.lto*' -R '.gnu.debuglto*' libname.a
Otherwise, distributions can use "no-static-ltcg" to disable it
completely.
Change-Id: I495bc19409f348069f5bfffd155237ade9f4b42f
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Codebases using QResource::isCompressed() and assuming it is Zlib break
if zstd is enabled. So change the default back to Zlib until Qt 6.0.
[ChangeLog][Important Behavior Changes] RCC's default compression
algorithm was changed back to Zlib, as it was in all previous releases
until 5.13.0. The default will remain Zlib for all Qt 5.x releases but
will change in Qt 6.0. To activate Zstd compression for your resources,
either pass the --compress-algo=zstd option to the rcc tool or add the
XML attribute compression-algorithm="zstd" to the <file> tags in the
.qrc file.
Task-number: QTBUG-76521
Change-Id: Ief874765cd7b43798de3fffd15a9f56fd9ad1ad4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Function did not handle default-constructed (null d_ptr) path correctly.
Fixes: QTBUG-76516
Change-Id: I2925d4306f7fce34ece6739b18a8e275e7970837
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>