Commit Graph

53745 Commits

Author SHA1 Message Date
Thiago Macieira
dcb281af7d CMake: Make LTO build work
We don't need to check FEATURE_ltcg, just add -fno-lto unconditionally.
That makes QtCore compile with -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON.

Change-Id: Icb2516126f674e7b8bb3fffd16ada2c71d7334aa
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-10-13 18:29:35 -07:00
Giuseppe D'Angelo
a45bc2d123 QList: avoid a iterator->pointer conversion in the test
Being a test, I'm going to abuse operator-> on end() to check
that we get what we want (a pointer past the end).

Change-Id: I7ab8d017b0fe320018820eff336d496328ade481
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-10-14 02:26:41 +02:00
Edward Welbourne
5417186692 Fix typo: alignment has an n in it
Change-Id: If64edd32c5084984227b3c366932b3129df94b31
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-10-14 01:36:13 +02:00
Tor Arne Vestbø
954b58f368 Remove unneeded function QGuiApplicationPrivate::emitLastWindowClosed
It only has a single call site nowadays.

Change-Id: I6f486dec51f76e1fb231fb7276bc8c856885bee1
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-10-13 22:30:08 +02:00
Tor Arne Vestbø
947188b969 Fix references to QGuiApplication::lastWindowClosed
The signal is emitted from QGuiApplication these days.

Pick-to: 6.2
Change-Id: I7423cd4808e8df86960f225fd6e4a12a1a4f11f3
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-10-13 22:30:08 +02:00
Thiago Macieira
0df7831d01 qfloat16: re-merge the F16C content into qfloat16.cpp
The bugs we had noticed previously are believed to be fixed. MSVC will
do per-function updating of AVX content where necessary and the ICC
issue is no longer relevant.

Change-Id: I2bbf422288924c198645fffd16a9235f2d73cc19
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-10-13 12:49:49 -07:00
Thiago Macieira
cb0ea39895 CMake: remove support for building Qt with the old Intel compiler
This hasn't worked for some time. It's not in our CI and I don't think
it was working at all. When I tried to build it, I ran into several
problems with C++17 and an Internal Compiler Error I did not have any
interest in working around.

After discussing with the Intel compiler team, it was decided that
fixing those issues in the old compiler is not going to happen. Instead,
their recommendation is to adopt the new LLVM-based compiler, which
the last commit added support for.

This commit does not remove qmake support for the old ICC. It's possible
someone is using qmake with a non-Qt6 project and ICC.

Change-Id: Icb2516126f674e7b8bb3fffd16ad6350ddbd49e5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-10-13 12:49:49 -07:00
Thiago Macieira
63d80c7c4b CMake: add support for Intel's LLVM-based compiler
This includes a few cleanups to our .cmake files where it was easier to
combine existing sections of Clang / AppleClang that no longer needed to
be distinct.

icpx could be replaced with a shell script:
 exec `basename $0`/clang++ --intel "$@"

tst_qnumeric is not passing
FAIL!  : tst_QNumeric::classifyF() Compared values are not the same
   Actual   (qFpClassify(tiny / two)): 2
   Expected (FP_SUBNORMAL)           : 3
   Loc: [/home/tjmaciei/src/qt/qt6-icx/qtbase/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp(344)]
FAIL!  : tst_QNumeric::classifyD() Compared values are not the same
   Actual   (qFpClassify(tiny / two)): 2
   Expected (FP_SUBNORMAL)           : 3
   Loc: [/home/tjmaciei/src/qt/qt6-icx/qtbase/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp(344)]
FAIL!  : tst_QNumeric::floatDistance(denormal) Compared values are not the same
   Actual   (qFloatDistance(from, stop)): 0
   Expected (expectedDistance)          : 4194304
   Loc: [/home/tjmaciei/src/qt/qt6-icx/qtbase/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp(408)]
FAIL!  : tst_QNumeric::doubleDistance(denormal) Compared values are not the same
   Actual   (qFloatDistance(from, stop)): 0
   Expected (expectedDistance)          : 2251799813685248
   Loc: [/home/tjmaciei/src/qt/qt6-icx/qtbase/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp(408)]
P

