Commit Graph

49054 Commits

Author SHA1 Message Date
Edward Welbourne
e330a9bb44 Replace fallbackUiLocaleData() with fallbackUiLocaleIndex()
This means always initializing globalLocaleData from an entry in the
locale_data array, where in principle the fallbackUiLocale() could be
the system locale, which isn't held in the array. However, no actual
implementation of fallbackUiLocale() uses the system locale (nor is it
clear this would work if one did).

Change-Id: Ie1c5ef3e8a97f21e0d82fa2dfb3cf3eb9e4c8840
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2020-11-08 13:00:39 +01:00
Edward Welbourne
902a5a1ff4 Rename QLocalePrivate's m_data_offset to m_index
Change-Id: I1d27e6e57893c2f96df40746e1280fc8428e9ec1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2020-11-08 13:00:31 +01:00
Edward Welbourne
cc33b977ff QLocale: Compare to &globalLocaleData instead of systemData()
Calling systemData() locks a mutex but the tests against its return
are just testing whether some m_data we're looking at is the
&globalLocaleData it's returning; any other m_data points into the
locale_data global array. So bypass the expensive mutex for these
tests and just compare against the pointer systemData() would be
returning.

Thanks to Andreas Buhr <andreas.buhr@qt.io> for the analysis that
showed the need for this.

