Prepare to move it out of QtGui
Task-number: QTBUG-74409
Change-Id: Iefde4945ede27cf3c2f6f50e5a693c03625cadf6
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This is a step in the direction of reducing QWidget usage in the macOS style.
Change-Id: I247f39c2ba46c7fa5be51e01cc41fd8b8a93cea7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
A future change will come that sets it for iOS and friends.
Change-Id: I74b688ee62d24137e3cdf5475e1a9e858698ccf0
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
In case of .qmake.conf not existing, this would result in an infinite loop.
Change-Id: I577aaed7a502efb7b01dc6b199dcf464358bf5a9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The function-local declaration ignores the current namespace and when
linking it will look for a global exported function named
qt_writing_system_for_script instead of the one found in our namespace.
Move the declaration outside of the function to work around it.
Change-Id: I161bf1760e2e4e37d0f548b01bb3bea5ebb9ecdd
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
They all used QGL (which has been removed).
Task-number: QTBUG-74408
Change-Id: Ied003625f14228b4951002a604fce91eaccec102
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
And move the actual implementation from corelib/io to network/kernel
sub-module.
Fixes: QTBUG-80308
Change-Id: I554b05bae3552c68e1e1a405c169366ee19120b2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The implementation of this was based on a misunderstanding of the API. The
GetMatchingFonts() function does not give a sorted list of fonts that
can be used in place of the given family, but just requests the fonts in
the family itself.
Instead, we use the same implementation as in the other two font databases
we have on Windows (moving the implementation to be shared).
Change-Id: I6a7b73e3d8376f7d97f598db0d7b63122ad1940c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
That way not every translation unit generates the QMetaTypeInterface
for the builtin types
Change-Id: Id703c14532646a58f4088e8f3914564ce35e398e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This also fix the normalization algorithm:
- Some 'const' after pointers were not removed as they should.
- No need to keep the space in '> >' and '< :' in C++11 anymore
- Fix normalization of 'long unsigned int' and similar
Change-Id: I2b72f0fede96c1063e7b155d9f25a85fccfc7bf9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
the QMetaType is represented as a pointer to a "vtable" in the form of
a QtPrivate::QMetaTypeInterface*
The recomanded use of QMetaType is to construct an object with
QMetaType::fromType. This does not require any registration.
There is still an id() function which will do some registration
for compatibility with Qt5. Also the patch does not really touch
the other extra things that can be registered (data stream operator,
comparison operator, iteratable, ...) and this still uses the previous
system.
This is only the change in QMetaType, other changes to use it in QVariant
and QMetaObject will follow
Change-Id: Iffad20085cf33f33447f58a68236013a8b60fdbf
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Goes through the Qt code and make sure bytes-per-line calculations are
safe when they are too big for 32bit integers.
Change-Id: I88b2d74b3da82e91407d316aa932a4a37587c0cf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This patch adds a couple of missing compile flags that are defined in
mkspecs/common/msvc-version.conf and mkspecs/common/msvc-desktop.conf
that were not yet ported to CMake.
Change-Id: I9ef0ef71cb0c063699fba4c067e90f6515169baf
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The QGL* classes have been removed and the examples ported to QOpenGL, update
the documentation to reflect that.
Task-number: QTBUG-74408
Change-Id: Ibb4787cdeedc05a807d673943b61838f19092234
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
QGLWidget doesn't exist any more, and has been legacy for a long time, so we
shouldn't try to explain what QOpenGLWidget is in terms of QGLWidget any more.
Task-number: QTBUG-74409
Change-Id: I87ff6c35dfed1303bd6d74621b244e1ed84ceafe
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
It is not possible to exclude targets based on the build configuration
in CMake. loadDebugPlugin() and loadReleasePlugin() will always fail as
both debug and release plugins are built regardless of the build
configuration.
This patch adds the CMAKE_BUILD define and skips the opposite test on
Windows. E.g.: With config = Debug, the loadReleasePlugin() test is
skipped and viceversa.
Change-Id: I2659882604bb39eb11d3e9e2b2b37a2972475285
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Prior to this patch QT_NO_DEBUG would not be correctly set for
generators which support multiple configurations such as Visual Studio
and XCode.
This patch also applies the define to all executables, which was
previously missing.
Change-Id: I16a911d15217a62093c68ba2b4c2545cdb8df1e6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Make the order of visible, group and enabled insignificant, by storing
ignored explicit values of enabled.
Also adds resetEnabled method QQuickAction has on the enabled property.
Change-Id: I9299dec0d1f74fdf655721bb4f72ba565ae85c7a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The implementation here was accidentally missing from the
first commit. We use the OS/2 table for determining the writing system
support as intended by the font designer, and fall back to actually
checking the Unicode ranges if the table should be missing.
Change-Id: Ibfdf76c27f3a94eda2142b3e269a1ca30d4bc045
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
QLinkedList has been moved to Qt5Compat. Remove and stop mentioning
it in docs, examples (the docs & examples for QLinkedList itself will
be moved to Qt5Compat) and remove the corresponding tests.
Also remove QT_NO_LINKED_LIST, since it's not needed anymore.
Task-number: QTBUG-81630
Task-number: QTBUG-80312
Change-Id: I4a8f1105cb60aa87e7fd67e901ec1a27c489aa31
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This patch fixes setting the correct value for the PATH
environment value. Currently, due to Windows' ; path
separator, every list entry was treated as a separate
environment variable that need to be set instead of
properly extending the PATH list.
Change-Id: Ib2fc031397459370beec84f9cb4ec6df7db00df3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Incorrect arguments were being passed to the command which generates the
above file.
Change-Id: I9f06aca30e747e4368c8f6a727a02cb93b936167
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This rewrites 243f4b2a8c
in a more complete and optimized manner
Task-number: QTBUG-81924
Change-Id: I52105a9ede07ce350fad3d50277dd631df371f06
Reviewed-by: Hikaru Terazono (3c1u) <3c1u@vulpesgames.tokyo>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
If we install tests data for non-prefix builds it can cause tests to
fail as they find the data in the wrong location. An example of this is
tst_qsslkey.
Change-Id: I55bd2ff4cb5a0857dc857cb2149ffe4436ec6f99
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
If qt_add_test() is called with OUTPUT_DIRECTORY and no
WORKING_DIRECTORY is specified, default the WORKING_DIRECTORY to the
same value as OUTPUT_DIRECTORY._
Change-Id: If373fe590508ad58d4632e0598cd0d9dddb2ae16
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This replicates the behavior of QMAKE_MACOSX_DEPLOYMENT_TARGET in
qmake.
Change-Id: I273cd26994f2edfc52dc7b6278252c37b65b2356
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Before the patch we set the standard flags in two places:
- once when building qtbase
- and always when including QtSetup (for every repo that is built)
This change makes sure to also set the correct standards flag when
building standalone tests, because QtSetup is called to early in
that case.
Change-Id: Iad130b731e9eb9605bb91637364c33fdd49ce3cb
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Need to pass additional -Zc:__cplusplus flag when using
MSVC, so that the __cplusplus define has correct values.
Additionally make the option be propagated to consumers of Qt
via the public Platform target, which QtCore links against.
Change-Id: Ie1283c25334b93f993529beb7fb32bdb001627f5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Same pattern as QtQuickWidgets. Gets rid of QtOpenGL's dependency on QtWidgets.
Task-number: QTBUG-74409
Change-Id: I4f9b55c23e25a1e0519734037b768a16e870c7d2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
A few places were still referring to the old class name.
Change-Id: Iab99bdda2184c06ad24cb96419e33d4157bddaff
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Disable forkfd when thread is disabled to fix the error below.
forkfd_qt.cpp:(.text+0x953): undefined reference to `pthread_once'
Change-Id: I79414c8ba84d4f5641a64d52b869329f32530c0e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Extract the character in its proper unicode form and encode it in a
new single_character_data table of locale data. Record each entry as
the range within that table that encodes it. Also added an assertion
in the generator script to check that the digits CLDR gives us are a
contiguous sequence in increasing order, as has been assumed by the
C++ code for some time. Lots of number-formatting code now has to take
account of how wide the digits are.
This leaves nowhere for updateSystemPrivate() to record values read
from sys_locale->query(), so we must always consult that function when
accessing these members of the systemData() object. Various internal
users of these single-character fields need the system-or-CLDR value
rather than the raw CLDR value, so move QLocalePrivate's methods to
supply them down to QLocaleData and ensure they check for system
values, where appropriate first.
This allows us to finally support the Chakma language and script, for
whose number system UTF-16 needs surrogate pairs.
Costs 10.8 kB in added data, much of it due to adding two new locales
that need surrogates to represent digits.
[ChangeLog][QtCore][QLocale] Various QLocale methods that returned
single QChar values now return QString values to accommodate those
locales which need a surrogate pair to represent the (single
character) return value.
Fixes: QTBUG-69324
Fixes: QTBUG-81053
Change-Id: I481722d6f5ee266164f09031679a851dfa6e7839
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If necessary, the feature still can be enabled with -feature-ftp.
Task-number: QTBUG-80339
Change-Id: I7dafaad254d1396f24ac5c339d55c3bedfa97f1c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
Previously those would be implicitly casted to qint8, with interesting
results.
Change-Id: I145a737a7ef7a6f5212461b9f6a1fcb5d7780558
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Statemachine had major version 1 in Qt5, and window had major version 2.
Change-Id: I24cc6de5ca9270c61e0dba7d1ee6a61ef84b3018
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
QDataBuffer when used with non trivally copiable types will
try to realloc them, causing GCC to complain.
Change-Id: I778d32d00774b0a53b85257be0064f19d9fb2bb9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The hash function provides rather good mixing of the input bits.
It spreads numbers out evenly through the uint range, a change of
one bit in the input changes around half the output bits, and it is
pretty fast.
Using this as a hash function over the simple hash(int) == int has the
advantage that it reduces the amount of collisions for badly distributed
keys. In addition, it allows us to always use power of two sizes for the
hash table, leading to better performance for inserts and lookups.
the 32 and 64 bit hash functions where chosen from
https://nullprogram.com/blog/2018/07/31/. I selected the ones that give
a very good distribution of the hash values while using the integer for
both multiplication steps. This should be slighty faster than using two
different numbers.
While the result is still being cast to a uint, the method is prepared
so it can handle 64 bit keys and seeds.
Fixes: QTBUG-29009
Change-Id: Id7a1b97b3c0d219e65de2e6e1fe6faf092f8ce16
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>