Use syncqt.pl from QT_HOST_PATH if that is given, since qtbase
sources might not be available and CMAKE_INSTALL_PREFIX doesn't
check for sysroot.
Change-Id: I165b17a5a02fd4dbb2340bf69a641b8aaab8fabd
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Our ALPN-related definitions were conditioned both on OPENSSL_NO_NEXTPROTONEG
and OpenSSL version (since ALPN first was introduced in 1.0.2), but
resolving was only under version check, not OPENSSL_NO_NEXTPROTONEG.
This went unnoticed for many years, and was found only recently with
OpenSSL built with no-nexprotoneg.
Fixes: QTBUG-81762
Change-Id: I7afca0b2034a234a19b5bcdefd3ce26f4202cddb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Remove retained file feature as the expected behavior now is for the
compiled file to be retained by default.
Change-Id: I5a791a182825b223eb4497970fbb1c47c70135cc
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
While the single-line-case format is more readable when consistently
applied through the whole switch, it works less well when several of
the cases are too complex to fit on a single line.
Change-Id: I6a84a3d3d1493dadddab103da0336a8ef860563c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Back-ends need to catch NULL data so as not to call system APIs with
invalid pointers.
[ChangeLog][QtCore][QCollator] Fixed a regression introduced in 5.14.0
that caused QCollator not to operate with default-constructed QStrings
and print a warning on Windows.
Fixes: QTBUG-81673
Change-Id: I2eafe1e188b436afcca3cf2ecdf98bba707c44c9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
And remove in Qt 6 (with private API remaining).
[ChangeLog][Deprecation Notice] QUrl::topLevelDomain() was deprecated in 5.15 and will be removed in 6.0
Task-number: QTBUG-80308
Change-Id: Ie053c9c8813274c971e2d6fc442dd6ce716fadf1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
[ChangeLog][Deprecation Notice] QLinkedList is deprecated and will be
moved to Qt5Compat in Qt 6. It is recommended to use std::list instead.
Task-number: QTBUG-81630
Task-number: QTBUG-80312
Change-Id: I2c2b64e51d1cc2fd305aee6a11e9a89788f51eb4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Building of qmake fails with clang 10 due to QStorageInfo symbols not
being resolved. Since bootstrapped tools don't need this functionality,
we can remove the respective code and make the function fail as "not
implemented".
Change-Id: I48bbbd822e4f70630d903e5caead1a08fe4f13a8
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
This ammends 601ce9e08a, which added
a new test case for the internal Qt APIs. The test was not
getting executed by coin as it wasn't included in the io.pro file,
and trying to fix that generates link errors on Windows, since these
internal APIs depend on other internal APIs.
Short of bootstrapping much of QtCore into this test case, the only
sensible option is to remove this test case again, and cover the
testing when the public API is added in a follow up commit.
At the same time, address those failures that were discovered
on platforms that could build the test, and fix compilation on
iOS platforms in Coin.
Change-Id: Id31b43c9df9f205476c48bccb6b87c7a53ed15c5
Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
Adds an opt-in experimental DirectWrite-based font database.
This cannot be the 100% replacement for GDI unfortunately, since
quite a few font formats used on Windows are still unsupported.
But it would be good to have it as an opt-in experimental feature
since it should make it easier to solve multiple font selection
issues we have on Windows.
In order to still share the DirectWrite-specific code between
the old and new database, this introduces a common base class.
Note that the feature depends on DirectWrite 3 support (Windows 10).
Fixes: QTBUG-74917
Change-Id: Ida08ec7ef4fda9fc78622ca4297909a727390a64
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This particular test may serve as sample code in various materials in
the future, therefore it is highly beneficial if it is kept in good shape.
Make it easier to read, more compact, and split up among the natural
boundaries of the functionality (global setup in main, window+swapchain
management in Window, graphics resource setup and draw call recording
in HelloWindow).
Change-Id: I2451d3961a01131dcbffe66baf23d2cf9bfd077f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
QWindow::mapToGlobal() expects pos to be in device-independent pixels,
while in reality it's in device pixels.
We need to use QXcbWindow::mapToGlobal(), which operates on physical
pixels.
Change-Id: I8dcad5cc1f5d55df7950b36d97af5ce4b983ed54
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
QPlatformBackingStore had a dependency on the QOpenGLTextureBlitter, which is a
problem because we want to get rid of all the public QOpenGL* classes in the
gui module.
This splits the heavily QOpenGL dependent parts of the backing store
implementation into a separate class and moves it to the platformcompositor
module.
qplatformbackingstore.cpp is now mostly free from OpenGL implementation
details.
Platform integrations now have to explicitly request backing store OpenGL
support. This has been done for:
- xcb
- windows
- cocoa
- winrt
- android
- wasm
- ios
QPlatformGraphicsBufferHelper::lockAndBindToTexture is now exported so it can
be used from other modules.
Task-number: QTBUG-74409
Change-Id: I42ad9250e5a424939cf751a8ad880c7381ede2ae
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Cascade Lake (CLX) added AVX512VNNI, Ice Lake has added that plus the
integer multiplication (IFMA), the vector bit manipulation instructions
(VBMI and VBMI2), bit algorithms (BITALG), the extended vector AES
instructions (VAES), among others.
I haven't turned on the configure check for those yet. I believe the
VBMI and IFMA instructions will be interesting for Qt image algorithms,
but we'll need some Ice Lakes to do benchmarking on.
Change-Id: Ib5d667bf77a740c28d2efffd15cb43dd821d4b2d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Having a QtCore build optimized for AVX2 does not imply all user
binaries and libraries are optimized the same way. Most of them will
actually have been built for the base platform, which means they require
access to these tables to operate if they are using qfloat16.
Introduced by 5e40d3d982.
Change-Id: If79a52e476594446baccfffd15ee2da9e3693cce
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
There's no need to specialize the marshalling for QList, QHash and QMap
when we can simply have generic code here that works for all containers
Change-Id: I442ac6009953d2bd8e5a7012262cffeb8e912034
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Those classes will not have relations anymore in Qt6, so they need
separate streaming operators. Writing of multi maps/hashes requires some
additional care so that restoring keeps the order of how iteme have been
inserted.
Change-Id: If41d0c5c24962764a2cb81bd2de9e2fadf1a2b63
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
qmake relies heavily on stable references to nodes stored within the
container. QHash in Qt6 doesn't offer that guarantee, so use a QMap
instead, that supports this.
Change-Id: Ifcf3d67098585ea26f4e02f4570d407a56e33c9c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This is a consequence of QHash being separated from QMultiHash.
Change-Id: Id3bb585c9882ecbaa02691c8ba6553748dd21a24
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This pulls the CMake port, which not only adds CMake files but also
modifies existing code. A brief summary of "seemingly unrelated" changes:
* configure.json was re-formatted to not use multi-line strings. That
is an extension of the Qt JSON parser but not JSON compliant, which
is needed for the configure.json-to-cmake conversion script (python).
* Some moc inclusions were added due to CMake's slightly different way
of handling moc. With the changes the files build with qmake and cmake.
* Since CMake just grep's for the Q_OBJECT macro to determine whether to
call moc (instead of doing pre-processing like qmake), the existing use
of "Q_OBJECT" in our documentation was changed to \Q_OBJECT, which cmake
doesn't see and which is now a qdoc macro.
* QTestLib's qFindTestData was extended to also search in the source
directory known at build time.
What this change also brings is a new way of building modules in Coin by using
YAML configuration files that describe the steps of building and testing in Coin
specific terms. The platform configuration files in qt5 are instructed to use the
old Coin built-in way of testing ("UseLegacyInstructions" feature) but for any
configurations that do not have this, these yaml files in the coin/ sub-directory
are used and shared across repositories.
Change-Id: I1d832c3400e8d6945ad787024ba60e7440225c08
On macOS it's possible to configure the system locale to not do digit
grouping (separating "thousands", in most western locales); it then
returns an empty string when asked for the grouping character, which
QLocale's system-configuration then ignored, falling back on using the
base UI locale's grouping separator. This could lead to the same
separator being used for decimal and grouping, which should never
happen, least of all when configured to not group at all.
In order to notice when this happens, query() must take care to return
an empty QString (as a QVariant, which is then non-null) when it *has*
a value for the locale property, and that value is empty, as opposed
to a null QVariant when it doesn't find a configured value. The caller
can then distinguish the two cases.
Furthermore, the group and decimal separators need to be distinct, so
we need to take care to avoid cases where the system overrides one
with what the CLDR has given for the other and doesn't over-ride that
other.
Only presently implemented for macOS and MS-Win, since the (other)
Unix implementation of the system locale returns single QChar values
for the numeric tokens - see QTBUG-69324, QTBUG-81053.
Fixes: QTBUG-80459
Change-Id: Ic3fbb0fb86e974604a60781378b09abc13bab15d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
MS's documentation says empty means "+" here, so implement that
fallback (which shall over-ride whatever the CLDR has given us for the
fallbackUiLanguage's positive sign).
Task-number: QTBUG-81530
Change-Id: Ic3f10dd061d0c46d1433f29b8065988da94c38e6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
An empty string, when packaged as a QVariant, is non-null (as a
QVariant); and QSystemLocale::query()'s callers care about the
difference.
Some callers of the internal getLocaleInfo(LCTYPE type, int maxlen)
need an actual QString return, while others are what query() returns,
so need to return a QVariant; where the former want an empty string,
the latter need a null QVariant. So make that getLocaleInfo() into a
template, so callers can chose QString or QVariant as return type,
only affecting the failure returns.
Change-Id: I7b9a698badedc0e0d8aef8c6e85c22931c33297a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The "title" in markdown is the tooltip, not the name attribute of
a link. Also, tell the char format that it's an anchor.
Change-Id: I2978848ec6705fe16376d6fe17f31007cce4b801
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Given we feed UTF-8 data into the importer, it must be able to cope
with Unicode. Build md4c with UTF-8 support, advertise it at
usage site, and change a couple of broken decodings.
Driveby: the textedit example used the wrong codec to decode
a Markdown file. While the Markdown spec doesn't deal with encodings,
using the default one for HTML is certainly wrong. Port the loading
of both markdown and plaintext to UTF-8, as that what _saving_
via QTextDocumentWriter would use by default.
Change-Id: I51c6214cfe45ebfc5a67a7366f7866a5328366ec
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The reporter was probably named 'xunit' based on the historical use of
xUnit to refer to testing frameworks derived from Smalltalk's SUnit.
These frameworks typically added their own prefix, e.g. JUnit for Java,
RUnit for R, etc.
The most popular of these was the JUnit framework, and the corresponding
XML output produced by the Ant built tool became somewhat of a de facto
standard, which is probably why we chose to model our reporter after it.
Nowadays however, naming it 'xunit' is problematic as there is actually
a testing famework named xUnit.net, typically shortened to, you guessed
it: xunit.
Test report consumers will typically have a junit mode, and an xunit
mode, and the latter could easily be mistaken for what testlib outputs,
unless we clarify this.
The clarification also allows us to safely extend our support for the
JUnit XML format to incorporate some elements that are nowadays common,
but where we are lagging behind the standard.
[ChangeLog][QTestLib] The formerly named 'xunitxml' test reporter has
been renamed to what it actually is: a JUnit test reporter, and is now
triggered by passing -o junitxml to the test binary.
Change-Id: Ieb20d3d2b5905c74e55b98174948cc70870c0ef9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Quick 3D is now having a use case for calling this directly, so use this
opportunity for enhancing the docs to make it clear what this is about.
Change-Id: I19ec956ac25175dbfb754192abaad8d65a6eeb0e
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This patch optimizes setCursor() by invoking view->items(position) only
if the current graphics item is under the mouse cursor. If it is not,
setting the cursor for this item should not have any effect on the
actually currently visible mouse cursor, so there should be no
reason to call _q_setViewportCursor() at all in this case, so
it is not necessary to query for all the items under the cursor
position.
In my use case this gives a significant performance improvement
from slow behavior to almost immediately (Linux with X11).
My scenario is that I have many rectangular graphic items next to each
other in a graphics view, and there is the functionality to add one
more graphics item (a "handle") to one of those rectangular graphics
items, and then for this new "handle" a new graphics item will be
added on each of the other existing rectangular graphics items.
The ctor of the "handle" graphics item calls
setCursor(Qt::OpenHandCursor). QGraphicsItem::setCursor() calls
view->item(cursorPosition), and then updates the visible cursor
according to the top most graphics item under the cursor.
So assuming that there are e.g. 1000 rectangular graphics items next
to each other, each showing e.g. 5 "handle" graphic items, adding one
more "handle" graphics item will add one graphics item on each of the
1000 rectangular items, so 1000 times view->items(cursorPos) will be
called, at the beginning with 6000 graphic items (1000 rectangles and
5000 handles) already in the scene, for the last one with 6999 items
in the scene (999 "handles" have been already added), from which the
ones under the cursor have to be found.
This is basically O^2 complexity. With the patch it changes to
linear regarding the number of rectangular graphics items.
Change-Id: I9836fc710a8f11d01a94930ea64c6c946e0db282
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
If we don't add the executable used by the custom_target and/or
custom_command to list of the command's/target's dependencies
(DEPENDS) the generated file will not update should the executable
change.
Change-Id: Idce30f3dd4f756d9e8f6848c5e16f5dd6c7c8f0a
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This flag has been deprecated, but until we remove it completely
we need to continue supporting it, so we just suppress the warnings
for now.
Change-Id: I464e1cce42f78af76d46ec12eeb3e8d53d64d6a3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reaching a certain number of characters, OutputDebugString will just eat
the string and not give any output. As there is no way of handling that
error properly we divide the string into usable chunks.
Fixes: QTBUG-80996
Change-Id: Ic7ef34c48c212cbaec3a03790d1020506b7b4319
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
When support for MariaDB was added in
947704cefe the key 'MARIADB' was not added
to the json file.
Change-Id: I8565a4a3804028806c1d2ff992329ece24de3fc5
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
The controls as drawn by the UxTheme library are too tiny; add an
additional correction factor to
QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), allowing
to scale the result via the QImage.
For the MDI button size, calulcate the factor by comparing the
theme size to the subcontrol rectangle.
Fixes: QTBUG-75927
Change-Id: Iab0911b51d13f3de0d9278a32cb4598ce709d745
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Fix a small typo in the link to vcredist.exe
Change-Id: I8b2724bd01889ac439bcd1a762a7c74df9882492
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>