Task-number: QTBUG-87330
Change-Id: Ib06233773511dc9d532cb4658319b6d589d17b56
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-11-08 13:00:24 +01:00
Edward Welbourne
7d81f21d48 Always pass index when creating a QLocalePrivate
Previously, two calls using the default locale (which has an index in
the locale_data array when it isn't the system locale) neglected to
pass the index and the call for the system locale had no idnex, where
it should really set the index appropriate to its language, script and
country, so that we get appropriate calendar data to go with the
system locale. One other place that handled the default locale also
neglected to revise the index it was using.

Change-Id: I4cc52e2d085a99e61236c91c0ae873b3bde5f11d
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-08 13:00:17 +01:00
Edward Welbourne
297cbd506f QLocale: use uint less
Various uses of uint were simply redundant, now that Language, Script
and Country are ushort-based. Others should in any case have been
quint16 or char32_t.

Change-Id: Id0d0dc2558e1724907907cde56059f70972e824a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-11-08 13:00:09 +01:00
Edward Welbourne
098f43fdd2 Use QLocaleId in place of language, script, country triples
Pass a single argument in place of three; and (prepare to) replace
QLocalePrivate::getLangAndCountry(), taking three out parameters, with
QLocaleId::fromName(). Removal of getLangAndCountry() must wait for
removal of linguist's use of it in qttools, which has to wait for this
change to land in qtbase. In the process, change findLocaleIndex()'s
return to int.

Change-Id: I9f5c44c41f2dd1598c53ed5ccb0abddc6b17d21f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-11-08 13:00:01 +01:00
Edward Welbourne
38b6cf490d Rework finding of locale data to be index-based
Instead of returning a pointer (from which we then have to infer an
index for use in calendar data access), compute the index as primary
and infer the data pointer from it. Also refer to the index as such,
rather than as an offset.

Comments advocating this wanted to dispense with the pointer entirely;
that's not an option, however, due to the system locale having its
data in a separate object, outside the array that contains all the
other locales' data.

Change-Id: I1c60e688229394003e61372dbfc6cfb11086eafa
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-08 12:59:49 +01:00
Andreas Buhr
98f4c97768 Correct processEvents documentation
The documentation of processEvents states that it processes all
pending events. However, this is not true for the glib backend
and probably was not true for at least a decade.
QEventDispatcherGlib::processEvents(ProcessEventsFlags)
calls "g_main_context_iteration" which is documented
to only process events of highest priority:
https://developer.gnome.org/glib/2.66/glib-The-Main-Event-Loop.html#g-main-context-iteration

Fixes: QTBUG-87307
Task-number: QTBUG-84291
Pick-to: 5.15
Change-Id: I82c6f9dba865bb07f981ad648a128316749682ca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-08 12:07:24 +01:00
Volker Hilsheimer
b14b1c99f8 Rename QRangeCollection to QPageRanges, make it a proper value type
The type is specific about printing, so give it a name in line with
QPageLayout and QPageSize.

As per API review comment, it's not clear why this type should not be a
regular, copyable and movable value type. It stores a list of intervals.
Give it value-type semantics, as an implicitly shared class.

Convert the parse method into a static factory function.

Add a Range type and use it instead of the semantic-free QPair.
Move QPrinter getter into QPagedPainteDevice, make it return a copy
rather than a pointer, and add a setter.

Extend test case to cover all members and more merge cases. Fix bugs
found that way.

Fixes: QTBUG-88113
Change-Id: If17ea4d410d49f16b097e88b7979db5d72add820
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-11-08 11:49:54 +01:00
Edward Welbourne
8bf36025f5 Add some inline methods to make code more readable
Give QLocaleId matchesAny() and isValid() checks and some acceptance
tests for their use as filters. Give QLocaleData a QLocaleId id().
A few messy pieces of code get easier to read.

In the process, greatly simplify a do-while loop (sacrificing some
pretest-before-loop optimizations - benchmarking shows they made
negligible difference) and change a while loop to match its form,
since it was doing essentially the same iteration and (thus) its
condition was guaranteed true on the first iteration.

Change-Id: I36b1a6ca8a3cf350b3f3abbe75b177e5a7637cd8
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-11-08 03:14:11 +01:00
Edward Welbourne
d11bf5fc24 Check our enumdata.py tables are consistent with CLDR
Compare the code->name mappings we're using to the ones CLDR's
common/main/en.xml provides; report discrepancies. Tolerate tags
missing from en.xml if they're known to the locale-inheritance
machinery.

Change-Id: Ibe96c18bf55984a35de3b3644f3586a9f30720b2
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-11-08 03:14:00 +01:00
Giuseppe D'Angelo
dcbc8f16d0 Be explicit in a uint->QChar conversion
And check that the result fits.

Change-Id: Iaee1085315559bdffea9400b94b29869621ab7ff
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-08 03:13:31 +01:00
Giuseppe D'Angelo
d0a4084cbf QSharedMemory: do not abuse QChar in a test
The set() function sets a given byte in shared memory. Thus,
just take a char, not a QChar.

Change-Id: I6f3d148eb730573070832ddce6f63363408790cf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-08 02:13:22 +00:00
Alexey Edelev
2433e5804c CMake: Locate zstd using CONFIG
Trying to locate zstd package configuration prior to use pkg-config.

Define explicit IMPORTED_LOCATION_DEBUG and IMPORTED_LOCATION_RELEASE
in case of pkg-config usage.

Fixes: QTBUG-88091
Change-Id: I3cb86a66fad4e7b78b3d2fcff061508fc25e25a7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-08 03:13:13 +01:00
Alexey Edelev
a66e5a3eca CMake: Add PCRE2 library selection depend on debug version availability
Use select_library_configurations to select applicable libraries
set for PCRE2.

Fixes: QTBUG-88092
Change-Id: I11e669a0142d53a3c344c86bd1d8eb797df4ba97
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-08 03:13:03 +01:00
Lu YaNing
ebf753d0ee Fix qstylesheetstyle clip border error
The left border path clip error when border size is odd.
That because borderClip calc path with border with divide 2.
It should be 2.0 that make result to accurately real number.

Pick-to: 5.15
Change-Id: I8c6f358afa4f3c8c9e5b263707ee145f6e5491c0
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-11-08 10:12:17 +08:00
Volker Hilsheimer
e48655d6f3 Fix typos in QtConcurrent documentation
Correct misplaced r-value references.

Change-Id: I3aa641a4e055b2f907bd5c05cfccf2933c74d5bc
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-11-08 03:12:06 +01:00
Volker Hilsheimer
c5a51926d6 Revert "Refine {QString, QBA}::reallocData() logic"
This reverts commit 504972f838.

Introduced realloc failures in qdoc.

Task-number: QTBUG-88258
Change-Id: I953e8d3933085022c75068af357ec9a44ab7e984
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-11-08 03:11:55 +01:00
Cristian Adam
0b0118ef28 CMake Build: Fix CMake configure with -DFEATURE_schannel=ON
When -DFEATURE_schannel=ON, -DFEATURE_ssl=ON, and -DFEATURE_openssl=OFF
cmake configuration would fail.

Fixes: QTBUG-88126
Change-Id: I7325a6c6bc4b9ff448893c7f05b7f46c34eefc1e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-11-07 19:33:37 +01:00
Alexandru Croitor
2db41fefa0 CMake: Allow using a custom target for qt_internal_add_docs
Some repos (like qtimageformats) might not have Qt modules, but they
still need a target to pass to qt_internal_add_docs().

Allow passing custom targets to qt_internal_add_docs() without trying
to generate bogus include paths.

Change-Id: I12191e5b16c082e62e40c96d0eb4d6c0256e7ea4
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-07 19:33:37 +01:00
Alexandru Croitor
36c864729a CMake: Fix iOS platform plugin not being a default plugin
It used to be a default plugin always due to a bug in the default
plugin logic, but after the fix in
1b4ea4a1d8
it stopped being the default one. Fix it by checking for the
QT_QPA_DEFAULT_PLATFORM variable.

Task-number: QTBUG-88201
Change-Id: I39caacf90ae7c6f67d2a89472d99346d7f811840
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-07 19:33:37 +01:00
Alexandru Croitor
d38b29bfa6 CMake: Private module pri files should have internal_module
Change-Id: I35b4111e4044ae6283eb8175173453db9001c71b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-07 19:33:37 +01:00
Kai Koehne
ea0f81a6b2 configure: Fix call without options
Previously this would result in config.opt file not being written.

Change-Id: I9ce349a7cda9f399fa789a569e46138ea90769f5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-11-07 19:33:37 +01:00
Alexandru Croitor
f5b214130a tests: Blacklist tst_qwindow failing test on Windows
Amends b13bad3ab0

Task-number: QTBUG-35109
Task-number: QTBUG-88250
Change-Id: I0b37369bb7cfc58e6968ca20969725e2f4143200
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-11-07 19:33:37 +01:00
Giuseppe D'Angelo
6702614c97 QStringView test: avoid narrowing
Use '\0' (char) instead of 0 (int).

Change-Id: I866d08e7b07ae555fcf0244a8614e3e04a0bc567
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-07 19:33:36 +01:00
Allan Sandfeld Jensen
86702fa29c Protect QImage colorspace transform on shutdown
Adding a check here similar to fixups in other threaded qimage routines.

Pick-to: 5.15
Change-Id: If7bf7aa0ef78cda15171c9038f41b281fb267dae
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-11-07 16:05:30 +01:00
Aleksei Nikiforov
b5feb28d63 xcb: ensure that available glx version is greater than requested one or equal to it
Otherwise xcb plugin may report that it's supported
and later it'd be unable to create opengl context
when requested due to too low xcb protocol version available,
and thus some important xcb functions missing.

Without such change when Qt application is running under
x2go it exits with fatal error due to mismatch in
requested and supported glx protocol versions.
Qt requests glx protocol version 1.4, while x2go currently
reports that it support glx protocol but only version 1.2,
but Qt uses functions such as glXChooseFBConfig and
glXGetVisualFromFBConfig which are available only starting with
glx protocol version 1.3 according to glx documentation.

With this change, when Qt application is running under x2go,
xcb plugin reports that it's not supported and egl plugin
is used instead. And egl plugin successfully allows to work
with opengl, and thus Qt application is running normally.

Pick-to: 5.15
Change-Id: I5c0fb10bd328da68054bfca8e8efde1144789566
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-11-07 14:32:43 +03:00
Shawn Rutledge
f5c7799f59 Support the markdown underline extension
MarkdownDialectGitHub now includes this feature, so *emph* is italicized
and _emph_ is underlined. This is a better fit for QTextDocument capabilities;
until now, _underlined_ markdown could be read, but would be rendered with
italics, because in CommonMark, *emphasis* and _emphasis_ are the same.
But QTextMarkdownWriter already writes underlining and italics distinctly
in this way.

[ChangeLog][QtGui][Text] By default (with MarkdownDialectGitHub), markdown
_underline_ and *italic* text styles are now distinct.

Fixes: QTBUG-84429
Change-Id: Ifc6defa4852abe831949baa4ce28bae5f1a82265
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-11-07 09:35:11 +01:00
Karsten Heimrich
2106a625e8 Generate QUtf8StringView header file from qutf8stringview.h
Change-Id: I82fea74f3162b75ab16a06f81c41559434716993
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2020-11-07 08:35:11 +00:00
Karsten Heimrich
e9b92c926d QDebug: add op<<(QUtf8StringView)
[ChangeLog][QtCore][QDebug] Added streaming of QUtf8StringViews.

Task-number: QTBUG-88029
Change-Id: Ifcb001cfebddd79ce1cdbfef5bcc19f7c56679ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-07 09:35:11 +01:00
Karsten Heimrich
7cad91a7df QDebug: add op<<(QByteArrayView)
[ChangeLog][QtCore][QDebug] Added streaming of QByteArrayViews.

Task-number: QTBUG-88029
Change-Id: I66f5cc45a0438dbaacb1754cb3c669b3717f528b
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-07 09:35:11 +01:00
Ulf Hermann
b8069f0a47 QProperty: Mark metaType as unused in else branch of createFor()
The metaType is only used in the constexpr if branch where the callable
is not std::is_invocable_v. Therefore, we need to mark it as unused in
order to avoid compile errors in code that exercises the other branch.

Change-Id: I46e855b0f4b0a088f15ff41d4929fe010531b97e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-11-07 09:35:11 +01:00
Giuseppe D'Angelo
a6903f3da8 Fix a mistake when using QLatin1String::arg
QLatin1String::arg (and QStringView::arg) only support string-like
arguments, and QLatin1String("%1").arg(123) does *not* produce
the string "123" -- 123 gets routed through the QChar(int) constructor
instead. Fix by using QString.

Change-Id: I96371a15e1af957ef8133e30e79eb3e22b3e9d32
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-07 06:25:36 +01:00
Edward Welbourne
4398836817 Make QDateTime's operators hidden friends
Update docs to match.

Change-Id: I0ece9bcdba69c5dca48743894fe3347d9666f4e4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-11-07 06:25:16 +01:00
Edward Welbourne
c81893907e Make QTime's operators hidden friends
Update docs to match.

Change-Id: Ibcaeaea04fa552c392d49e711201719f99733742
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-11-07 06:25:09 +01:00
Edward Welbourne
6206c6c189 Make QDate's operators hidden friends
Adjust the documentation to match and add missing \c before false in
two cases.

Change-Id: Ic287c4de0b131c3500ee72bf1201900dc3788756
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-11-07 06:25:02 +01:00
Edward Welbourne
cfac358fa3 Turn QLocale's operator==() and operator!=() into hidden friends
Update docs to match. Add note on the conditions for equality.

Change-Id: I973b7a5dae3fae2e62f8a0d1db1f3115d24bee8b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-11-07 06:24:52 +01:00
Shawn Rutledge
9a1a15b42f Introduce QEvent::isSinglePointEvent()
This makes high-level event dispatching easier: for example we often
need to cast an event to access getters like button() and buttons().
We can so far assume that any QPointerEvent that is not a QTouchEvent
is a QSinglePointEvent; but more explicit type-checking looks safer.

Implemented in a similar way as c7f7279969.

Change-Id: I980d759e2a7538b6b30fd3bdc3be0c351ec6c246
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-11-07 06:24:38 +01:00
Volker Hilsheimer
bdec189ecb Move QEventPoint and QPointingDeviceUniqueId out of qevent
qevent.h/cpp are huge already, no need for more classes. Move QEventPoint
into new qeventpoint.h/cpp files, and QPointingDeviceUniqueId into
qpointingdevice.cpp; the class is already declared in qpointingdevice.h.

Move the documentation of QEventPoint APIs next to the implementation,
and document all APIs as properties. Add Q_PROPERTY macro where missing.

QEventPoint::device needs a workaround of qdoc due to the type being a
pointer-to-const; qdoc doesn't know how to tie a \property to it, but
documents it correctly.

While at it, move the logging category declarations to the header
matching the .cpp file where they are defined.

Change-Id: I096e609edbb760b5686d577e7fe47eea0807904e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-11-07 06:24:28 +01:00
Mårten Nordheim
1c6d6cbb62 QNAM: Work around QObject finicky orphan cleanup details
Details described in a comment.

Task-number: QTBUG-88063
Pick-to: 5.15
Change-Id: I763ecfedf518de97615e04a8eaae0fe1fd784f52
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-11-06 21:03:52 +00:00
Mårten Nordheim
7b2011bd14 QDecompressHelper: use the new readPointer function in QByteDataBuffer
Gets rid of moving strings back and forth, which was extra expensive
without QList's prepend optimization (which is returning, but getting
rid of the moves is even better).

