This is a prerequisite for building the bundled 3rd party libraries.
Because the feature evaluation will be moved into src/CMakeLists.txt,
some of the X11 packages were found in the src dir, and then a second
time inside the x11-related projects.
These qt_find_package calls in the x11 related projects tried to
promote the imported targets to global, which failed, because they were
created in a different directory scope.
To avoid this, the special case qt_find_package calls are removed from
the nested projects.
Also, fix the mapping of some of the x11 libraries to be correct
- xkbcommon_x11 was incorrectly mapped to XKB::XKB instead of the
xkb common x11 library
- xlib was mapped to xcb, whereas X11 is the correct CMake target
Change-Id: I30781b2ecbdd478c98419b14baa0492037e49c61
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Libraries created with qt_add_3rdparty_library should be installed
when the qmake 'installed' value is set in CONFIG. Introduce a new
INSTALL option to handle that in CMake projects.
If the value is provided, the library should always be installed
regardless of whether it's a shared or static library.
Fix the libraries to be installed to BINDIR/LIBDIR instead of
the config install dir.
Also install the CMake config files into the config install dir.
Change-Id: I86f1ef47680f08669a77db77e0d986f47d5fae2d
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Useful for header only modules that are declared in the same directory
as a regular module, but which doesn't have any features and thus has
no qtfoo-config.h file.
Will be used for the qtzlib module, which is built when system_zlib
feature is disabled.
Change-Id: I60c5f73c3e2a3a481a16c5872e06d5d109a04b10
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The QT_COMPILE_OPTIONS_WARNINGS_OFF property can be set on targets
in order to disable adding the default compiler warnings flags.
This is useful when building 3rd party library code.
Change-Id: I9f58ca4543b5ea0d2051b7f94f0042d24c4e3a16
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This template function streams the given object into a QDebug instance
that operates on a string, and then returns that string.
This function is useful for cases where you need the textual
representation of an object for debugging, but cannot use operator<<.
A good example of this is when writing tests where you want to provide
a useful failure message involving details about an object, but must
provide it in a string to e.g. QVERIFY2.
[ChangeLog][QtCore][QDebug] Added static template toString() function,
which streams the given object into a QDebug instance that operates on
a string, and then returns that string.
Fixes: QTBUG-82309
Change-Id: I8411394e899dedad19cec788d779a4515d52ba11
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
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>