Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.
Task-number: QTBUG-67283
Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
[ChangeLog][QtGui][QDesktopServices] URL handlers that have been passed
to setUrlHandler() must now be removed by calling unsetUrlHandler()
before they are destroyed. Relying on the handler's destructor to
implicitly unset it is now deprecated, because it may already be in use
by concurrent openUrl() calls. Support for implicit unsetting will be
removed in 6.6 and, until then, a qWarning() is raised if it is
exercised.
Fixes: QTBUG-100775
Fixes: QTBUG-100779
Pick-to: 6.3 6.2 5.15
Change-Id: I0c4f91b78f847b135fdeb38766babc892bdc1379
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Multiple tests use qt_internal_add_resource that copies the
functionality that is already implemented inside the
qt_internal_add_test function. Simplify these test by replacing
the qt_internal_add_resource call with the new BUILTIN_TESTDATA
option.
Change-Id: I18475b817d6f87264f0de53817d6c26c5ccab4e2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
- Those files were moved as part of Qt3D as its the sole
user of these
- Also removed associated unit tests
Pick-to: 6.2 5.15
Change-Id: I302bc219218a58071c86d2447cb4449601fca32c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mike Krus <mike.krus@kdab.com>
- process environment/DNS are OFF for INTEGRITY
Task-number: QTBUG-96176
Pick-to: 6.2
Change-Id: I189a97f88c96a428586c31a66b8d250e04482900
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The QDoubleValidator::setRange() used to have 3 parameters, with
the third one (the number of decimals) having a default value of 0.
Such default value does not make much sense for a *double* validator.
Also, since a default value was used, omitting the decimals was
silently overwriting the previous decimals value, discarding the
value that could be previously explicitly specified by user.
[ChangeLog][QtCore][QDoubleValidator][Important Behavior Changes] The
QDoubleValidator::setRange() method now has two overloads.
The first overload takes 3 parameters, but does not support a
default value for decimals.
The second overload takes only two parameters, not changing the
number of decimals at all.
Hence, the number of decimals will only be changed if the user
explicitly specifies it.
To maintain the old behavior of setRange(), pass 0 as the 3rd
argument explicitly.
Note that it is a source-incompatible change. But it should be fine,
because using QDoubleValidator with 0 digits after decimal point does
not make much sense and so, hopefully, is not that common.
At the same time, change the default-constructed QDoubleValidator
to use -1 for decimals, which allows arbitrarily many digits in
the fractional part. The value was previously 1000, which allowed
more than anyone would reasonably use, so this should make no
practical difference.
Some more unit tests to cover the behavior of the setRange()
overloads are also added.
As a dirve-by: remove unnecessary QValidator::State to int conversions
in the unit tests. QCOMPARE is capable of comparing these enums and
provides a better output in case of failure for enums.
Task-number: QTBUG-90719
Change-Id: I523d6086231912e4c07555a89cacd45854136978
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The provided implementation tries to fix positions for the group
separator.
In case of scientific notation it can also converts the value to
normalized form.
It uses QLocale::FloatingPointShortest internally to convert the
double value back to string, so the number of decimals may change
after calling this method.
Change-Id: I963bc5f97b653e2bb912f4b95b09a4d1ee201e7f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Noticed the missing tests while implementing fixup() for
QDoubleValidator.
Change-Id: Ic0e053a6385e311e4a491c8bff8ec7fbb83c3944
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
We can't really compare two NaN's. Should use qIsNaN() for that.
Pick-to: 6.2
Change-Id: Ia514cabe65cfcdeafb39cab91ecdb66f8fae725c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Those serve no purpose anymore, now that the .pro files are gone.
Task-number: QTBUG-88742
Change-Id: I39943327b8c9871785b58e9973e4e7602371793e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Remove the qmake project files for most of Qt.
Leave the qmake project files for examples, because we still test those
in the CI to ensure qmake does not regress.
Also leave the qmake project files for utils and other minor parts that
lack CMake project files.
Task-number: QTBUG-88742
Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Complete search and replace of QtTest and QtTest/QtTest with QTest, as
QtTest includes the whole module. Replace all such instances with
correct header includes. See Jira task for more discussion.
Fixes: QTBUG-88831
Change-Id: I981cfae18a1cabcabcabee376016b086d9d01f44
Pick-to: 6.0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This time based on grepping to also include documentation, tests and
examples previously missed by the automatic tool.
Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Modify special case locations to use the new API as well.
Clean up some stale .prev files that are not needed anymore.
Clean up some project files that are not used anymore.
Task-number: QTBUG-86815
Change-Id: I9947da921f98686023c6bb053dfcc101851276b5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
As per ### Qt6 comment. Also rename the LibraryLocation enum
to LibraryPath.
Change-Id: I556025a19c5bcdf2ff52598eaba32269522d4128
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Remove around 1000 compiler warnings about missing overrides
in our auto tests.
This significantly reduce the compiler warning noise in our auto
tests, so that one can actually better see the real problems
inbetween.
Change-Id: Id0c04dba43fcaf55d8cd2b5c6697358857c31bf9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Some compilers implicitly captures, and will warn about the unused capture.
Change-Id: Ib5e1cc3956c7eb0dc87cee834cce8a2b3dd0d30b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
It is unnecessary to create a QList container just for comparison.
Split out helpers for comparing sequence sizes and sequences from
qCompare(QList) and add a template for an array with a non-type template
parameter for the size.
One can then write something like:
const int expected[] = {10, 12,...};
QCOMPARE(QFontDatabase.pointSizes(...), expected)
Unfortunately, any commas in such an array will be misread by macro expansion
as macro argument separators, so any expected array with more than one entry
needs an extra macro expanding __VA_ARGS__.
Change-Id: Ie7c8dc20bf669bbb25f6d7f8562455f8d03968c8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Use pro2cmake with '--api-version 2' to force regenerate
projects to use the new prefixed qt_foo APIs.
Change-Id: I055c4837860319e93aaa6b09d646dda4fc2a4069
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Macros and the await helper function from qfunctions_winrt(_p).h are
needed in other Qt modules which use UWP APIs on desktop windows.
Task-number: QTBUG-84434
Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
- Moves QUndo* classes (except QUndoView) from src/widgets/utils to src/gui/utils
- Moves related auto tests from widgets to gui
- Replaces QUndoAction with lambdas that do text prefixing
[ChangeLog][Undo Framework] QUndo* classes (except QUndoView) were moved from Qt
Widgets to Qt GUI.
Done-with: volker.hilsheimer@qt.io
Fixes: QTBUG-40040
Change-Id: I3bd8d4d32c64f8dee548f62159a1df2126da89d8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
As QRegExp will be moved to a compat library in Qt 6.
Change-Id: I181aec45bd798f49d2c50a0e7fb64782e004b854
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Currently QShaderGenerator will crash when encountering some expressions
in input nodes.
For example, this node prototype would make it crash:
"VERTEX_COLOR": {
"outputs": ["color", "alpha"],
"rules": [
"headerSnippets": ["in vec4 vertexColor;"],
"substitution": "vec3 $color = vertexColor.rgb;
float $alpha = vertexColor.a;"
]
}
Change-Id: I37abb8099d376843a4cb13228140467dc1b8f60c
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
It was already possible to declare a node prototype with multiple
outputs, but trying to assign to all those outputs was not possible and
instead resulted in a crash.
It is now possible to declare nodes like this without crashing:
"SEPERATE_XYZ": {
"inputs": ["vector"],
"outputs": ["x", "y", "z"],
"rules": [
{
"substitution": "float $x = $vector.x;
float $y = $vector.y;
float $z = $vector.z;"
}
]
}
Change-Id: I748e77e84c9120dc688c573eee33dc13c6bfbace
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
This fixes the shader generation for graphs like this one:
Function0 ------> Output0
(with unbound input)
Input ------> Function1 ------> Output1
With those graphs, createStatements will not return any statement for
nodes Function0 and Output0.
Change-Id: Iec32aa51623e176b03ae23e580f06d14df80a194
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
QShaderGenerator didn't handle substitutions like
`vec4 $color = mix($color1, $color2, $fac);`
Note that `$color` is a prefix to `$color1` and `$color2`. For the
substitution `QByteArray::replace` was used so if `$color` was handled
first and replaced by `v1`, `$color1` and `$color2` were never correctly
replaced and instead became `v11` and `v12` which caused a crash later
on.
Change-Id: Idaf800fdac468f33c323eb722701da5f8eb918d6
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
For graphs like this one:
Input ----> Function1 ----> Output
\
---> Function2
(unbound output)
We would have generated only 2 statements, for Function1 and Output.
This change fixes this by treating Function2 like an output.
Therefore it generates 4 statements: Input, Function1, Output and
Function2.
Change-Id: Iaada40b9b949d771806dd47efad4f7ef2a775b48
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
QDoubleValidator would accept "1,23" as valid in a locale which has ','
as a thousand separator. However, it should have been Intermediate
instead, as there is still one digit missing.
Fixes: QTBUG-75110
Change-Id: I6de90f0b6f1eae95dc8dfc8e5f9658e482e46db3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
- Replaced the usages of deprecated APIs by corresponding
alternatives in the library code and documentation.
- Modified the tests to make them build when deprecated APIs disabled:
* Made the the parts of the tests testing the deprecated APIs to
be compiled conditionally, only when the corresponding methods are
enabled.
* If the test-case tests only the deprecated API, but not the
corresponding replacement, added tests for the replacement.
Change-Id: Ic38245015377fc0c8127eb5458c184ffd4b450f1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The standard astc encoder has its own file format.
Change-Id: I9a2f7b1fa20ba344b79637bafb50ff2bd0596747
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>