Commit Graph

44219 Commits

Author SHA1 Message Date
Thiago Macieira
02eb9df851 Add new AVX512 extensions found in Intel CLX, ICL and ICX processors
Cascade Lake (CLX) added AVX512VNNI, Ice Lake has added that plus the
integer multiplication (IFMA), the vector bit manipulation instructions
(VBMI and VBMI2), bit algorithms (BITALG), the extended vector AES
instructions (VAES), among others.

I haven't turned on the configure check for those yet. I believe the
VBMI and IFMA instructions will be interesting for Qt image algorithms,
but we'll need some Ice Lakes to do benchmarking on.

Change-Id: Ib5d667bf77a740c28d2efffd15cb43dd821d4b2d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-02-03 11:31:49 -07:00
Thiago Macieira
056230cc9c qfloat16: include the tables in AVX2 binaries regardless
Having a QtCore build optimized for AVX2 does not imply all user
binaries and libraries are optimized the same way. Most of them will
actually have been built for the base platform, which means they require
access to these tables to operate if they are using qfloat16.

Introduced by 5e40d3d982.

Change-Id: If79a52e476594446baccfffd15ee2da9e3693cce
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-02-03 10:31:25 -08:00
Lars Knoll
c6e1b54f94 Cleanup code where we mixed QHash and QMultiHash iterator code
Change-Id: Ib229cad13ca21d6288e009c6ee1c39fa974f80b8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-03 17:43:30 +01:00
Lars Knoll
7f67e91e55 Don't compile qmake in c++11 mode
Change-Id: Ia43dd67f3b83263b4be16e468b8c22598db9ac78
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-03 17:43:30 +01:00
Lars Knoll
eea82ab75d Cleanup QDBusArgument marshalling for containers
There's no need to specialize the marshalling for QList, QHash and QMap
when we can simply have generic code here that works for all containers

Change-Id: I442ac6009953d2bd8e5a7012262cffeb8e912034
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-03 17:43:30 +01:00
Lars Knoll
4681f1fc2c Separate streaming of QHash and QMultiHash/QMap and QMultiMap
Those classes will not have relations anymore in Qt6, so they need
separate streaming operators. Writing of multi maps/hashes requires some
additional care so that restoring keeps the order of how iteme have been
inserted.

Change-Id: If41d0c5c24962764a2cb81bd2de9e2fadf1a2b63
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-03 17:43:30 +01:00
Lars Knoll
10afe69c16 Use a QMap instead of a QHash for the ProValueMap
qmake relies heavily on stable references to nodes stored within the
container. QHash in Qt6 doesn't offer that guarantee, so use a QMap
instead, that supports this.

Change-Id: Ifcf3d67098585ea26f4e02f4570d407a56e33c9c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-02-03 17:43:30 +01:00
Lars Knoll
91b12a1add QVariantHash/Map can't hold multiple entries for the same key in Qt 6
This is a consequence of QHash being separated from QMultiHash.

Change-Id: Id3bb585c9882ecbaa02691c8ba6553748dd21a24
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-03 17:43:30 +01:00
Alexandru Croitor
4e7af2061e Merge remote-tracking branch 'origin/wip/cmake' into dev
This pulls the CMake port, which not only adds CMake files but also
modifies existing code. A brief summary of "seemingly unrelated" changes:

    * configure.json was re-formatted to not use multi-line strings. That
      is an extension of the Qt JSON parser but not JSON compliant, which
      is needed for the configure.json-to-cmake conversion script (python).
    * Some moc inclusions were added due to CMake's slightly different way
      of handling moc. With the changes the files build with qmake and cmake.
    * Since CMake just grep's for the Q_OBJECT macro to determine whether to
      call moc (instead of doing pre-processing like qmake), the existing use
      of "Q_OBJECT" in our documentation was changed to \Q_OBJECT, which cmake
      doesn't see and which is now a qdoc macro.
    * QTestLib's qFindTestData was extended to also search in the source
      directory known at build time.

What this change also brings is a new way of building modules in Coin by using
YAML configuration files that describe the steps of building and testing in Coin
specific terms. The platform configuration files in qt5 are instructed to use the
old Coin built-in way of testing ("UseLegacyInstructions" feature) but for any
configurations that do not have this, these yaml files in the coin/ sub-directory
are used and shared across repositories.

