This patch renames some of the manual test by prefixing them with
tst_manual_ to make sure they are unique in the project structure. This
is a requirement for the CMake port.
Change-Id: I83e2152826e0f95c3378374ab1c9992412022109
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This patch renames some of the manual test by prefixing them with
tst_manual_ to make sure they are unique in the project structure. This
is a requirement for the CMake port.
Change-Id: Ie393b125ce5a35b7069cf006db0f3af8c4fda5b4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
All of these were marked to be removed in Qt 6.
Change-Id: Ifa7aa14abebafdfeda024dcbfa5ae1f7874f387f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Fixes parsing writing and pass-through of integers with
higher precision than double can handle.
Note this adds extra precision compared to JavaScript, but the
JSON files read and written this way are still valid, and the extra
precision in reading and writing this way is used by many JSON
libraries.
Fixes: QTBUG-28560
Change-Id: I30b2415c928d1c34c8cb4e4c6218602095e7e8aa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
There is no excuse for copying several KiBs of data just to iterate
over it, yet that's exactly what Q_FOREACH does.
Besides, this use of Q_FOREACH is being deprecated. In my tree, it's
already a hard error.
Change-Id: I07240c37626f7d284781e8c4be05eef3c7a54f39
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The assumption when calling QStringRef::toString() on a null
QStringRef (i.e. when QStringRef::isNull() is true) is that
QStringRef::toString().isNull() will also return true. With the
current implementation we return a null QString() only when the
QStringRef references a nullptr QString. We need to do the same
also when QStringRef references a QString with null private data.
Change-Id: I4177a5ea187ae758d7c46fe76a9d0583140e90cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The concept was a nice idea to avoid accidental detach() calls
in implicitly shared containers, but it conflicts with a C++11
compatible API for them, with signatures for modifying methods
taking a const_iterator as argument and returning an iterator
(e.g. iterator erase(const_iterator)).
Change-Id: Ia33124bedbd260774a0a66f49aedd84e19c9971b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
[ChangeLog][QtGui] Added QGuiShortcut and made the equivalent
existing classes in Qt Widgets derive from them. This provides
basic functionality for adding shortcut handling in QML.
Fixes: QTBUG-79638
Task-number: QTBUG-76493
Change-Id: I5bbd2c8f192660e93c4690b9f894643275090e4d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Use QT_REQUIRE_CONFIG in the headers of classes to be disabled.
Add headers/source files in the .pro file depending on the configure
feature in libraries and tests.
Add the necessary exclusions and use QT_CONFIG.
Only the widgets/kernel tests were made to compile since also
the buttons depend on the action feature and it would become too
involved.
Task-number: QTBUG-69478
Change-Id: Id5bf88bc108f2bbb14dce8625bfdcb7eb0deb8e3
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
qdom.cpp is too big, move the private classes and internal classes
to new files to make the maintenance and reviews for the upcoming
changes easier.
Task-number: QTBUG-76178
Change-Id: Ibe83bf9104e000d405a07653f4278083e2da648e
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
OpenSSL 1.0.2 will stop receiving all support at the end
of 2019. Qt 5.15 is our next LTS thus makes sense remove
OpenSSL 1.0.2 support there. This also allows us quite
a significant cleanup of an old heavily if-defed code
and all 'pre11' suffixed source files.
[ChangeLog][QtNetwork][SSL] Removed OpenSSL 1.0.x support, now 1.1.x is required
Change-Id: I70c70c56cbd8aeff793afe793335696d1b1b7408
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Re-apply 72e3d3633e, which
was omitted in 425df43d7f.
Task-number: QTBUG-79418
Change-Id: I0afa9ff9ace5bdc6cea103cf2acba6dbf9a64a72
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
972a0402be was merged before one of its
parent patches which changed this QHash into a QMultiHash. So in 5.14
it would overwrite values instead of adding new entries. No idea if it
has caused or will cause any regressions. But it was an accident so
let's fix it.
Amends 972a0402be.
Change-Id: I6623b0b7924024df148d5c83bcbb612f3e595f56
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The short-cut for semi-transparent backgrounds has to take precedence
over the disabled gamma-correction short-cut. The order got inversed
in one function during 5.14 refactoring.
Change-Id: I0e54428839428068b602a13eddbf69897ed0797d
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Call adjustedFormat() as advised by the docs: "Applications are advised
to set this format on their QWindow in order to avoid potential BAD_MATCH
failures."
Task-number: QTBUG-79659
Change-Id: Ibf415fb0ee64bdd3f01d4ba744244bce811c0d27
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Simply moving QAction to QtGui was not deemed possible since
it operates on a set of controls of some kind. The approach to
extract a base class was taken instead, named QGuiAction
following the QGuiApplication scheme. QAction remains in
widgets, but changes base class.
For QActionGroup, the functions addAction(text/icon), which
create an action, cannot be implemented in QtGui, hence a base
class is needed, too (unless they are deprecated and removed).
- Extract base classes providing functionality not based on
QtWidgets, using virtuals in QGuiActionPrivate to provide
customization points
- Change QActionEvent to take QGuiAction, removing
the need to forward declare QAction in QtGui
[ChangeLog][QtGui] Added QGuiAction(Group) and made the equivalent
existing classes in Qt Widgets derive from them. This provides
basic functionality for implementing actions in QML.
Task-number: QTBUG-69478
Change-Id: Ic490a5e3470939ee8af612d46ff41d4c8c91fbdf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The functions for standard file system operations simply delegate to
the static functions in QFileSystemEngine, which are then implemented
separately for each platform. There is no need for the wrappers in
QFSFileEngine to be separately implemented as well.
The only noticeable difference between Unix and Windows versions was
the clearing of the meta data in QFSFileEngine::remove, which was only
done on Unix. This is now also done on Windows.
As a fly-by fix, correct the (internal only) documentation about case
sensitivity.
Change-Id: I274b34d5407fdfff2e0a2157bb5220607740a92a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Had to teach the update program to accept category Lm as for
Joining_Transparent, for the sake of a new ArabicShaping.txt entry.
Added three new Unicode versions, several new scripts and a new
word-break class.
Updated UCD's test data for tst_QTextBoundaryFinder. This left 57
tests failing; I have commented out the data rows for those tests,
pending someone with more knowledge addressing this.
Task-number: QTBUG-79631
Task-number: QTBUG-79418
Change-Id: Ic33d3b3551195d47a84d98e84020f57a68f0b201
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The support for unsharable containers has been deprecated
since Qt 5.3.0, so let's finally remove support for them.
Change-Id: I9be31f55208ae4750e8020b10b6e4ad7e8fb3e0e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
We now avoid flushing GL if the exposed size does not match the window
size, so we don't need to halt update request delivery during resize.
Change-Id: Iaa89e67d50c987757a586b5958e08edf71a5dd0c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Remove the class docs for QList and make it point to QVector. Adjust
containers documentation and replace QList with QVector in there.
Change-Id: I37f712d91b21ad78e017faf9d71cac66f64440b0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
In Qt6 QList is just a typedef to QVector. To keep Qt5 behavior
compatibility we need to register aliases, otherwise some type name
based operations would not work. The patch adds automatic
registration of QList metatype alias for every QVector.
The patch doesn't cover usage of already typedef'ed and aliased
QList and QVector, but that should be quite esoteric, especially
after introduction of automatic QList and QVector type registration.
Change-Id: I84672dda2b159d94e76cdc6034861e7d7ef52533
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This is almost 100% source compatible with Qt 5. Exceptions are
* Stability of references for large or non movable types
* taking a PMF for types that are now overloaded with r-value references
in QVector
* The missing prepend optimization in QVector (that is still planned
to come for Qt 6)
Change-Id: I96d44553304dd623def9c70d6fea8fa2fb0373b0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Extend QVector with special methods for QByteArray and QString,
just as QList had them in Qt 5.
This also means that QStringList and QByteArrayList
are now implemented through a QVector, not a QList anymore.
QListIterator<QString> is now slightly source incompatible as QStringList
is a QVector, but that will be fixed in a follow-up change when
QList<QString> will start mapping to a QVector.
Change-Id: I7cfb8a72d4d95b347bbd386892f244b7203b41c2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
We're passing a pointer into the Listener struct to
Windows API, so ensure we keep that pointer valid even
when our container changes.
Change-Id: I32b8de8cd959ecc7f574063451ed7238b69e7125
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The q_items list is only used to hold a full list of all items in the
layout. They are kept in order for a linear layout, so that users see
them in the right order, but there's no real guarantee for that anyway
if combined with spacers and other non-items.
Continue to try keeping the order, but ensure indices that are out of
bounds are treated as appends to the list.
Change-Id: I22721c1fa8b329c5d16ad00c5cb780e099693cda
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This can be expensive. We don't expect files to be added to the
directory while qmake is running, and if that happened, the result would
be unpredictable anyway.
Change-Id: I5db93132046c1284130bbe51ce1ecd2a14665206
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
examples/corelib/tools/customtypesending/window.cpp: In member function ‘void Window::sendMessage()’:
examples/corelib/tools/customtypesending/window.cpp:79:71: warning: implicitly-declared ‘Message& Message::operator=(const Message&)’ is deprecated [-Wdeprecated-copy]
79 | thisMessage = Message(editor->toPlainText(), thisMessage.headers());
| ^
In file included from examples/corelib/tools/customtypesending/window.h:55,
from examples/corelib/tools/customtypesending/window.cpp:52:
examples/corelib/tools/customtypesending/message.h:62:5: note: because ‘Message’ has user-provided ‘Message::Message(const Message&)’
62 | Message(const Message &other);
| ^~~~~~~
examples/corelib/tools/customtypesending/window.cpp: In member function ‘void Window::setMessage(const Message&)’:
examples/corelib/tools/customtypesending/window.cpp:87:19: warning: implicitly-declared ‘Message& Message::operator=(const Message&)’ is deprecated [-Wdeprecated-copy]
87 | thisMessage = message;
| ^~~~~~~
In file included from examples/corelib/tools/customtypesending/window.h:55,
from examples/corelib/tools/customtypesending/window.cpp:52:
examples/corelib/tools/customtypesending/message.h:62:5: note: because ‘Message’ has user-provided ‘Message::Message(const Message&)’
62 | Message(const Message &other);
| ^~~~~~~
Change-Id: I563d53f7dd1e0e0dc5fd4db06299b2d0a70c62ff
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Do this by templating the floating-point tests, which removes some
existing duplication as well as avoiding new duplication. Did some
renaming in the process. Added some tests of fuzzyCompare that come
closer to its boundary. Increased number of tests from 69 to 97. Use
std::numeric_limits to replace assorted hard-coded constants and old
C-library boundary-value macros.
It turns out MSVC's float conflates quiet and signaling NaN (although
MinGW's doesn't); and WebAssembly's old fastcomp compiler conflates
NaNs for both float and double; so XFAIL the test for distinct NaNs in
those cases.
Change-Id: I0a1c0d2f68f75d51b8cda9e3ddfe7fa9c190a3e2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
Img width and height are separate tags. Alternatively, they could
be defined in the style tag.
Change-Id: I0a4a93b63a99a7b644e9096bb9238739f408c0df
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This matches the intended use of this function. Reformat
to modern Qt style.
Change-Id: I076d2bdb3ac14b346f0dc6934f7a47765badc6b0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Binary JSON is said to become deprecated. Therefore, add support
for CBOR. Binary JSON is still supported for deserialization, so
all existing .qsb files will continue to work, as long as the
binaryjson feature is enabled in the Qt build.
Also makes QShaderDescription comparable. This is important for
tests in particular.
A nice side effect of using CBOR is that .qsb files become smaller.
For a typical Qt Quick material shader this can mean a reduction of
300 bytes or more.
Task-number: QTBUG-79576
Change-Id: I5547c0266e3e8128c9653e954e47487352267f71
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Testes file load and save, computes a sha256 hash
for verifying file content.
Change-Id: Id7f697c4dfd41e051442350f4050f04b493cfc18
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Change-Id: I31b4ed6e6597e22172dcca7180750f1392b9ad68
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The macro is not documented, so can be considered private API.
Pre-C++11 compilers that don't support alignas will no longer be
supported with Qt 6.
The macro definition for the standard case of compilers supporting
the alignof keyword is left in place.
Task-number: QTBUG-76414
Change-Id: I7d722e4faf09ae998a972d3ed914de808ab316d7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The macro is not documented, so not part of the public Qt API. It is
made obsolete by the alignof keyword in C++11.
Remove the usage of the macro across qtbase, in particular the
workarounds for compilers that didn't support alignof, and that will
not be supported in Qt 6.
The macro definition is left in place, no need to break existing
code.
Task-number: QTBUG-76414
Change-Id: I1cfedcd4dd748128696cdfb546d97aae4f98c3da
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The recent change to support android with CMake assumes that the user
project will have add_library(foo SHARED), and sets the
CMAKE_SHARED_LIBRARY_SUFFIX_CXX variable to modify the final library
name to contain an ABI suffix.
This did not work when using add_library(foo MODULE), and
androiddeployqt failed saying it can't find the application binary.
Make sure to apply the ABI suffix to MODULE targets. Also cover
the suffix to be added regardless if the language used for compiling
the SO is C or C++.
Amends 52c799ed44
Change-Id: Ic44d67e33a123bd0104d98b368ceda0844474980
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>