Change-Id: Icb2516126f674e7b8bb3fffd16ad59431e8c3379
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-10-13 12:49:49 -07:00
Andreas Buhr
2630c15a3d Revert "[Android] Remove signal and slot mechanism to listen states in editor's"
This reverts commit a40a512dec.
It caused UI freezes and cursor position inconsistencies.
See the linked bugs.

Pick-to: 6.2 6.2.1 5.15
Task-number: QTBUG-58013
Task-number: QTBUG-93414
Task-number: QTBUG-95669
Task-number: QTBUG-96671
Task-number: QTBUG-96675
Task-number: QTBUG-96769
Change-Id: Ie8100538609a1460713ca9115cdbe329654d0772
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-10-13 20:36:00 +02:00
Friedemann Kleint
2160042dc3 XCB: Silence clipboard warning "SelectionRequest too old"
Use the predefined logging category for clipboard warnings
and change the offending  warning to qCDebug() so that it is silent
by default.

Pick-to: 6.2 5.15
Fixes: QTBUG-60257
Change-Id: Icf1bc84cd64207b94ef471f13090c43b45e20728
Reviewed-by: Liang Qi <liang.qi@qt.io>
2021-10-13 20:36:00 +02:00
Giuseppe D'Angelo
9422dd0e19 QList: remove yet another iterator->pointer implicit conversion
The ranged constructor for QList has an optimization when the
iterators are QList's own iterators. In that case, it uses a
"contiguous append" shortcut by converting the iterators to pointers.
Avoid that conversion by extracting the pointers from the iterators.

Note that this is an optimization for C++17 only; in C++20
appendIteratorRange will deal with this case as well. Leave a note.

Change-Id: I761c36ff500dee95b4ae1b0a4479d22db0c8e3de
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-10-13 19:34:36 +02:00
Giuseppe D'Angelo
507be11303 QArrayDataOps: improve appendIteratorRange
Handle contiguous iterators in there directly.

Change-Id: I3b6d45f993f82d0de5edbfcd75856f43a7f1263b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-10-13 19:34:36 +02:00
Giuseppe D'Angelo
14c5daad43 QList: code tidies
Do not rely on implicit pointer->QList::(const_)iterator conversions.
Amend QList's own code so to avoid them.

Change-Id: Ia3e7a83631943e636831217cdad28b73c98c1dc7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-10-13 19:34:36 +02:00
Mårten Nordheim
f828b47e43 Document QFutureWatcher::isFinished behavior change
in the Qt6 changes documentation

Pick-to: 6.2
Change-Id: Ief45c145cbb9353455af39060a3fb444afe3f1b9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2021-10-13 16:43:20 +00:00
Assam Boudjelthia
7235eeab19 Android: replace ndk.dir with android.ndkVersion in build.gradle
The use of ndk.dir in local.properties is deprecated in favor of
android.ndkVersion in build.gradle, and will be totatlly removed in
the future, so we need to adapt to that.

Fixes: QTBUG-91391
Pick-to: 6.2
Change-Id: I54c57113a759d43c3685c9cdf2b9dcc5c948c0fd
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2021-10-13 18:33:32 +03:00
Volker Hilsheimer
f7a4a79c62 Take overshoot into account when laying out QAbstractScrollArea
QAbstractScrollAreaPrivate::layoutChildren() positions the viewport, but
did not take the overshoot from scrolling with a scroller into account.
If the scroll area was resized during a scroll, then this resulted in the
roll back overcompensating for the overshoot, placing the viewport outside
the visible area.

Fix this by taking the overshoot into account when positioning the
viewport.

Add a test case. We have to use QWindow-based mouse event simulation, as
the QWidget based move events use QCursor::setPos, which doesn't reliably
go through the gesture framework.

Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io>
Done-with: Zhang Hao <zhanghao@uniontech.com>
Fixes: QTBUG-94769
Pick-to: 5.15 6.2
Change-Id: Idf650c91e5a9cffa996e23e743939243b1d4fcc0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-10-13 14:27:12 +00:00
Morten Johan Sørvig
a34a10c11f Support MoltenVK from homebrew
MoltenVK installed from homebrew has the following
directory structure:

  molten-vk/1.1.5/libexec/include/vulkan/vulkan.h
  molten-vk/1.1.5/include/MoltenVK/mvk_vulkan.h