Change-Id: I1d832c3400e8d6945ad787024ba60e7440225c08
2020-02-03 15:01:53 +00:00
Edward Welbourne
71fa90a37c Enable system locale to skip digit-grouping if configured to do so
On macOS it's possible to configure the system locale to not do digit
grouping (separating "thousands", in most western locales); it then
returns an empty string when asked for the grouping character, which
QLocale's system-configuration then ignored, falling back on using the
base UI locale's grouping separator. This could lead to the same
separator being used for decimal and grouping, which should never
happen, least of all when configured to not group at all.

In order to notice when this happens, query() must take care to return
an empty QString (as a QVariant, which is then non-null) when it *has*
a value for the locale property, and that value is empty, as opposed
to a null QVariant when it doesn't find a configured value. The caller
can then distinguish the two cases.

Furthermore, the group and decimal separators need to be distinct, so
we need to take care to avoid cases where the system overrides one
with what the CLDR has given for the other and doesn't over-ride that
other.

Only presently implemented for macOS and MS-Win, since the (other)
Unix implementation of the system locale returns single QChar values
for the numeric tokens - see QTBUG-69324, QTBUG-81053.

Fixes: QTBUG-80459
Change-Id: Ic3fbb0fb86e974604a60781378b09abc13bab15d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-02-03 15:34:02 +01:00
Edward Welbourne
3730452bfe Fall back to "+" if MS returns empty string for positive sign
MS's documentation says empty means "+" here, so implement that
fallback (which shall over-ride whatever the CLDR has given us for the
fallbackUiLanguage's positive sign).

Task-number: QTBUG-81530
Change-Id: Ic3f10dd061d0c46d1433f29b8065988da94c38e6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-02-03 15:33:53 +01:00
Edward Welbourne
e0f9b57462 qlocale_win.cpp: distinguish empty QString from null QVariant
An empty string, when packaged as a QVariant, is non-null (as a
QVariant); and QSystemLocale::query()'s callers care about the
difference.

Some callers of the internal getLocaleInfo(LCTYPE type, int maxlen)
need an actual QString return, while others are what query() returns,
so need to return a QVariant; where the former want an empty string,
the latter need a null QVariant. So make that getLocaleInfo() into a
template, so callers can chose QString or QVariant as return type,
only affecting the failure returns.

Change-Id: I7b9a698badedc0e0d8aef8c6e85c22931c33297a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-02-03 15:33:33 +01:00
Tor Arne Vestbø
bf2216c32b Fix isRunningArmOnX86 unused function warning
Change-Id: Ic51e85d2e6e24860f8e980a243a45ec4dc1253cd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-03 15:03:51 +01:00
Giuseppe D'Angelo
2d265dce58 Markdown importer: properly set hyperlinks
The "title" in markdown is the tooltip, not the name attribute of
a link. Also, tell the char format that it's an anchor.

Change-Id: I2978848ec6705fe16376d6fe17f31007cce4b801
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-02-03 14:58:06 +01:00
Giuseppe D'Angelo
c29fac453f Markdown importer: use Unicode decoding
Given we feed UTF-8 data into the importer, it must be able to cope
with Unicode. Build md4c with UTF-8 support, advertise it at
usage site, and change a couple of broken decodings.

Driveby: the textedit example used the wrong codec to decode
a Markdown file. While the Markdown spec doesn't deal with encodings,
using the default one for HTML is certainly wrong. Port the loading
of both markdown and plaintext to UTF-8, as that what _saving_
via QTextDocumentWriter would use by default.

Change-Id: I51c6214cfe45ebfc5a67a7366f7866a5328366ec
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-02-03 14:58:00 +01:00
Assam Boudjelthia
77e8023eaf Android: use the correct string resources for ok and cancel
Fixes: QTBUG-76942
Change-Id: I0c0ccad4980a458ab291ca8ee533fadbedc90456
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-02-03 15:47:57 +02:00
Tor Arne Vestbø
27db9e458c testlib: Clarify that our XUnit reporter is actually a JUnit reporter
The reporter was probably named 'xunit' based on the historical use of
xUnit to refer to testing frameworks derived from Smalltalk's SUnit.
These frameworks typically added their own prefix, e.g. JUnit for Java,
RUnit for R, etc.

The most popular of these was the JUnit framework, and the corresponding
XML output produced by the Ant built tool became somewhat of a de facto
standard, which is probably why we chose to model our reporter after it.

Nowadays however, naming it 'xunit' is problematic as there is actually
a testing famework named xUnit.net, typically shortened to, you guessed
it: xunit.

Test report consumers will typically have a junit mode, and an xunit
mode, and the latter could easily be mistaken for what testlib outputs,
unless we clarify this.

The clarification also allows us to safely extend our support for the
JUnit XML format to incorporate some elements that are nowadays common,
but where we are lagging behind the standard.

[ChangeLog][QTestLib] The formerly named 'xunitxml' test reporter has
been renamed to what it actually is: a JUnit test reporter, and is now
triggered by passing -o junitxml to the test binary.

Change-Id: Ieb20d3d2b5905c74e55b98174948cc70870c0ef9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-03 13:48:25 +01:00
Laszlo Agocs
75ad13d2bc rhi: Improve isClipDepthZeroToOne() doc
Quick 3D is now having a use case for calling this directly, so use this
opportunity for enhancing the docs to make it clear what this is about.

Change-Id: I19ec956ac25175dbfb754192abaad8d65a6eeb0e
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-02-03 12:05:03 +01:00
Alexander Neundorf
71cf207b54 QGraphicsItem: optimize setCursor() for large number of graphic items
This patch optimizes setCursor() by invoking view->items(position) only
if the current graphics item is under the mouse cursor. If it is not,
setting the cursor for this item should not have any effect on the
actually currently visible mouse cursor, so there should be no
reason to call _q_setViewportCursor() at all in this case, so
it is not necessary to query for all the items under the cursor
position.
In my use case this gives a significant performance improvement
from slow behavior to almost immediately (Linux with X11).

My scenario is that I have many rectangular graphic items next to each
other in a graphics view, and there is the functionality to add one
more graphics item (a "handle") to one of those rectangular graphics
items, and then for this new "handle" a new graphics item will be
added on each of the other existing rectangular graphics items.
The ctor of the "handle" graphics item calls
setCursor(Qt::OpenHandCursor). QGraphicsItem::setCursor() calls
view->item(cursorPosition), and then updates the visible cursor
according to the top most graphics item under the cursor.

So assuming that there are e.g. 1000 rectangular graphics items next
to each other, each showing e.g. 5 "handle" graphic items, adding one
more "handle" graphics item will add one graphics item on each of the
1000 rectangular items, so 1000 times view->items(cursorPos) will be
called, at the beginning with 6000 graphic items (1000 rectangles and
5000 handles) already in the scene, for the last one with 6999 items
in the scene (999 "handles" have been already added), from which the
ones under the cursor have to be found.
This is basically O^2 complexity. With the patch it changes to
linear regarding the number of rectangular graphics items.

Change-Id: I9836fc710a8f11d01a94930ea64c6c946e0db282
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-02-03 11:40:52 +01:00
Leander Beernaert
465949420a Update add_custom_command and add_custom_target dependencies
If we don't add the executable used by the custom_target and/or
custom_command to list of the command's/target's dependencies
(DEPENDS) the generated file will not update should the executable
change.

Change-Id: Idce30f3dd4f756d9e8f6848c5e16f5dd6c7c8f0a
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-03 08:07:03 +00:00
Eskil Abrahamsen Blomfeldt
07e5a05dcb Suppress deprecation warnings for QFont::ForceIntegerMetrics
This flag has been deprecated, but until we remove it completely
we need to continue supporting it, so we just suppress the warnings
for now.

Change-Id: I464e1cce42f78af76d46ec12eeb3e8d53d64d6a3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-02-03 07:08:53 +01:00
Oliver Wolff
a049325cc7 Win: work around (estimated) 32k char limit for OutputDebugString
Reaching a certain number of characters, OutputDebugString will just eat
the string and not give any output. As there is no way of handling that
error properly we divide the string into usable chunks.

Fixes: QTBUG-80996
Change-Id: Ic7ef34c48c212cbaec3a03790d1020506b7b4319
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-02 17:35:14 +01:00
Alexandru Croitor
479d0c61d0 Bump version
Change-Id: I5ded7891d0d371b2fa8a38d7c6fba765268eb1ce
2020-02-02 13:41:14 +01:00
Christian Ehrlicher
06f88d2177 QtSql: add missing key for MariaDB
When support for MariaDB was added in
947704cefe the key 'MARIADB' was not added
to the json file.

Change-Id: I8565a4a3804028806c1d2ff992329ece24de3fc5
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-02-02 13:04:46 +01:00
Vitaly Fanaskov
0b325602b1 QButtonGroup: remove deprecated signals
Task-number: QTBUG-80906
Change-Id: I6f697b0a070ba4c401117fe7cdf02429b47d9a11
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2020-02-02 02:05:49 +01:00
Linus Jahn
aadf21b25c Fix 'the the' typo in comments
Change-Id: I00fcb1c2374e7ca168b6240f9d41c0323fb0867c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2020-02-02 01:18:25 +01:00
Vitaly Fanaskov
dd42e5d5e7 QSignalMapper: deprecate overridden signals
Task-number: QTBUG-80906
Change-Id: I9beab78d8fe8dfc712969f65792f50360a890287
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2020-02-01 21:23:44 +01:00
Friedemann Kleint
e56b8e1e59 QWindowsXPStyle: Fix MDI button size for maximized QMdiSubWindows
The controls as drawn by the UxTheme library are too tiny; add an
additional correction factor to
QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), allowing
to scale the result via the QImage.

