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>
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>
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>
Previously this would result in config.opt file not being written.
Change-Id: I9ce349a7cda9f399fa789a569e46138ea90769f5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
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>
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>
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>
Change-Id: I82fea74f3162b75ab16a06f81c41559434716993
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
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>
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>
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>
Update docs to match. Add note on the conditions for equality.
Change-Id: I973b7a5dae3fae2e62f8a0d1db1f3115d24bee8b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
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>
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>
Details described in a comment.
Task-number: QTBUG-88063
Pick-to: 5.15
Change-Id: I763ecfedf518de97615e04a8eaae0fe1fd784f52
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
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>
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>
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>
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>
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>
"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>
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>
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>
Tools and library DLLs already have version information embedded.
Add the missing _qt_internal_generate_win32_rc_file call for plugins.
Fixes: QTBUG-87747
Change-Id: I619948f4066ce229d41e8b93f125751e1d28e26c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
QStyle::styleHint returns int, and that int was simply used to
build a QChar representing the "password mask" character.
Enforce that it actually fits and then do an explicit cast.
(In general, of course, this is an API flaw; styleHint should
somehow return a QString for this use case).
Change-Id: Ifb6181b229b91cc84859cb9b9d57e21d6748c31a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: David Faure <david.faure@kdab.com>
INPUT_ variables enable FEATURE_ variable only in case if valid
"true"-like value is assigned from command line.
Amends dc43061e9a
Fixes: QTBUG-87755
Task-number: QTBUG-88142
Change-Id: I65e85c7548981fdec94366b531f6df6396be71b7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This fixes an issue where, on Windows, 'ninja test' will error out:
[0/1] Running tests...
Test project C:/dev/qt/dev/cmake-msvc-2019-amd64/qttools
CMake Warning (dev) at C:/dev/qt/dev/cmake-msvc-2019-amd64/qttools/tests/auto/cmake/CTestTestfile.cmake:7 (add_test):
Syntax error in cmake code at
C:/dev/qt/dev/cmake-msvc-2019-amd64/qttools/tests/auto/cmake/CTestTestfile.cmake:7
when parsing string
-DCMAKE_TOOLCHAIN_FILE=C:\dev\qt\dev\cmake-msvc-2019-amd64\qtbase\bin\/../lib/cmake/Qt6/qt.toolchain.cmake
Invalid escape sequence \d
Change-Id: Ifc727e44b20b899b44c7c1398d4273d73b7519ca
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
A dependency was missing, causing qduplicatetracker_p not to be found.
Change-Id: I4076d6cf82d804354731c357bcdbfd03c3d42142
Reviewed-by: David Faure <david.faure@kdab.com>
Inline private constructors, use class initialization consistently.
Export only non-inline'd members.
Change-Id: I18f38214bbd03af711fe7ee1314d59e06733a0ec
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Remove or fix references to removed APIs, and some qdoc syntax fixes.
Change-Id: I67d71062cd7a29f4eb74b02199b1482af5e59fc0
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
QInputDevice data types changed from 16 bit to int in
742de50c5e
Change-Id: Id2760b5b685e5efc14ee6f9e36e2b30a5b188cdd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Fixed misleading naming of "slowReallocatePath". It's no longer "slow",
it's downright dangerous now to reallocate under certain conditions
While at it, added extra assert to QArrayData::reallocateUnaligned()
and cleaned up that function a bit
Change-Id: I05921fb5058eb563997e66107566c87fb4ea5599
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
There’s no need to convert the file name/path to QUrl,
and then back again to QString before calling qt_findAtNxFile().
Call qt_findAtNxFile first, and then convert to QUrl.
This makes sure the url-name and string-name stays
in sync.
Change-Id: I8b8939eabbdaff473945ebe31faafd408e9c4295
Pick-to: 5.15
Fixes: QTBUG-60793
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Change-Id: I47504d6c032c9a6ace7440580f0081cc5f254038
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
We have some cache variables that are used in our qt.toolchain.cmake
toolchain file, for example QT_CHAINLOAD_TOOLCHAIN_FILE. When CMake
runs a configure test with try_compile, our toolchain file is included
again, but only a restricted set of variables is available.
Add the variables that are used in our internal toolchain file to
CMAKE_TRY_COMPILE_PLATFORM_VARIABLES. This makes them visible for
try_compile calls operating on source files.
Also pass the variables via the environment to support try_compile
calls that operate on whole projects.
Fixes: QTBUG-87873
Change-Id: Iebca9e23686bec5072194b15482e1782b9367a0e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
While _M_ARM is a MSVC specific builtin define, mingw headers do
also define it (in code, as opposed to a compiler built in
define), just as the same headers do for e.g. _M_IX86 and _M_X64.
This avoids warnings about unrecognized pragmas, when compiling
for armv7 mingw.
The original compiler bug (from QTBUG-42038) probably already is
fixed and/or no longer in scope.
Change-Id: I98722e2a7ee1de4f1937a866555ec460f5d898d1
Pick-to: 5.15
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Batch files should be CRLF, otherwise they may end up triggering an
"The system cannot find the batch label specified" error.
Relying on core.autocrlf to ensure this runs the risk of the user not
having the config set correctly, and also doesn't cover the use of
the same source checkouts across platforms.
Change-Id: I3166b99ce38e4ba9a0674336d69aa915e27860d1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>