The other containers probably don't handle as well, so I just documented
the ones that I know how they work.
Fixes: QTBUG-75470
Change-Id: I95ecabe2f50e450c991afffd159a0483aac35a79
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Well, yeah, it technically does...
qcborstream.h:245:15: warning: declaration shadows a typedef in the global namespace [-Wshadow]
/usr/include/libkern/OSTypes.h:36:26: note: previous declaration is here
Fixes: QTBUG-75825
Change-Id: Idce141629dd34287808bfffd159ee2a75428bf12
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
qmetatype_p.h:111:412: error: use of logical '||' with constant operand [-Werror,-Wconstant-logical-operand]
Change-Id: Iac6ae11e29bd4169bae9fffd15a117d576a95adb
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
This helps to fix build without feature.properties
Change-Id: Ia1fd2a1ca88105048e75694874058bb1292899a0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The -d option makes rcc output a dependency file with the specified
file name.
The resulting dependency file is useful for make or ninja based build
systems.
[ChangeLog][Tools][rcc] Added -d option to generate a dependency file.
Fixes: QTBUG-45460
Change-Id: I495ade50f8d9865d4c00dce9373b2b6d1a6c8f2f
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Since it was added in Qt 4.2, addAppFont() has been written
to first register the font, then immediately invalidate the
font database and later reload the font again the next time
the db is used. This caused all application fonts to be
reloaded *at least* once, an operation which can be quite heavy
for large fonts, such as CJK fonts. If an application loaded
multiple fonts at different stages of execution, you could
end up loading the same fonts a large number of times, since
all application fonts would be reregistered every time a new
one was added.
When calling removeApplicationFont(), this is okay-ish, since
we need to remove all traces of the font from the platform
database and clearing the whole thing is a convenient way
of making sure there is nothing left. There might be more
efficient ways of doing this, but unloading fonts is not
a common operation, so it is fine to keep this behavior there.
This change removes the invalidation of the font database from
addAppFont(), since this should not be necessary as long as we
are adding fonts. It also removes the reregisterAppFonts flag,
which was a bit of a convoluted way of saying that the database
had been invalidated and needed repopulating. Instead, we use the
same mechanism as for repopulating the system database: We just
check if it is currently empty, which means it has been
invalidated and the application fonts have to be reregistered.
It does not touch the logic in qt_cleanupFontDatabase(), which
is kind of broken (it will leave application fonts in memory
and reregister them if the application continues to run). But
this is only actually called during shutdown (from application
destructor).
[ChangeLog][QtGui][Text] Fixed an issue where application fonts
would be parsed multiple times, causing some unnecessary overhead
when during application startup.
Task-number: QTBUG-76239
Change-Id: Idfb62f73133b55e0909bb398631c8e762442e95b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The make executable that comes with Android's NDK tries to execute the
shell-builtin "move" as a stand-alone executable unless you trick it
to execute "move" through the shell by surrounding one argument with
double quotes or such.
Force the execution of "move" through shell by altering QMAKE_MOVE for
Android on Windows.
Change-Id: I5b1490ad0606960dbd06a4cafb0b0b983e265159
Fixes: QTBUG-35713
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Although QPlatformInputContext::reset() documentation says that reset()
should not send any QInputMethodEvents, implementations on Windows,
macOS and iOS do send a QInputMethodEvent which clears preedit text in
their reimplementations of reset(). Text editing controls depend on that
and may not clear preedit text if such event is not sent.
Change-Id: I75ab73946cb06e93e5fc5e98e0cc503a7de5c2e0
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
There is no need to tell the editor to stop composing if user taps so
close to the cursor position that the cursor will not move anyway. If we
do stop composing in such case, then since there will be no cursor
position change notification, we will never start composing again
(before the cursor is actually moved), and the current composing region
will remain being displayed as normal text instead of being displayed as
composing text.
Change-Id: I4ebe6442e1ba8c365d6754c1a8487235d177c732
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Fixes auto-capitalization in AnySoftKeyboard. It was typing the whole
first word in a sentence in upper case.
Change-Id: I605a1aee39d432a3474c0bf706445d354562285f
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
7a7c722782 caused a regresssion in some
cases.
Change-Id: I1089a79534d811b195de663ff664d9ba5a6ac6c5
Fixes: QTBUG-74110
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
On Windows buildToolsVersion 29.0.0 have problems, therefore,
it's better to use a version that we know it works on all platofrms.
Change-Id: I25cdea4b8101bfe5f022025fcd7cc4cbf358fa03
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
A recurring problem with the Q_NAMESPACE macro is that it declares
an object (staticMetaObject) in the surrounding namespace. That
object lacks any export/import qualification to make it usable
with shared libraries.
Introduce therefore another macro to work around this issue, allowing
the user to prefix the object with an exporting macro, f.i. like this:
Q_NAMESPACE_EXPORT(Q_CORE_EXPORT)
The old macro can simply then be rewritten in terms of this new one,
supplying an empty export macro.
Note that NOT passing an argument to a macro expecting one is well
defined behavior in C99 -- the macro will expand an empty token.
Of course, MSVC doesn't like this and emits warnings. As a
workaround, use a variadic macro.
[ChangeLog][QtCore] Added the new Q_NAMESPACE_EXPORT macro. It
can be used just like Q_NAMESPACE to add meta-object information
to a namespace; however it also supports exporting of such
information from shared libraries.
[ChangeLog][Potentially Source-Incompatible Changes] Prefixing
Q_NAMESPACE with an export macro may no longer work. Use the new
Q_NAMESPACE_EXPORT macro for that use case.
Fixes: QTBUG-68014
Change-Id: Ib044a555ace1f77ae8e0244d824ec473550f3d8e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
not to resolve merge conflicts on every 5.13->dev merge.
Change-Id: Id41a7efff52148fe46bedcde828646694fd1764d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Fix warnings:
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).
Change-Id: Ie6f0e2e3bb198a95dd40e7416adc8ffb29f3b2ba
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fix remaining nullptr and member initialization issues which
Qt Creator did not catch.
Change-Id: If5492259aea9849c790f00809a27f4c78b446b9b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
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>