| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
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>
|
| |
| |
| |
| |
| |
| |
| | |
The keyword no longer has a meaning for the new CI.
Change-Id: I699f2881e291cce02a6a608a8710638886e38daa
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|/
|
|
|
| |
Change-Id: I691b8ddff60b5f16f06d32b379c76e87f44f84a9
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer).
- Replace Q[TRY]_VERIFY(smartPointer == 0) by
Q[TRY]_VERIFY(smartPointer.isNull()).
- Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and
add casts where necessary. The values will then be logged
should a test fail.
Change-Id: I8cc97fd9b48fc789a849e9527c292c4e05accd97
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.
Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9
Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][QtQml][Important Behavior Changes] When a JavaScript object/array
is passed to C++ through a QVariant, the engine no longer immediately converts
the object recursively into a QVariantMap or QVariantList but instead stores
a QJSValue in the QVariant. This prevents a loss of data when the JS object
contains non-primitive types such as function objects for example. Code that
expects the variant type to be exactly QVariant::Map or QVariant::List may
need to be adapted. Registered conversion functions however ensure that code
that merely calls toMap() or toList() continues to work.
Task-number: QTBUG-40431
Change-Id: I1dbc1d5f8e78ad28bb62db3681b9a0b34557e7f5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3 & LICENSE.GPLv2
- Removed LICENSE.GPL
Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thanks to improvements in QDateTime's parser, we can unskip a bunch of tests.
What remained was dateFromLocaleTimeString, which failed because it relied on
the earlier behavior of a failed conversion from a _time_ string to a date
also returning an invalid date object. This behavior is restored by leaving
the QDateTime object as invalid unless the converted time is valid.
In Qt <= 5.1, QDateTime::setTime would make the entire datetime object invalid
if the provided time was invalid. In Qt >= 5.2 it remains potentially valid
if the date at least is correct - which was the case here as it was initialized
from currentDateTime.
Change-Id: I32a2cd2a9631cca3b12773e4c55169baa3eeaf1a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-36125
Change-Id: I58454db0c47684aed3e95c52a8135fd5fd6bf2f9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Test was only passing the time to the format function, thinking it was
the only part under test, but the date is also relevant due to DST being
part of the formatted output.
Task-number: QTBUG-34406
Change-Id: I1f542b58907281632ee3c96b9b5b38426936953e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
We prioritize getting other fixes into QtQml right now, so skip these tests.
According bug is filed.
Change-Id: I9b824e41d2164906b22282e75aa80a69a4ce5652
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By including the +10:00 offset in the date strings the test is actually
creating Qt::OffsetFromUTC datetimes, not QT::LocalTime datetimes. The
only reason the test currently passes is due to a bug in the QLocale
datetime formatter which uses the current system daylight time
abbreviation in all cases regardless of the datetime spec or if
daylight or standard time. Change 61774 fixes this bug but cannot
be merged as this test now fails. This change fixes the bug by
removing the offset, causing Qt:LocalTime datetimes to be created
which pass the test both before and after change 61774.
See https://codereview.qt-project.org/#change,61774
Change-Id: I1642ab7c8aa516b703216f3791e2fc60866d1895
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
|
|
|
|
|
|
|
|
| |
The parser needs to be fixed to better parse localized dates, times
and timezone fields
Change-Id: I6542ee459e7135b6f845fb5fc89685cb8c2d67c5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
| |
Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76
Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
|
|
|
|
|
|
|
| |
Change copyrights and license headers from Nokia to Digia
Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
| |
Change-Id: I9cb0da7dbca6401069f572aef15d5375aadce30d
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Caroline Chao <caroline.chao@nokia.com>
|
|
|
|
|
|
|
|
|
|
| |
Qt 5.0 beta requires changing the default to the 5.0 API, disabling
the deprecated code. However, tests should test (and often do) the
compatibility API too, so turn it back on.
Task-number: QTBUG-25053
Change-Id: I6988c2360e9d88916311374a0c910bfc5b607439
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
|
|
|
|
|
|
|
| |
QWindowSystemInterface will be marked as QPA API.
Change-Id: Id174a24f8432219adf1425efe1eb59cf67d48bb9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The timezone that V8 internally uses was not being updated at the
end of one test, causing failures in subsequent tests. This was
only showing up on Windows because the test was being skipped on
Linux due to a typo. Skip the test on Windows due to complexity
of changing the timezone (added comments in code with details).
Change-Id: I47c8542111e8ddfbdeff39815c50d98570b0c6c2
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
If the system timezone is changed, it is necessary to inform
V8 so that the global offset-from-UTC value can be recalculated.
This changes adds the 'timeZoneUpdated' function to the JS
'Date' class exported by QML, which allows QML applications to
inform V8 when the timezone has been updated.
Change-Id: Ic5898ca7bc640002a4a6fd5a52b8623d87ee8085
Reviewed-by: Martin Jones <martin.jones@nokia.com>
|
|
|
|
|
|
|
|
|
| |
This is in preparation of QString's constructor using UTF-8 by default
Change-Id: Ibd0a585342af572e3f74636deb97c1b6b3afeb9a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
|
|
|
|
|
|
|
|
|
|
| |
- Changed tests to use TESTDATA
- moved qqmlcontext to private test as it contains private header
- added check for cross_compile option to skip when sources not available
Change-Id: I0f68f58ffcb1b41b8e40a9851e3e003fe72ee2f9
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
|
|
|
|
| |
Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
|
|
Symbols beginning with QDeclarative are already exported
by the quick1 module.
Users can apply the bin/rename-qtdeclarative-symbols.sh
script to modify client code using the previous names of the
renamed symbols.
Task-number: QTBUG-23737
Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66
Reviewed-by: Martin Jones <martin.jones@nokia.com>
|