Task-number: QTBUG-80576
Pick-to: 6.2
Change-Id: If6f5aeb55908f60fff49417ee1ddf4c2db980c5a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-10-13 09:37:36 +00:00
Friedemann Kleint
36a6d17af0 Windows QPA: Fix mouse event position for QWindows with Qt::WindowTransparentForInput
The local position needs to be corrected when the Qt receiver window
does not correspond to the native event receiver window.

Fixes: QTBUG-97095
Pick-to: 6.2 5.15
Change-Id: Ic9fa3d84b6ee84ae5f8fa2408b0d60e35dbfa328
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2021-10-13 08:37:17 +02:00
David Skoland
58d64b770a Rename variable for exported functions
Emscripten complains that this variable is deprecated and should be
replaced with the one given in this patch.

Change-Id: Iafee06fcb1f292de25570545d74d7327679461b0
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2021-10-13 05:03:02 +02:00
Giuseppe D'Angelo
2bd3c53a95 QLalr: use QList iterators in algorithms
There's no need to dereference+reference a QList's iterator
only to pass the result to an algorithm, just pass the iterator.

Change-Id: I7367010f6ab489d951715259bd51aeec790d3c84
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-10-13 04:33:21 +02:00
Giuseppe D'Angelo
49cf0b9459 Re-enable QT_NO_NARROWING_CONVERSIONS_IN_CONNECT for Qt
This define used to be set for the entirety of the Qt build but
was lost during the qmake->CMake transition. Re-enable it.

Change-Id: Idc4cb6ada485158559485b60f62f76439550b255
Pick-to: 6.2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-13 04:09:21 +02:00
Ivan Tkachenko
871802455e Doc: Fix \notes in QObject
Pick-to: 5.15 6.2
Change-Id: Ic442f56d3fb0c3e073c3cd69f193829958550296
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-10-13 02:40:32 +03:00
Ievgenii Meshcheriakov
9940e4812b Add suffixes to loop variables for Q_FOREACH
Currently using nested Q_FOREACH loops produces warnings about
shadowing local variables (if enabled). For example, this code:

    QList<int> aList;
    QList<int> bList;
    foreach (int a, aList) {
        Q_UNUSED(a);
        foreach (int b, bList)
            Q_UNUSED(b);
    }

produces the following warning with MSVC:

    warning C4456: declaration of '_container_' hides previous local
    declaration

This is due to using variable _container_ as loop variable for both
loops.

This patch appends current line number to the name of the loop
variables so that most of the uses of Q_FOREACH will not result
in shadowing.

The patch originally by Benoit Regrain.

Fixes: QTBUG-79081
Pick-to: 5.15 6.2
Change-Id: I55235e917e920171b138c8b3239a95dfe2ac7988
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-10-13 01:40:32 +02:00
Joerg Bornemann
8b09c9d690 CMake: Fix config tests not finding module-provided CMake packages
This amends commit 165e01d5d5.

Above commit broke the code that adds "${PROJECT_SOURCE_DIR}/cmake" to
CMAKE_MODULE_PATH.  The semicolon that separates entries of
CMAKE_MODULE_PATH must be escaped.  Otherwise, the semicolon separates
elements of the flags list.

Additionally, fix the QT_AVOID_CUSTOM_PLATFORM_MODULES code path which
lacked the addition of "${PROJECT_SOURCE_DIR}/cmake".

Pick-to: 6.2
Change-Id: I72f78cf066cabe6b0002dce1aa0294aa0dc9cbf0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-10-13 00:50:03 +02:00
Joerg Bornemann
0098e0ca86 Fix build with CMake 3.16
Do not read the target property LINK_LIBRARIES from interface libraries
as this leads to errors with CMake 3.16.

This amends commit 326b91ea78.

Pick-to: 6.2
Change-Id: I44251c7633d5ecd977cd05746ac311dd1285d1e3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-10-13 00:50:03 +02:00
Peter Varga
d24651d548 Guard WinRT API code for clang-cl
It is unsupported with clang-cl and breaks the build.