Change-Id: I520fc140310a0e1f096dda97f2e999d0e7993e77
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-06 23:03:52 +02:00
Volker Hilsheimer
b284e01b0f Fix a few qdoc warnings
Change-Id: I7cc284ec56f02049d43a23c81659db94bfc3ff42
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-11-06 22:03:52 +01:00
Alexandru Croitor
b13bad3ab0 tests: Blacklist failing tests on MinGW
Also move redudant Android entries to already existing sections.

Task-number: QTBUG-35109
Task-number: QTBUG-88250
Change-Id: I9d5eaa5a3f11b55566a7c74f84a972a0c272cfea
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-11-06 21:03:51 +00:00
Topi Reinio
b20779b192 Doc: Add a workaround for QUtf8StringView's missing docs
QUtf8StringView is a specialization of QBasicUtf8StringView but we only
want to document the former. Add a workaround when Q_CLANG_QDOC is
defined to rename the base type, so the documentation in the .qdoc file
is matched correctly.

Fixes: QTBUG-88030
Task-number: QTBUG-86295
Change-Id: Id6e3d6fd5c28603bebf30771b7a47c3f76ca709d
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-11-06 21:03:51 +00:00
Shawn Rutledge
604adc01c0 Fix mouse velocity calculation
The mouse event that is sent to QPlatformCursor is in native pixels,
but the QSinglePointEvent constructor sets QEventPoint::globalLastPosition
every time, and velocity is calculated by delta from globalLastPosition
to globalPosition.  We plan to rely on this velocity being correct
in Qt Quick, in Flickable for example.  So globalLastPosition and
globalPosition need to be in the same coordinate system at the time
QPointerEvent::setTimestamp() is called.