For the MDI button size, calulcate the factor by comparing the
theme size to the subcontrol rectangle.

Fixes: QTBUG-75927
Change-Id: Iab0911b51d13f3de0d9278a32cb4598ce709d745
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2020-02-01 17:48:37 +01:00
Christian Ehrlicher
d52ed0a8ea Sql driver doc: fix typo
Fix a small typo in the link to vcredist.exe

Change-Id: I8b2724bd01889ac439bcd1a762a7c74df9882492
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-02-01 14:21:36 +01:00
Tor Arne Vestbø
0c8ff269dc testlib: Unite Windows and Unix signal handler code
Change-Id: I7b9d480008167c071bf925d655eb97ef437bc206
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-01 10:43:52 +01:00
Tor Arne Vestbø
d005d743de testlib: Implement FatalSignalHandler inline
Change-Id: Ie6f151cb099151616f83ea8d5e11e6625bedeb8c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-01 10:43:44 +01:00
Kari Oikarinen
89f443dfbc QScopeGuard: Fix build failures with qScopeGuard()
Partially reverts 4f077b7e5f.

Can't overload with forwarding references and lvalue references. Use a single
forwarding reference overload, but take care of not trying to create a
QScopeGuard of reference type and forward instead of moving.

Add tests to ensure calling with both lvalues and rvalues is possible.

