The -host prefix was added to the 'preliminary' directory rather than
the actual wrapper shell script. This caused it to be overwritten
every time by the cross-compiled qmake binary.
Change-Id: I103811c6aa9181fa701e3e7ecaf828ecdd1e3c90
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
While trying to implement instructions for building examples with
qmake in the CI, an issue has surfaced.
When building examples with CMake with -DBUILD_EXAMPLES=ON in the CI,
the examples are built in-source, aka source dir == build dir.
This means that the header files generated by qdbusxml2cpp will be
placed in the qtbase source dir.
The instructions that try to build examples with qmake build the
examples in a separate build dir after building the examples with CMake.
Unfortunately the qtbase/examples/dbus/remotecontrolledcar/car example
includes the generated DBus adaptor header via a statement like
#include "car_adaptor.h"
and the compiler prefers to pick up the header file from the example
source dir (the one generated by CMake), rather than the one generated
by qmake in the example build dir.
Because CMake's DBus integration uses different flags than qmake's
DBus integration, the generated header file code is not compatible
with the qmake generated cpp file, and the example fails to link when
building with qmake, because it can't find an appropriate constructor
symbol.
In an ideal world, we wouldn't do in-source builds with the CMake
build, but that leads to other issues which I currently don't recall.
To circumvent the issue, adapt the CMake DBus qt6_add_dbus_adaptor
function to allow not passing the problematic '-l' flag by making it
optional. This shouldn't break existing code, but allows us to
generate a compatible header that will be used by qmake and succeed in
linking the example.
Task-number: QTBUG-85986
Change-Id: I06759f79aeb66bb32da7f158f55dd4734c4a9887
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The code was developed against the narrow-contract version of mid(),
but not updated when mid() became wide-contract.
Change-Id: I038054fb3f5acc0085c48fbf36af13dd14c917b8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reduce the scopes so that also the result of 1-arg-sliced() can be
called 'sliced'.
Change-Id: Ie156f76838f8650d6926d3c198007aaf12f90734
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QLatin1String::mid() etc were changed from narrow to wide contract,
but the narrow-contract replacements weren't added. This blocks using
the narrow-contract functions in QStringTokenizer.
As a drive-by, Q_REQUIRED_RESULT -> [[nodiscard]] and Q_DECL_CONSTEXPR
-> constexpr. Also centralize most Q_ASSERT()s in a single function,
verify(), in an attempt to reduce the amount of string data generated
from the asserts in assertive builds.
[ChangeLog][QtCore][QLatin1String] Added from(), sliced(), first(n),
last(n) functions.
[ChangeLog][QtCore][QLatin1String] size_type/size() is now qsizetype
(was: int). This makes QLatin1String(ptr, 0) ambiguous now between the
(ptr, ptr) and (ptr, qsizetype) constructors.
Change-Id: Ie195f66ae1974eb0752c058aa9f3b0853ed92477
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Quanifying a parameter passed by value (which is correct for QTime,
there is no need to pass it by reference) as const is pointless.
Change-Id: I86850f65dfac28ffcc4a8633dd6d212259bb33d0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The serialization code neglected to check against null. Sinze zones
are saved either by IANA ID or in our special OffsetFromUtc format,
representing an invalid zone by a string that cannot possibly be a
valid IANA ID will do.
Fixes: QTBUG-86019
Pick-to: 5.15
Pick-to: 5.12
Change-Id: I6882026403d00f8b254aab34c645f1cf8f9fcc2d
Reviewed-by: Taylor Braun-Jones <taylor@braun-jones.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The read data wasn't encoded into the state correctly.
Change-Id: Ib0a3b50bfeb56968de5c5e8353b28383cb586271
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Among other things, this allows for ignoring proper indentation
of code that's contained in a wrapper function which serves the
purpose of compiling the snippet only. This is useful because
the extra indentation is included in the output generated by QDoc.
Task-number: QTBUG-84470
Change-Id: I3d702e82169a87447939f357cbee15cb0f74a391
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
setFilterRegExp retains the caseSensitivity() while setFilterRegularExpression did not.
Change setFilterRegularExpression to also retain the case sensitivity.
Fixes: QTBUG-83313
Pick-to: 5.15
Change-Id: I46f494d320aee99d50612f01f63558c693276989
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: David Faure <david.faure@kdab.com>
This code path was deprecated in 5.12 and scheduled for
removal in Qt 6. See 9184384bc9.
According to the source comments from f48170b479,
apperantly XInput2 had some issues when running on Xinerama screens
and therefore there was a check for it in xi2MouseEventsDisabled().
We plan to remove Xinerama support, therefore Xinerama handling in
xi2MouseEventsDisabled() is irrelevant.
Task-number: QTBUG-69412
Change-Id: I384d7c46337358caecccf644acc8ffbd381dc69d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We actually do not need this "mode" in qwsi API. I think while
writing the patch from 00ae1e6b7b I got confused by focusing
on my test application. We can't know what the native event
filter will filter out, therefore it makes sense that we
unconditionally do filtering at qwsi level as well for user input
vs other events in QWindowSystemInterface::sendWindowSystemEvents().
Pick-to: 5.15
Pick-to: 5.12
Change-Id: Idb23152a24bf3ba3b91804427a6e78f991969c29
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Try to fix an API mistake there: there is no reason why these
functions should take pointers to non-const widgets, as that
actually preventing reasonable code (e.g. finding out the index
of "this" inside a const method of a QWidget subclass).
Unfortunately, indexOf(QWidget*) is also virtual, meaning that
changing its signature is an API break. Hopefully, there are
only few users that override this method (Woboq says 0).
[ChangeLog][Potentially Source-Incompatible Changes]
The QLayout::indexOf(QWidget *) virtual function has changed
signature, becoming QLayout::indexOf(const QWidget *).
This is source incompatible, although the fix (for the few
users that do override indexOf() in their layouts) is
straightforward.
Change-Id: Id2183f5ecd9dc7e2a37c7355266e8494ef7929f2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This extends to/fromString to include style strategy, capitalization,
letter and word spacing and stretch. QFont::fromString() keeps
compatibility with strings from earlier versions as well.
Fixes: QTBUG-67687
Change-Id: I5e95a58f1cd850214af2a7d8906a214facd4e661
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
When using X-forwarding we're not using shared memory for the backing
store image, and end up in a code path where we first copy the updated
parts of the backing store from our client side image over to the server,
and then flush those parts from the server-side image to the window.
The problem was that this code path didn't account for the possibility
that we'd flush a sub-window at an offset, and would end up uploading
the sub-window local region directly, without applying the offset.
This problem was revealed when 79bf1b7e34 started being smarter
about what regions we flush and to what windows when we have sub
windows.
Fixes: QTBUG-81723
Pick-to: 5.15
Pick-to: 5.12
Change-Id: I1c9c8bc53c088cdc1ae8b892e17930f4a468ccad
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
MidButton had its // ### Qt 5: remove me
upgraded to Qt 6 at 5.0; but it dates back to 4.7.0
Replace the many remaining uses of MidButton with MiddleButton in the
process.
Pick-to: 5.15
Change-Id: Idc1b1b1816673dfdb344d703d101febc823a76ff
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
QtQuickTest synthetized events can have modifiers, but those modifiers
were not accessible globally, from QGuiApplication::keyboardModifiers
for instance.
eg. calling QML's TestCase::mouseClick with modifiers triggering a call
to QGuiApplication::keyboardModifiers did not give the expected result.
QtTest synthesised events can also have modifiers and those were
correctly handled by QApplication to set modifiers globally.
This fix moves the handling code from QApplication::notify to
QGuiApplicationPrivate::maybeSimulateModifiers and calls this function
from QGuiApplication::notify too.
The definite fix would be to do as suggested in the comment attached to
the moved code:
> Qt Test should not call qapp->notify(), but rather route the events
> through the proper QPA interface. This is required to properly
> generate all other events such as enter/leave etc.
Pick-to: 5.15 5.12
Change-Id: I734e5bbc82232b13828b1a1f82e06ee8eb695417
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Changed QJsonValue to use QCborValue for data storage. Removed unused
internal methods.
Task-number: QTBUG-85700
Change-Id: I784fc7c0c4407f79eb7ca87a1f5116f00c26155d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It works as follows:
- user calls write(const QByteArray &);
- this function keeps a pointer to the chunk and calls a regular
write(data, len);
- write(data, len) calls a virtual writeData();
- subclass calls a new QIODevicePrivate::write();
- QIODevicePrivate::write() makes a shallow copy of
the byte array.
Proposed solution is fully compatible with existing subclasses.
By replacing a call to d->writeBuffer.append() with d->write(),
subclasses can improve their performance.
Bump the TypeInformationVersion field in qtHookData, to notify the
Qt Creator developers that the offset of QFilePrivate::fileName was
changed and dumpers should be adapted.
Change-Id: I24713386cc74a9f37e5223c617e4b1ba97f968dc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
One can now place a config.opt file in an otherwise empty build
directory and call 'configure -redo'. If config.opt contains the
-cmake argument, Qt will be built with CMake as expected.
To achieve that, configure must peek into config.opt and look for the
-cmake argument.
Fixes: QTBUG-86097
Change-Id: I35f76caca862e5a59c2fb850e0aeb6529c826149
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
On QNX the feature detection of GLESv2 is failing due to missing
symbols which are part of EGL library.
Add EGL library as a dependency if it's found on the system.
This allows OpenGL ES feature detection to work on QNX.
Task-number: QTBUG-83202
Change-Id: I90531d925fadce5d893ea9244793fc02a4595ed1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit allows building Qt6's QtBase using QNX 7.1 and a toolchain
file which is almost identical to what CMake has in its documentation:
https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-qnx
set(CMAKE_SYSTEM_NAME QNX)
set(arch gcc_ntoarmv7le)
set(CMAKE_C_COMPILER qcc)
set(CMAKE_C_COMPILER_TARGET ${arch})
set(CMAKE_CXX_COMPILER q++)
set(CMAKE_CXX_COMPILER_TARGET ${arch})
set(CMAKE_SYSROOT $ENV{QNX_TARGET})
The only difference is the usage of q++ instead of QCC, which is no
longer present in QNX 7.1 SDK.
Task-number: QTBUG-83202
Change-Id: I51031540721275f2ee83cee9e7df4994a65db0e2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Moved \omitvalue entries to the end (unless there was only one, at the
start). Sorted Qt::WidgetAttribute's to match their order in the
declaration, as there were many and their order was haphazard.
Change-Id: I41d27df0fc293f642f931177b0d8884fbbcb9b77
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Also mark some internal methods as \internal.
Pick-to: 5.15
Change-Id: I0ae8dc315e5012eea2f3c35ae7d09c3cbb318ab5
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Make clear why we don't need to assert against out-of-bounda accesses
in the generated code, provided the code point is within its bound,
(Using one table's early entries as indices into later in the same
table at which to look up indices into another table made it a little
hard to work out what was going on, especially as nothing told me
about the early / late distinction. Record what I discovered, to save
the next person to stumble into this some confusion.)
Change-Id: I8e5771a7f3d70c1911aeae1b0cabe5c47bc7e9c7
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is already changed throughout qtbase, aside from template
specializations where passing by reference is required by the
template. Revise QDate and QTime documentation to say they are best
passed by value.
Change-Id: I0b05f42b273bf1fd4c412247a9372113b7e40561
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
- Remove obsolete functions and enumeration values
- Remove QObject * parameter from QMetaProperty accessors
- Fix renamed enumerations in QSsl
- Fix list items to be \li
- Fix function signatures and variable names
Change-Id: I37c7e6bf2c8ff92bc7b82620bae0a27796f866ab
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Use QMetaType for constructing a QSqlField, fixing:
ccode/sqldatabase/sqldatabase.cpp:91:41: warning: ‘QSqlField::QSqlField(const QString&, QVariant::Type)’ is deprecated: Use the constructor using a QMetaType instead [-Wdeprecated-declarations]
Change-Id: If420ad3d7f5d9dce05ad892cddf84a1b77a45b3f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The default seed = 0 parameter was missing, so, it was never used.
Manifested as a failing test in Qt for Python (bug_PYSIDE-41.py).
Amends c6cdf38e75.
Change-Id: Ia3db8b6123a695d839fbec419b8d316991d18bf7
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Use pointer to newly inserted element in 'filterList'
since local variable 'filter' goes out of scope at the end
of the block.
This is a follow-up for commit
3e09c28101
("Filechooser portal: Implement "current_filter").
Thanks to Giuseppe D'Angelo for pointing this out in that
commit's Gerrit change.
Pick-to: 5.15
Change-Id: I9af35c46315c7f90721d0d39b0fda6384c15786a
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
QAbstractSocket::abort() is not a virtual function and
QSslSocket::abort() does not override it. Having two alternatives
requires a dynamic typecasting and violates the principles of object-
oriented programming.
Due to the BC, we were unable to fix that in Qt5. Now, we can modify
QSslSocket::close() to handle QAbstractSocket::abort() requests and
remove the duplicate.
Change-Id: I49d6f32a571ae6e35b08cb366816f917e580dae8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
qtgraphicaleffects is not part of 6.0, drop the doc dependency.
Change-Id: I64a355860e0a3a92fa0ffe5ed960796f2e756d61
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Add missing \threadsafe command.
* Add missing note for methods callable only from the started thread.
* Expand note on excerting care when interacting with objects across
threads in QThread's class overview documentation.
Fixes: QTBUG-86112
Pick-to: 5.15
Change-Id: I8f181d92ad6196ff0c13f5a866a36793209a75ab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Export some private functions from QUtf8 to resolve
undefined symbols in Qt5Compat after moving QStringRef.
Task-number: QTBUG-84437
Change-Id: I9046dcb14ed520d8868a511d79da6e721e26f72b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
1. Remove a useless forward declaration of a non-existing class.
2. Simplify the cipher filtering.
3. A missing private key (when local cert is present) found
by the Qt, not OpenSSL, so no need in asking OpenSSL for errors
in queue.
3. Fix a potential double-free (for opaque keys).
4. read/write BIOs normally owned by SSL object, but if
we fail to allocate any of them, we return early,
potentially failing to free the one that was allocated.
Change-Id: Ifb52fbc9fd1a38f101bd7ff02e79b82d6eb7e5b0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
A model is the wrong place to display a modal dialog when a call to
setData failed. The call returns false already, and the caller can
handle the error appropriately, presumably knowing best what failed and
how to present the user with options.
Task-number: QTBUG-66177
Change-Id: I069209d51a577177bc278aeb08a92c95029dc962
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>