Change-Id: I39f97a43f55f47a70cbd574861e920f3106e2125
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-11-06 22:03:51 +01:00
Joerg Bornemann
832e44b232 CMake: Heave configure's help screen into the age of CMake
Remove the portion about variable assignments. Technically, we handle
them but not in a useful way.

Remove options that are not applicable or not yet ported.

Mention the double dash option.

Change-Id: Ie2a27e3a145b2cead60adc75961d5deb086526ca
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-06 22:03:51 +01:00
Joerg Bornemann
3e37984a4f CMake: Add possibility to opt-out of file(ARCHIVE_CREATE) usage
If CMake 3.18 was built with insufficient library dependencies then Qt's
build will fail when file(ARCHIVE_CREATE) is called.

Configure with -DQT_AVOID_CMAKE_ARCHIVING_API=ON to choose code paths
were file(ARCHIVE_*) is not used.

Change-Id: I30c390498337ab0fa78b88b66d2f8feaa1f3f10b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-06 22:03:51 +01:00
Joerg Bornemann
2746051522 CMake: Disconnect docs installation targets from generation targets
"ninja install_docs" should not run the "docs" target, because with
the usual workflow
    ninja docs
    ninja install_docs
the documentation would be built twice.

That of course means that "ninja install_docs" will fail if "ninja
docs" wasn't run before.