This is a fixup for:
  51e8d3592a Let QLocale::uiLanguages() use WinRT API when possible

Task-number: QTBUG-94341
Pick-to: 6.2
Change-Id: Icf32339e81d67d4c119b7fb8d8d834c744b9ead0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-10-12 21:34:02 +00:00
Jonas Kvinge
ced47a05aa openglblacklists: Fix typo in description
Pick-to: 5.15 6.2
Change-Id: I13fa34099daed8de8d23af3952aa18f1ecde7883
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2021-10-12 23:15:45 +02:00
Jonas Kvinge
cf81ccd1cd qwindowsdrag: Fix typo in documentation
Pick-to: 5.15 6.2
Change-Id: I4bd8ff5b4ddeee1760b012bd603b014d535534ed
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2021-10-12 23:15:45 +02:00
Jonas Kvinge
79e209c4c3 windows: Fix typos in source code comments
Change-Id: I5d83574639d0b1f935843a75217aae70a5925fa0
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2021-10-12 23:15:45 +02:00
Edward Welbourne
ba23507960 Fix handling of time-zone gap in QTimeZonePrivate::dataForLocalTime()
This was handled correctly when the backend supplies transitions
bracketing the time in question, but the fallback code tried to use
the DST offset at the time with larger offset from UTC; this did not
work when the gap was due to a change in standard time. Discovered by
ANS1 parsing of a date-time with two-digit year, for which the
date-time parser tried to use 1921-05-01T00:00 local time when filling
in the fields it had parsed; but, when run in Europe/Helsinki, there
is no such time due to the 20m 11s skipped when joining EET from the
prior local solar mean time.

Correct the calculation to use the actual change in offset from UTC,
as used in the (far better tested) between-transitions branch of the
code, rather than the DST offset after the transition.

Add a test-case based on the ASN.1 certificate date whose parsing
revealed the issue. Although it seems nothing in Coin can reproduce
the issue, the reporter has verified that the test does indeed fail on
the system where the bug was found and the fix does fix it.

Fixes: QTBUG-96861
Pick-to: 6.2
Change-Id: I12b02bad01daca2073d1a356452cd573684aa688
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-10-12 22:52:50 +02:00
Assam Boudjelthia
22e330db48 Android: remove unused imports and fix warning on network java code
Pick-to: 6.2
Change-Id: Ifa69c04f7f2e75751b6f8a157d04f3870f0c0eb1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-10-12 22:12:08 +03:00
Mike Achtelik
91d8443f6d CMake: Fix adding generated resources on iOS with CMake and Xcode
When adding resources generated via a custom command, the project fails
to configure when targeting iOS with CMake and Xcode with the error:

CMake Error in src/CMakeLists.txt:
  The custom command generating
    src/.qsb/TestShader.frag.qsb
  is attached to multiple targets:
    TestApp_other_files
    TestApp
  but none of these is a common dependency of the other(s).  This is
  not allowed by the Xcode "new build system".

This happens e.g. when using qt6_add_shaders, which adds a custom
command to generate the qsb files. Or by simply adding resources via
qt6_add_resources, which depend on a custom command.

The problem is that qt6_add_resources also adds the resource to a
second "fake" target ${target}_other_files via
_qt_internal_process_resource and _qt_internal_expose_source_file_to_ide.
See c7d1874cd1.
Since these targets do not have a common dependency CMake fails to
configure the project.

So lets fix it similar to change 1bd0a5ce02352a600367beb5a5421c8f8332e1fe
and let the ${target}_other_files depend in the main ${target}.

Pick-to: 6.2
Task-number: QTBUG-95763
Change-Id: Iecdb40993a91da8bfbf6553892f9b0722d2e886c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-10-12 17:36:57 +00:00
Volker Hilsheimer
8513bcd90c Fix caching of parsed border color values in CSS parser
When parsing CSS, a border-color value is parsed as four brushes, as css
allows assigning up to four values, one for each side.