Change-Id: Ia034afe0a8feb08246c2c7c154a85cae37421c98
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-01 11:07:08 +02:00
Eskil Abrahamsen Blomfeldt
beede51bca Fix rendering offset when using DirectWrite engine
When rendering the glyphs into the texture, we need to translate
by the margins (this is accounted for later). The visible
symptom for this was that when the DirectWrite engine was used
all glyphs would be two pixels to the left (which could be seen
when placing a cursor at the glyph for instance, and sometimes
the edge of the glyph was clipped).

Change-Id: Ife72ae8b5663cf43448ae0f8323a459210609b4d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-02-01 10:04:19 +01:00
Friedemann Kleint
b35dda7ee7 QWindowsXPStyle: Adapt the size of MDI buttons for maximized MDI subwindows to High DPI
Scale the size according to DPI, fixing the buttons being too small
on High DPI screens with Qt High DPI scaling turned off.

Task-number: QTBUG-75927
Change-Id: Ibdcfa994164ca7bb72a831f1afe1267b4d5010cf
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2020-02-01 09:39:50 +01:00
Friedemann Kleint
2a5f5f6049 QWindowsXPStyle: Factor out repetitive code for MDI/Window title bars
Use static helpers to populate the XPTheme struct.

Task-number: QTBUG-75927
Change-Id: I49201f56fd5a4ef7eeb86c01dfc858022f465792
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2020-02-01 09:39:50 +01:00
Allan Sandfeld Jensen
5ac1516edd Check for (__ARM_FP & 2) to verify 16-bit FP support
It appears __ARM_FP16_FORMAT_IEEE is sometimes incorrectly set, and
we need to double-check that 16-bit floating point is available in the
__ARM_FP macro as well.

Task-number: QTBUG-68314
Fixes: QTBUG-81461
Change-Id: I878d6b286aa31e21271163dc6c8f8038b9534c76
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-02-01 09:23:17 +01:00
Tor Arne Vestbø
facb8b7491 testlib: Properly cleanup after caught exception
We were only doing half of what qCleanup was doing in the
exception case, and in an inconsistent order. There's no
reason not to just call qCleanup to align the behavior.