Analogous for html_docs, qch_docs, the repository-level and
module-level documentation targets.

Change-Id: I8ad83602dd393b5afc79a19ab3d395987c889d0d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-06 22:03:51 +01:00
Joerg Bornemann
db939d8f33 CMake: Fix top-level documentation install targets
The following targets did not do any actual installation:
install_docs, install_html_docs, install_qch_docs,
plus their repository-level counterparts.

Add the following dependencies:

install_html_docs
    --> install_html_docs_<repo>
        --> install_html_docs_<module>

Analogous for qch.

The install_docs target already triggers install_html_docs and
install_qch_docs. Analogous for install_docs_<repo>.

Fixes: QTBUG-86738
Change-Id: I3468e000e050e2787a859e61d40161f5459cb351
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-06 22:03:51 +01:00
Joerg Bornemann
e559da3c6a CMake: Fix detection of the ltcg feature
When checking the value of CMAKE_INTERPROCEDURAL_OPTIMIZATION_<CONFIG>,
then <CONFIG> must be the upper case configuration name.

Also, we must not unset __qt_ltcg_detected, because the feature
condition evaluation happens way after the feature definition, and
__qt_ltcg_detected was not available anymore there.

This commit amends 96bdcdacbc.

Fixes: QTBUG-87874
Change-Id: I2b555bd1d7fbc8973e1d9493045c27d61b0d2c1b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-06 22:03:50 +01:00