Group the bit flags together and generally order roughly by size to
give the compiler better packing options.
Change-Id: I9468d5aaef96e115ad363c59222e626d792a0edc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Always returned true, also in the QWidgetWindowPrivate override.
Change-Id: I01d11ae6f85882b52ce397125f994eea663ffcb5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Change it into a member variable of QSpiAccessibleBridge.
Task-number: QTBUG-83255
Change-Id: Ia781a7c86723e343680bf804be6393640f83a516
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
../../src/corelib/io/qurlidna.cpp: In function ‘QString qt_ACE_do(QStringView, AceOperation, AceLeadingDot)’:
../../src/corelib/io/qurlidna.cpp:2543:23: error: ‘int __builtin_memcmp_eq(const void*, const void*, unsigned int)’
reading 8 bytes from a region of size 2 [-Werror=stringop-overflow=]
if (memcmp(result.constData() + prevLen, acePrefixUtf16, sizeof acePrefixUtf16) == 0)
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
In function ‘bool operator==(const QByteArray&, const QByteArray&)’,
inlined from ‘virtual void (* QLinuxFbIntegration::platformFunction(const QByteArray&) const)()’
at ../../src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp:185:18:
include/QtCore/../../../../src/corelib/text/qbytearray.h:571:45: error:
‘int __builtin_memcmp_eq(const void*, const void*, unsigned int)’ reading 17 bytes from
a region of size 1 [-Werror=stringop-overflow=]
The warnings/errors are bogus. Fix them by using QStringView::sliced() and de-inlining the
comparison operator for QByteArray.
Change-Id: I24956fe74a7989e75cd03d717570b8fca493ab23
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
After API discussions, agreement was that from(n) is a bad name
for the method. Let's go with sliced(n) instead.
Change-Id: I0338cc150148a5008c3ee72bd8fda96fb93e9c35
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This keeps the API symmetric with what we have in our string
classes.
Change-Id: I94c5b39b718ca2472f9ca645e7a42e4314636f67
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The change creates a slight source incompatibility. The main
things to take care of are
* code using printf statements on list.size(). Using qsizetype in
printf statements will always require a cast to work on both 32
and 64 bit.
* A few places where overloads now get ambiguous. One example is
QRandomGenerator::bounded() that has overloads for int, uint and
double, but not int64.
* Streaming list.size() to a QDataStream will change the format
depending on the architecture.
[ChangeLog][QtCore][QList] QList now uses qsizetype to index into
elements.
Change-Id: Iaff562a4d072b97f458417b670f95971bd47cbc6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Make sure we can handle qsizetype as an integer when appending
test data. This is required for backwards compatibility with Qt 5,
so people don't have to rewrite all their test cases.
QCOMPARE can handle mixed types, tthe only method that requires manual
changes now is QTEST(list.size(), "testrow_expecting_int").
Change-Id: I40723b239e0160cefc05745aa35a75de8599ac08
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Also adjust qCalculateBlockSize() to be able to handle large
allocations.
QVector::length() is currently still limited to 2G items, that will
get changed in a later commit.
Change-Id: I3a92fbfd7f281d30844c5fafa3b9a474bc347c19
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This avoids ambiguities in our API when someone e.g. writes
vector.insert(0, ...).
It requires a slight workaround in qlalr, where std::search()
for libc++ doesn't like that our difference_type is qsizetype.
Change-Id: I40aa1040781ffbdd12d04410078207969b3bde53
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is a next step towards making QList, QString
and QByteArray able to deal with large sizes.
Change-Id: Icad49b33f503401ac4912678b2f88584c6f91a63
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Remove the last places where those got used and avoid
allocations when we resize to 0.
Change-Id: Ib553f4e7ce7cc24c31da15a55a86d18bdf1cc5c3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Those can simply be handled as compile time constant strings
pointing to the empty (Q)Char.
Change-Id: I1f6f6ab923a30c68a720003ca68c34c572aa29da
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
As a side effect, data() can now return a nullptr. This
has the potential to cause crashes in existig code. To work
around this, return an empty string from QString::data()
and QByteArray::data() for now.
For Qt 6 (and once all our internal issues are fixed), data()
will by default return a nullptr for a null QString, but we'll
offer a #define to enable backwards compatible behavior.
Change-Id: I4f66d97ff1dce3eb99a239f1eab9106fa9b1741a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In case of forward iterators, call std::distance just once and not
twice. In case of non-forward iterators, don't call
reserveIfForwardIterator -- as the name says, it doesn't make sense
on non-forward iterators.
Change-Id: I7e6a603205286c05f7bc7c47fd1f1e0d92705b20
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The hand-written special member functions did exactly what the
compiler generated ones would do anyhow.
Change-Id: I66439178460d30957135aac44680dd3109ada62a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The iterators are quite heavy objects (>100bytes), don't pass them
by value.
Change-Id: I4c9d1f64d14419a35bd067884d7e8bca2589f9b9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This add support for the following options: -debug, -release,
-debug-and-release. For the latter, the "Ninja Multi-Config" generator
is auto-detected, if ninja is available.
Task-number: QTBUG-85373
Change-Id: Ide0ca44e5f4c74657147e89d71e8d71c4f6a4c45
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Remove the -cmake-makefiles configure argument as its meaning was in
essence "do not pass a -G argument to CMake".
Instead, we add the following arguments:
-cmake-generator <name> to pass -G <name> to CMake
-cmake-use-default-generator to pass no -G argument to CMake
If none of those arguments is given, we try to autodetect the
generator. If a ninja executable is found, we prefer the Ninja
generator. On Unix we fall back to "Unix Makefiles".
On Windows, we do a poor man's compiler detection and select one of
"NMake Makefiles", "NMake Makefiles JOM" and "MinGW Makefiles".
Change-Id: Ic36669bd50956d15fbc71cee73720732cd4bfab8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The configure scripts need to translate configure options to CMake
arguments. It is not sensible to implement this translation twice, in
sh and Windows batch language, so we're doing this once, in CMake
language.
The configure scripts write their options into config.opt and call a
CMake script that reads config.opt, does the translation to CMake
arguments and calls CMake to generate the build system.
While we're at it, implement some more translations than the sh
configure provided, like -extprefix, -top-level and -skip.
Fixes: QTBUG-85349
Fixes: QTBUG-85350
Task-number: QTBUG-85373
Change-Id: Ida5d8b2a3c178b9349d41ec76d190c69a9456e74
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
It is only used by default on Windows, but can be enabled by setting
QMAKE_LINK_OBJECT_MAX.
The current file name is .project_name.
Use a sensible file name on this case.
Change-Id: Ic250d024e5feca739027c79a6e285d616234c4ea
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
It was added in 2011 and has not seen any development since, and was
never included in the build system.
The OpenWFD use-case is covered by EGLFS, which has a dedicated
OpenWFD backend.
Change-Id: Id08c505e2d869a96255163cae2ede51b9efeb73f
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
When the default format has letter and word spacing set then these
should be exported in the HTML's body tag. This also adds support
for the reading of letter-spacing and word-spacing set too, so that
the same html outputted can be read back in.
Fixes: QTBUG-83718
Change-Id: Ic4afca21eb05efb779dbf99c6b3c13373e851f15
Pick-to: 5.15
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
CFURLStringByAddingXXX was deprecated, so we use QUrl combined
with existing QString-based converters (from/to CFStringRef).
Pick-to: 5.15
Task-number: QTBUG-83992
Change-Id: I6f1a3fdafa9532bb7816a1262169df3421169cb7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The original expression seems to have been accidentally
changed during the port.
Amends a1947aeffe.
Change-Id: I87821e1e025621a5efaf7a1e4f946fd3109fb256
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The test runner re-runs failing tests up to 5 times. We did not do this
for the CMake build, and now we're getting lots of flaky tests failing.
Fix this by passing the -repeat until-pass:5 parameter to ctest.
Change-Id: I6ff3c1e7901bc22cafec87b15d087eab2a565c65
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This property tells what part of the virtual desktop the input device
can access.
This is not a one-to-one mapping with a QScreen, because a Wacom tablet
might be configured to access a whole desktop, a whole screen, or an
area corresponding to the drawing area of one window; a mouse normally
can access the whole desktop (so QScreen::virtualGeometry() would be
identical to QInputDevice::availableVirtualGeometry()); a touchscreen
normally is mapped to one screen but could be mapped differently; etc.
It's possible to find the intersection of the rectangular area with the
screen(s) that it overlaps, though.
Task-number: QTBUG-78839
Change-Id: I9040e20fb5a3dec8a9a0dd827735826c4c1eea38
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
The APIs will be reintroduced as part of the new platform interface
API where appropriate.
Clients that still depend on the platform headers can include it
via QT += platformheaders-private.
Change-Id: Ifbd836d833d19f3cf48cd4f933d7fe754c06d2d9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This improves the readability and avoids code duplication
in tst_Collections::forwardDeclared. Also some warnings
are fixed:
* qSort is deprecated.
* The = operator for LargeStatic needs to be implemented
explicitly when a copy constructor is given.
* QMap::insertMulti is deprecated, a MultiMap is required.
Task-number: QTBUG-82978
Change-Id: I577f851394edfaa30154bd3417ce391635cc546d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Properly use the new QStringConverter API and not an internal
qFromUtfEncoded method that was buggy after the changes.
Take the oppportunity to clean up and remove qFromUtfEncoded, as
QClipboard was its only user.
Fixes: QTBUG-85417
Change-Id: I8540d12056bf3f448c1f628ce0bd0ad462a6447d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>