| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously QLocale's digested form of CLDR-derived data for AM/PM
indicators was processed through a mapping that always selected the
upper-case form, the AP format. Since 6.3, the formatting (and
parsing) code has understood an Ap format to select the
locale-appropriate case, rather than obliging client code to pick the
case regardless of the user's locale. However QLocale's data still
selected the upper-case version instead of the "locale-appropriate"
form for time and datetime formats. I recently fixed this in qtbase;
it's now time for QML's Locale's test-cases to catch up.
The en_AU locale inherits lower-case am/pm markers from en_001
("world" English, rather than plain "en" USAish), so correct the tests
that expected upper-case markers.
Change-Id: Ie05f5e39278758ea8d9e3ea556c133a143070ab8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We want to be accessible to qmllint and other QML tooling. To this end,
make all legal invocations of its methods properly typed invokables.
Keep two QQmlV4Function overloads to produce error messages if the
methods are called with the wrong parameters. We have to do this because
JavaScript is more liberal in its argument coercion than the methods
would like.
Un-deprecate QJSNumberCoercion::isInteger() since it's actually quite
practical here.
Pick-to: 6.7
Fixes: QTBUG-112366
Change-Id: I016e5edc47efaade44461c504c1b3e2b1b829b58
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to QUIP-18 [1], all test files should be
LicenseRef-Qt-Commercial OR GPL-3.0-only
[1]: https://contribute.qt-project.org/quips/18
Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I26d72e8de04d4c7c57b3b7838af5d033265de5ba
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
| |
JavaScript months start at 0, so don't check 1st of January and expect
1st of February. And don't hardcode the string we expect, test that we
pass the result of the QQmlLocale wrapper correctly back to QML instead.
Change-Id: I50a0875ec3b442bcfd8117cf261201ced4b87f0b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the boilerplate standalone test prelude to each test, so that they
can be opened with an IDE without the qt-cmake-standalone-test script,
but directly with qt-cmake or cmake.
Boilerplate was added using the follow script:
https://git.qt.io/alcroito/cmake_refactor
Manual adjustments were made where the code was inserted in the wrong
location.
Task-number: QTBUG-93020
Change-Id: Ia68c9d263e7454f0c4a26c29b10f1c535d08e2f6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
In Australia, they have a non-breaking space between the time and the
AM/PM now. We're not interested in non-breaking spaces here.
Pick-to: 6.5
Fixes: QTBUG-111048
Change-Id: Id99d3deba068069ba6a0d4f5b045571c377d8b6f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-99238
Change-Id: Ia11c9cbd7c06347319ab3674ec0cd8da0214747e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, it's not possible to show a single localized day number;
Qt.formatDate can show it if "d" is passed as the format string, but
that rules out passing a locale. If a locale is passed instead, you
can only pass e.g. Locale.ShortFormat or another enum value as the
extra argument, as opposed to a format string. This limitation requires
users to implement conversion helpers in C++ that allow accounting
for the locale.
This patch exposes an appropriate subset of the existing date-to-string
conversion functions from QLocale to the QML Locale type.
For completeness, it also exposes the other relevant overloads:
- toString(int i)
- toString(double f, char format = 'g', int precision = 6)
- toString(Date date, string format)
- toString(Date date, FormatType format = LongFormat)
[ChangeLog][QtQml][Locale] Added toString() overloads.
Fixes: QTBUG-105506
Change-Id: I7061c68097cc11b69179117f5825e368bcfc296b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
That way, enums from the Locale type are available and we don't need
any workarounds.
Pick-to: 6.2 6.4
Change-Id: I1d96c0fd951678de4b4852f3a41ac3b45eb45b29
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a semantic patch using ClangTidyTransformator as in
qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8:
auto QtContainerClass = anyOf(
expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o),
expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o));
makeRule(cxxMemberCallExpr(on(QtContainerClass),
callee(cxxMethodDecl(hasAnyName({"count", "length"),
parameterCountIs(0))))),
changeTo(cat(access(o, cat("size"), "()"))),
cat("use 'size()' instead of 'count()/length()'"))
a.k.a qt-port-to-std-compatible-api with config Scope: 'Container',
with the extended set of container classes recognized.
Change-Id: Idb1f75dfe2323bd1d9e8b4d58d54f1b4b80c7ed7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
Change-Id: I9fd7aa3883011abf43be81fe1ec57fc1a267c750
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-105718
Change-Id: Id89ed14990804a5024183e75382cc539d4293da1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
| |
... and use nativeTerritoryName() instead.
This allows to build the tests without deprecated APIs.
Task-number: QTBUG-104858
Change-Id: Ia66f2e05fd033e1ca6da93b58dbcbccae3448ec5
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
| |
Change-Id: I1cd769f85d5f82c43639d6787d98e536619249e6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
CMakeLists.txt and .cmake files of significant size
(more than 2 lines according to our check in tst_license.pl)
now have the copyright and license header.
Existing copyright statements remain intact
Task-number: QTBUG-88621
Change-Id: I72c89a98c42bbc9234d8495e9e503bec81d11037
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split a long line, only emit an error message if there is one.
Also remove the QTimeZone include: a recent change eliminated the
dependence on it. (The #include should in any case have been #if'd on
feature timezone.)
Pick-to: 6.4
Change-Id: Id8208b39927c0324597d2008061c48958a7cbbdb
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This puts all use of system time_t functions in one place, instead of
spreading it out. Its implementation improves on what was formerly
done in V4 Date's offset calculations, while simplifying them and
eliminating most of the #if-ery.
Add four more test-cases to tst_qqmlqt::dateTimeConversion(), based on
issues seen on MinGW, getting the time-zone wrong due to the failure
of localtime_r(); MinGW can use localtime_s, as QLocalTime now does.
Revised tst_qqmllocale::timeZoneUpdated()'s conditions. The
QEXPECT_FAIL()s have stopped triggering, at least on Darwin, and the
issue isn't that Date.timeZoneUpdated() wasn't working, it's that (now
only on Android and Windows) we don't have a way to set the system
time-zone referenced by the system functions that QLocalTime calls to
get time-zone offsets. Setting the TZ environment variable only works
on faithful POSIX implementations.
Pick-to: 6.4
Fixes: QTBUG-85149
Fixes: QTBUG-95993
Fixes: QTBUG-102971
Change-Id: I7bc983b9fd7167e3bab3db41dbc1c6f4a78665b9
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
As QNX's support for feature timezone uses the TZ backend,
V4's Date.timeZoneUpdated() works, as on Linux, so tests for
this method now pass.
Pick-to: 6.2 6.3
Change-Id: Ie6c318023bdf508d9f2067ca3fa9d77b78292be5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously each test would include and build sources from the shared
folder. Now we make those sources a library, build it once, then have
each test link to it instead.
We also take the opportunity to move some helpers that qtquickcontrols2
had added into the quicktestutils library where it makes sense, and
for the helpers that don't make sense to be there, move them into
quickcontrolstestutils.
We add the libraries to src/ so that they are internal modules built as
part of Qt, rather than tests. That way we can use them in a standalone
test outside of qtdeclarative.
Task-number: QTBUG-95621
Pick-to: 6.2
Change-Id: I0a2ab3976fdbff2e4414df7bdc0808f16453b80a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was added to qtbase in 9d23aeb.
Qt Quick Dialogs needs it to display file sizes in FileDialog.
[ChangeLog][QML][Locale] Added formattedDataSize() for formatting
quantities of bytes as kB, MB, GB etc.
Fixes: QTBUG-91283
Change-Id: I8ea64f961c04d4900d18fa45398670df89882c56
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Remove all qmake project files, except for examples which are used to
test that qmake continues to work.
Change-Id: Ic4abb72dc2dcd75df7a797c56056b6b3c5fe62ac
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
timeZoneUpdated fails on 32bit (x86/arm) linux.
Task-number: QTBUG-89889
Change-Id: I37815e73447a6e8ab9bf59fa3c356d5bd16d330f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
The feature check for timezone should apply to the whole test; it
makes no sense without. The checks against Q_OS_WIN were redundant in
code already subject to a Q_OS_UNIX check.
Pick-to: 6.0 5.15
Task-number: QTBUG-89889
Change-Id: I419a775bf0777379662aa19e5b0c81fd6e0e26f6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-89889
Change-Id: I95f8e4cc6b26b1a8ab8fde2ecdd30b7b5520b6c9
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
Modify special case locations to use the new API as well.
Task-number: QTBUG-86815
Change-Id: I3b964e3baf0cc7040830156dac30358ea1152801
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The only platform where we may have a semi-adequate native
implementation of the time/date functions is windows. On all other
platforms we should use QTimeZone::systemTimeZone() if possible as that
at least gives us correct results when the system time zone doesn't
change at runtime.
Fixes: QTBUG-84474
Pick-to: 5.15
Change-Id: I34b01e12a751ee1c9b17735810e62e2e847f8446
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: Ia0a075e3199eab735f9b289873beeb8730ebc47e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
Change-Id: I48d7fd306f3d1b161a8e73029282ee591b1ef612
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
dependencies.yaml
Change-Id: Ie3e9dc62031a85e5e81cbdf04694b95159d49fca
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
as type is going to be deprecated.
This change was done automatically with the help of clazy.
In addition, ColumnRoleMetadata was changed to take an int instead
of a QVariant::Type
Change-Id: Ibc02d7b52e7d931a56c19fdebc4788b5e6df2a39
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I0c5b939c70bdb91ccdf7068784308416dcaa5736
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As we want to specify how DoubleValidator and fromLocaleString handle
number separators, we need to expose NumberOptions to QML.
The referenced bug report is still unsolved, as we we still lack a method
to change DoubleValidator's behavior and NumberOptions does not have a
value to ignore occurrences of separators at arbitray places.
Task-number: QTBUG-75110
Change-Id: I81f48439114cad12e0e977bab09b0aa4e240fbab
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| | |
Change-Id: Ie0db35f674137c229eaf049616f38f8e818f7092
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I200c8f58ad13bc1bc78409a3ce49348584ba5b51
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I6f2152aeecaeb8e63fdbc1cdf1444132a054b6f5
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It modifies the global time zone, so if it failed we want to make sure it
doesn't affect the subsequent tests in this file.
Task-number: QTBUG-73512
Change-Id: I3622acc3563ac27ede1b3f39d30e12bb844ac663
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All tests compile and run on a developer build.
These tests are failing:
tst_qqmlsqldatabase Fails due to missing sql driver
tst_qqmlsqldatabase Fails in wip/qt6
tst_ququicklayouts Fails in wip/qt6
tst_flickableinterop Fails in wip/qt6
tst_qquickpinchandler Fails in wip/qt6
tst_qquickflickable Fails in wip/qt6
tst_qquickgridview Fails in wip/qt6
tst_qquickimage Fails due to missing jpeg plugin
tst_qquicklistview Fails in wip/qt6
tst_qquicktext Fails in wip/qt6
tst_qquickcanvasitem Fails in wip/qt6
tst_scenegraph Fails due to missing jpeg plugin
tst_TestFiltering Fails in wip/qt6
Change-Id: I4b9d69c118e23c095cb72ad5a67653fc30943bb1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
| |
Move the qml code to a separate localeAsCppProperty.qml in order for the
qmlimportscanner to see what deployment dependencies it has.
Change-Id: Ic4eba3e0f2ffed69a2cd213d16b2c9142a522d12
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
| |
clang-tidy -p compile_commands.json $file -checks='-*,modernize-use-default-member-init,readability-redundant-member-init'
-config='{CheckOptions: [{key: modernize-use-default-member-init.UseAssignment, value: "1"}]}' -header-filter='qtdeclarative' -fix
Change-Id: I705f3235ff129ba68b0d8dad54a083e29fcead5f
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From now on we prefer nullptr instead of 0 to clarify cases where
we are assigning or testing a pointer rather than a numeric zero.
Also, replaced cases where 0 was passed as Qt::KeyboardModifiers
with Qt::NoModifier (clang-tidy replaced them with nullptr, which
waas wrong, so it was just as well to make the tests more readable
rather than to revert those lines).
Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use QDateTime and QTimeZone to simplify code (when we can).
Note which defective methods are so because the ECMAScript spec
requires those defects, reference my bug report against those defects.
Fix currentTime to return a UTC time.
Fix getLocalTZA to actually deliver the standard offset, without
daylight-saving corrections.
Fix DaylightSavingTA(t) to return the difference between current
standard time offset and pertinent total offset at time t (explaining
why that's the least broken answer), rather than assuming DST is one
hour when active. (In some places it's half an hour, in some places
two hours; and the bugs in the spec break UTC() and LocalTime() if we
only return actual DST offset, without adjusting for historical
changes to standard offset.)
Fix tests to use actual IANA IDs for zones.
Change QTime-to-Time conversion to use a modernish date, for which
time-zone data is likely to at least be consistently handled, instead
of MakeDay(0, 0, 0); that's (nominal proleptic Gregorian) 2 BC,
December 31st (represented denormally) for which any time-zone data we
have is artificial and contrived. I chose Cassini's third centennary,
as it's not likely to be near any zone transitions and is within the
era of sane time-zone data.
Task-number: QTBUG-56787
Change-Id: I5f21ee2010070a5c1798134fdd2915a723208fd9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
Reuse the same const QString in both places, in each of the functions
that repeated this pattern.
Change-Id: Ic20281692d84b3ad5257af9837957e0893452b1a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Nine tests all used setDate and setTime on a default QDateTime, where
just initializing it right, in one line, is simple, terse and easy to
understand. This also allows it to be const.
Change-Id: I77fd8b36b705cafc49f9020ae9280dfdcfece0d8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
While it departs from common date numbering, as used by QDateTime, the
0=Jan numbering used by JS's Date was copied from Java's Date, which
(probably) copied it from ANSI C's struct tm; and C likes to count
from zero. So don't call it weird; and let's comment on it where it's
actually relevant (in JS code with the offset, rather than against
uses of QDate, which uses 1=Jan numbering) and only once.
Change-Id: I926138e88583339bec8641e3b28a642794dc217d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tst_qqmllocale::timeZoneUpdated() was recording the prior time zone,
frobbing it for the duration of its test, then restoring it. However,
if TZ was previously unset, it got set to empty instead of being
unset. This did not quite have the same effect; UTC ends up being
used instead of the system default, with potential for conflict
between system functions (that have attended to tzset) and third-party
libraries (e.g. ICU) with internal state saved from before the change.
Change-Id: I9f2147cd8858316e9ba5fd84d95dfc2c4538b0ab
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
Use booleans as booleans, it's what they're for.
Change-Id: I68c0ba5efcfd3556eeef043b179769e91c77cf03
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some
exceptions, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one
(in those files which will be under GPL 3 with exceptions)
Change-Id: I04760a0801837cfc516d1c7c02d4f503f6bb70b6
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|\
| |
| |
| | |
Change-Id: I11ea57222ba5aa683b7bfd7735fbc1d2cf86e875
|
| |
| |
| |
| |
| |
| |
| |
| | |
Use character literals where applicable.
Change-Id: Ib0e618752fbc762a73a0a91c43efab61ef2c9687
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|