Change-Id: Ic4e63afb4733de5b01a79272cca8908fca3de762
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-01 00:49:23 +01:00
Tor Arne Vestbø
0dc31e667f testlib: Simplify macOS setup/teardown code
Change-Id: If92845ccb044becee136c7791fdb3cfe3641b28d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-01 00:49:19 +01:00
Tor Arne Vestbø
5940d20c69 testlib: Fix indentation
Change-Id: I54bb2c3dda731e1fd6c7e909aa30a3cedb53612b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-01 00:49:15 +01:00
Tor Arne Vestbø
828e14b5f9 Fix unused argument warning in test
Change-Id: I9f55efee82f8d855d89977b3e4db32855e110c87
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-01 00:49:11 +01:00
Tor Arne Vestbø
ac0a266e75 testlib: Don't disable watchdog when the macOS crash reporter is enabled
The debuggerPresent() function was used both to decide whether we should
print our own stacktrace, and if we should start the watchdog timer, but
checking for the macOS crash reporter only applies to the former usecase.

The crash reporter check has now been split into a separate function, only
used to decide whether we should print our own stacktrace or not.

Change-Id: I282aa57a51c14b07d3cbd547b551b6bf81b61897
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-02-01 00:49:07 +01:00
Sze Howe Koh
e6f479a830 tst_QDataStream::readQCursor(): Replace deprecated QCursor API
Task-number: QTBUG-48701
Change-Id: I4205d278b1cd6b088f8f58020f6a5e49a7f1ca33
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-02-01 07:31:02 +08:00
James McDonnell
aec3c6a9cb Add EglDisplay resource to the QNX platform plugin
QtWayland requires this resource.

Change-Id: I41f83d93582bfe7c471208e8ca844e24dc2c6da5
Reviewed-by: Dan Cape <dcape@qnx.com>
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2020-01-31 18:31:01 -05:00
Sze Howe Koh
b90eaa3bb5 Examples: Replace deprecated QLabel API
Task-number: QTBUG-48701
Change-Id: I6fc875a35dfc3bf4d906d0f0e495c18ef566d1e1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-02-01 07:31:01 +08:00
Allan Sandfeld Jensen
967e55a628 Allow creating a valid QColorSpace one value at a time
The change to using setters left a quirk from the previous un-mutable
design where you couldn't set values on an invalid color space and
create a valid one.

This changes that so it works as expected for an imperative API, but
is also needed for the declarative QML bindings.

Change-Id: I246cfc38b364b156238151c42c1df82a3f1cc9d3
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-02-01 00:31:01 +01:00
Allan Sandfeld Jensen
c76dd72dc6 Add a constructor for QRunnable from anonymous functions
This makes it easier to create one without having to create
a derivative class. The patch also adds a path to avoid using
QRunnable directly in QThreadPool.

Change-Id: I9caa7dabb6f641b547d4771c863aa6ab7f01b704
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-01-31 19:20:43 +01:00
Edward Welbourne
6c4e0f2d2d Deprecate QLocale::toTime() variants taking a calendar
The calendar is ignored, so adding these methods was a mistake.

[ChangeLog][QtCore][QLocale] Deprecated toTime() variants taking a
calendar. The calendar is ignored in time parsing.

Change-Id: I79fa994ce88f13fdb931163b447eb1a9ad655c09
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-01-31 19:20:43 +01:00
Edward Welbourne
d6ba2ae441 Consolidate some Q(Date|Time)+ methods to call calendared versions
The string-returning methods were in any case delegating to either a
local static or QLocale methods that delegate to their calendar
variants, so do the default-calendar step early and reduce the number
of distinct code-paths, along with the gross number of lines of code.

In the process, short-cut past QDate::toString() when we can save its
switch and go direct to the toString{Text|Iso}Date() it's calling.
Tidy up somewhat in the process.

Change-Id: I8ba70b29ef9e8b6553c41310ebb2b63ec5570bb9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-01-31 19:20:43 +01:00
Edward Welbourne
d6d98f782a Deprecate locale-related DateFormat enum members
Qt 6 shall remove all locale-dependence from Q(Date|Time)+.

Task-number: QTBUG-80441
Change-Id: Iebaaa2bd776bccfe0d73c15f36cbdd456b71ca59
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-01-31 19:20:43 +01:00
Edward Welbourne
05ce1821cd Add missing calendar methods to QDateTime and docs
We missed a few, so complete the general scheme of accepting an
optional calendar, where it would be relevant.

[ChangeLog][QtCore][QDateTime] Added some missing QCalendar variants
of QDateTime::toString(). Included docs for QCalendar variants in both
QDate and QDateTime.

Change-Id: Ief7b4dada73d7a4055b75d8b47ff4d2e310ce738
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-01-31 19:20:43 +01:00