When applying the CSS to the HTML, we accessed it as a color value,
which overwrote the parsed value with a QColor. So while we had a valid
parsed value (and didn't re-parse), the code accessing that value still
expected it to be a list, and thus failed to retrieve the data.

There are several ways to fix that, but the cleanest way without
introducing any performance penalty from repeatedly parsing (and in fact
removing a parse of the string into a color) is to enable colorValue to
interpret an already parsed value that is a list without overwriting the
parsed value again. To avoid similar issues in the future, add assert
that the parsed value has the right type in brushValues.

As a drive-by, speed things up further by making use of qMetaTypeId
being constexpr, which allows for it to be used in a switch statement.

Add a test case.

Fixes: QTBUG-96603
Pick-to: 6.2 5.15
Change-Id: Icdbff874daedc91bff497cd0cd1d99e4c713217c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-10-12 18:26:26 +02:00
Thiago Macieira
878b2047b5 QList::iterator: use templates for advancing operators
Because of the addition of the operator T*(), the expression "it + N"
where N was not exactly qsizetype but any other integer type was a
compilation failure because of ambiguous overload resolution.

With GCC it's apparently a warning:

 warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
 note: candidate 1: ‘QList<T>::iterator QList<T>::iterator::operator+(qsizetype) const [with T = char; qsizetype = long long int]’
 note: candidate 2: ‘operator+(char*, ptrdiff_t {aka long int})’ (built-in)

With Clang, it's an error:

 error: use of overloaded operator '+' is ambiguous (with operand types 'QList<int>::const_iterator' and 'ptrdiff_t' (aka 'long'))
 note: candidate function
        inline const_iterator operator+(qsizetype j) const { return const_iterator(i+j); }
 note: built-in candidate operator+(const int *, long)

Pick-to: 6.2
Fixes: QTBUG-96128
Change-Id: Ie72b0dd0fbe84d2caae0fffd16a06f23dd56b060
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-10-12 08:46:31 -07:00
Jonas Kvinge
2675c288e8 wasm: Fix source code comment typos
Change-Id: I9b2b76c01880c7bb515fdc1a6c4ef1f0bcf6be95
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2021-10-12 15:55:53 +02:00
Timur Pocheptsov
0e58b3db34 Don't send the default SETTINGS_INITIAL_WINDOW_SIZE
And don't set non-default large value in QNetworkRequest's constructor.
Some servers consider those values as 'flow control error'.

Pick-to: 6.2
Fixes: QTBUG-97384
Change-Id: I801b7c83fe7e7392a02ba653c36dfa8a22c21d1e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-10-12 14:08:08 +02:00
Topi Reinio
b836098179 Doc: Fix usage of \summary macro
The macro takes only one parameter, sentences must be wrapped in {}.

Pick-to: 6.2
Fixes: QTBUG-97441
Change-Id: I7177548a32a67d720c2b551d16c09d898b0fda51
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-10-12 14:08:08 +02:00
Volker Hilsheimer
3b6a027885 macOS: fix window activation when popup is open
On macOS, it is possible to right-click-open a context menu for a window
that is not active. This does not activate the window.

When then clicking into the window to activate it, the popup is closed,
but only after the WindowActivate events has been sent. This blocks the
event delivery, as QApplication (since commit 78264f333e)
interpreted activation changes while popups are open to be just delayed
focus events. The UI ends up in a broken state where focus cannot be set
on the widgets in the window.

To fix this, don't ignore such activation events on macOS. As a drive-by,
give the variables more meaningful names.

Note: We cannot call closeAllPopups before delivering WindowActivate,
as that would close the popup before the mouse event is delivered, making
it impossible to select any of the actions from the menu.

Ideally, clicking into a popup of an otherwise inactive application would
not activate that application (that is the default behavior for native
macOS applications), but that's out of scope for this patch.

Fixes: QTBUG-78750
Task-number: QTBUG-69710
Task-number: QTBUG-66513
Pick-to: 6.2
Change-Id: I6344370ae7be31630e37514e04918b2d6cb8b69a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-10-12 14:08:08 +02:00
Volker Hilsheimer
971bf3a9bb Activate tst_QWidget_window::tst_showWithoutActivating on cocoa
The test passes, the functionality is implemented in QCocoaWindow.

Task-number: QTBUG-8857
Pick-to: 6.2
Change-Id: I2f4b3a39cec1aaaf4351753b590f35e280503461
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-10-12 14:08:08 +02:00
Ievgenii Meshcheriakov
3715166539 QPoint: Don't claim that QPoint[F]::dotProduct() produces length squared
The documentation snippets name the result of dotProduct()
"lengthSquared", but it is just a coincidence, not the property of dot
product of two different points. Just name the result `dotProduct`
without claiming any properties.

Also fix the type of the result in the QPointF case.

Fixes: QTBUG-94979
Change-Id: I4c337dd8335953489eac86c07a219c0a2d232369
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-10-12 12:08:08 +00:00
Eskil Abrahamsen Blomfeldt
e05e3c7762 freetype/no-fc: Disambiguate fonts with different widths
When using the Freetype font database, we would ignore the
typographical width of loaded fonts, which could make it
impossible to select certain fonts in a family.

[ChangeLog][Freetype] Fixed a bug where fonts of different
width within the same family would be unselectable if the
Freetype font database (no-fontconfig configuration) was in
use.

Pick-to: 5.15 6.2
Fixes: QTBUG-89640
Change-Id: Ic9c17a7c3cc14eb7e942b05d6b21b7c1602816cf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2021-10-12 13:33:19 +02:00
Eskil Abrahamsen Blomfeldt
6f0d7eb92e RHI: Don't retain texture operations after frame is done
Retaining texture upload commands comes at a price, because it
means we also retain the backing storage, which could e.g. be
fullscreen buffers for applications on Wayland. These would
eventually be overwritten, but just clearing the array between
frames is also fine because the data is never reused and the
array is a QVarLengthArray anyway so it already has a lot of
reserved space.

Pick-to: 6.2
Change-Id: I7389487be67b671830787e30e1468c303b7ac5c2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2021-10-12 11:33:19 +00:00
Giuseppe D'Angelo
95fd21a26a RHI: introduce a way to disable framebuffer clears on GL
On low-end hardware without fast framebuffer clears one can
significantly reduce the fill rate by disabling framebuffer clears
(provided, as it's usually the case, that the application has content
filling the entire framebuffer).

Add a couple of environment variables to do so, one to disable all
clears and one to disable only color clears (in case the surface is
requested without a depth buffer). Note that disabling all clears
on a surface *with* a depth buffer still requires
QSG_NO_DEPTH_BUFFER to be set, otherwise QtQuick is going to assume
that there is a clean usable depth buffer.

Change-Id: I96ad0a3d28dd0ab65cc960fb7cb2e0a8b6f35628
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2021-10-12 13:33:19 +02:00
Jonas Kvinge
5ed0974ef4 concurrent: Fix typo in documentation
Pick-to: 6.2
Change-Id: Ibe3715de704f420ba3796d19c9e78cd6204eb4e5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-10-12 10:52:03 +00:00
Jonas Kvinge
aa97bc5f6c concurrent: Fix namespace typo
Change-Id: I7fed1f3965f97a4e1c4d096bc19f98572ea35c53
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-10-12 12:52:03 +02:00
Jonas Kvinge
13b5c269d6 gui: Fix typos in documentation
Pick-to: 5.15 6.2
Change-Id: I533f5a55cd0cd60a76990b552d7dab51a301ac1c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-10-12 12:52:02 +02:00
Jonas Kvinge
30613163ba widgets: Fix typos in documentation
Pick-to: 5.15 6.2
Change-Id: I6b77f0ec043d08da3b7958d780dce9595daf97a6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-10-12 12:52:02 +02:00
Jonas Kvinge
616802fe88 QEventDispatcherWasm: Fix typo in debug message
Pick-to: 6.2
Change-Id: I183de5fd477b9529dd5272c88a196b9bebf4ab66
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-10-12 12:52:02 +02:00
Jonas Kvinge
00ebab71d3 gui: Fix typo in CMake feature
Pick-to: 6.2
Change-Id: Icf81eac4d12fb61bcec2ca92d118ce88f970522e
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-10-12 12:52:02 +02:00
Jonas Kvinge
6c4403e92a network: Fix typos in source code comments
Change-Id: Iff505451e3f00de2d753de0f1d891a73cf73ef0d
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-10-12 12:52:02 +02:00