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>
QtWayland requires this resource.
Change-Id: I41f83d93582bfe7c471208e8ca844e24dc2c6da5
Reviewed-by: Dan Cape <dcape@qnx.com>
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
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>
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>
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>
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>
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>
They're value types, so pass them as such.
Change-Id: I0dc46c63a3a0e6d859b821362f71390f0148b64c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In emscripten 1.39.4 `maxBytesToWrite` argument is
required for function `stringToUTF16(str, outPtr, maxBytesToWrite)`
Fixes: QTBUG-81728
Change-Id: I634134a30454ae09a9a05593428397b40464b31f
Reviewed-by: jian liang <jianliang79@gmail.com>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
In some circumstances android throws an exception or returns null,
when trying to access the clipboard.
Fixes: QTBUG-80689
Change-Id: I92c134e2a002fc648ff966e15a19eb3307c428a1
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Hardcoding "lib" caused build issues and wrong
INTERFACE_INCLUDE_DIRECTORIES paths in generated CMake configuration
files if INSTALL_INCLUDEDIR pointed to a different location.
Contributes to QTBUG-81289
Change-Id: I3276ecbb4bf5df1c0b4c496c0287b4a69586d683
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
[ChangeLog][QtCore] QCalendar::monthsInYear(QCalendar::Unspecified)
now returns maximumMonthsInYear(). QCalendar::daysInYear() now makes
clear that its handling of unspecified year is undefined.
Change-Id: Ifef8723193868c666f6afeb7f190af4929d30dea
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Avoiding relaxed constexpr support is a small change that doesn't hurt
and it allows us to progress in qtdeclarative without waiting for
general C++17 support in qtbase.
Change-Id: I234276036292346d60d6da3a75bcabbdec9ddde8
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
INSTALL_LIBDIR may point to a different directory than "lib".
Contributes to QTBUG-81289
Change-Id: Ia8220515e3ee3703539aa28655e6c806736615ec
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
INSTALL_BINDIR may point to a different location than "bin". In order
to avoid errors when trying to install qtbase, "bin" is replaced with
"INSTALL_BINDIR" where necessary.
Contributes to QTBUG-81289
Change-Id: I1d4f9fb2617547c9b0e44d6690caebb2b6768e2f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Linux distributions may want to install mkspecs files into a
different subdir in order to make Qt6 co-installable with
older versions.
Contributes to QTBUG-81289
Change-Id: Ie4a64370d742948d5ca4f2eaed6ea550d2676707
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Christophe Giboudeaux <christophe@krop.fr>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
- use new signal/slot syntax
- fix includes
- adjust style
Change-Id: Icdc9b33e72e24c39cc6e96b4f2cafa78e179efbf
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Checking for QT_CONFIG(printdialog) is not enough when printsupport is
completely disabled since then the macro will throw an error. Therefore
add an additional check 'defined(QT_PRINTSUPPORT_LIB)' before using the
QT_CONFIG macro.
Fixes: QTBUG-81626
Change-Id: Ie9898f057cdd6bf9daf4ba9135987cb6e901e7bf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
It appears it's not implemented.
[ChangeLog][QtCore][QLockFile] Suppressed the warning on QNX that said
'setNativeLocks failed: "Function not implemented"'. There is no
difference in behavior: Qt will continue not to be able to apply an OS-
level file lock, which means the lock could be accidentally stolen by
buggy software. Correct software using QLockFile should not be affected.
Fixes: QTBUG-81701
Change-Id: If79a52e476594446baccfffd15ee35bbac6c6e47
Reviewed-by: David Faure <david.faure@kdab.com>
Otherwise CMake sets an up an empty default value itself, and then
the value in QtBuildInternalsExtra does not end up being used, and
then QtSetup ends up setting a Debug value.
Amends 34a112e383
Change-Id: If97a1d8c19ad5e7f690283997ff80dd9588cd521
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Internally this is already supported by all backends. The frontend was just
not exposing addressW, instead defaulting to the (arbitrarily chosen) ClampToEdge.
Add the parameter to newSampler(), but make it optional, defaulting to the more
natural Repeat (because that's what one would get with OpenGL for WRAP_R by default)
Change-Id: I0b991d8b649db37d4da86ac8e98ab7845601cf67
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
It needed re-implemented in terms of the new API (in case QTime(0, 0)
was skipped, on the date in question, by a spring-forwrd), which makes
it redundant (and supports choice of spec and zone or offset, which it
did not).
Change-Id: I1e3c3e794632c234f254be754ed6e4ebdaaaa6bc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The support for QNetworkConfiguration was deprecated in 5.10 but the
documentation was still alluding to the functionality.
Change-Id: I7597388c646196fb4744d7bac4f890ca582c5b75
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
If the first call to GetLocaleInfo() returned non-zero, then
GetLastError()'s return has nothing to do with GetLocaleInfo(), since
it didn't fail. The check for ERROR_INSUFFICIENT_BUFFER as last error
needs to happen in the branch where GetLocaleInfo() failed, returning
zero.
Change-Id: Idb6eaad1515a003133c787998aff0c265ef98251
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This enables us to make the sizes quint8 and benefit from the
resulting packing, making the locale data smaller. The sizes for long
month-name lists (which concatenate twelve names with semicolon as
separator) can overflow an 8-bit member, so use quint16 where needed.
Re-ordered the data in QLocaleData and QCalendarLocale. Now all
long-short(-narrow) families arise in that order; and any standalone
is grouped with the one of the same length. (This cost 20 bytes in the
date-format table, which optimises out more duplication if short is
before long, but the saving in the (smaller) time-format table more
than make up for it; and 20 bytes isn't worth the confusion that being
inconsistent in ordering might cause.)
At the same time, drop trailing semicolons from list entries (which
join various names with semicolon) as they're not needed: we know
where the end of the list is, because we know the size of the string
that results from concatenation. The code that parses such lists can
even correctly handle empty entries at the end.
Saves 26 kB of data in the compiled binaries.
Task-number: QTBUG-81053
Change-Id: If6ccc96a6910828817aa605d10fd814f567ae1e8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Add QLocaleData::DataRange and methods returning it, to package each
of the m_*_idx, m_*_size pairs of data members, to simplify access to
these data. This extends the experiment started in QCalendarLocale,
which is now adapted to use the new DataRange also. Two static
functions of qlocale.cpp are replaced by methods of DataRange, saving
considerable duplication of long member names in callers.
Change-Id: Iad9899ba72f00522594b55a0402baec47491999c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Some entries in tables were sub-strings (e.g. prefixes) of others.
Since we store start-index and length (with no need for terminators),
any entry that appears as a sub-string of an earlier entry can be
recorded without making a separate copy of its content, just by
recording where it appeared as a sub-string of an earlier entry.
(Sadly this doesn't apply to month- or day-names and their
short-forms: for those, we store ';'-joined lists. Thus, although
each short-form is a prefix of its long-form, the short-form is stored
in a list with other short-forms; and this is not a prefix of the list
of matching long-forms.)
The savings are modest (780 bytes at present), but cost us nothing
except when running the python script that generates the data files
(it takes a little longer now), which usually only happens at a CLDR
update.
Change-Id: I05bdaa9283365707bac0190ae983b31f074dd6ed
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
It was more complex than it needed to be and was a test of QString,
not of QLocale. This leaves tst_QLocale::negativeZero() available to
now test how QLocale handles negative zero.
Change-Id: Ic9aae250c29f579e6d60fba8404b38673a3b489f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Split a long line.
Use pythonic chained comparison to save some repetition.
Comment on a field not currently in actual use.
Say "zeros" rather than "0s" in one comment to match another.
Added a .h suffix to the main locale data tempfile to match the naming
of the tempfiles used for calendar data.
Simplify generation of the blank line between Language and Script; and
include a matching blank between Script and Country.
This adds one blank line to qlocale.h
Removed a stray space that misaligned locale data lines.
This produces a space-only change in the generated *_data_p.h files.
Change-Id: I974a9e8923c3dfd2178855d2cf1d6a5074e130b3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
We have long (since 4.5.1) coerced it to lower-case, for no readily
apparent, much less documented, reason. CLDR says most locales use an
upper-case E for this - let's actually use what CLDR says we should
use.
The code that matches the exponent separator was doing so
case-insensitively in any case; that needed adaptation now that the
separator's case isn't pre-determined; and, in any case, should have
been done using case-folding rather than upper-casing. In the process,
removed some spurious checks for "'e' or 'E'" in the result, since the
exponent separator is always represented by 'e' (and an 'e' might also
be present for the separate reason of its use as a beyond-decimal
digit representing fourteen).
[ChangeLog][QtCore][QLocale] QLocale::exponential() now preserves the
case of the CLDR source, where previously it was lower-cased.
Change-Id: Ic9ac02136cff79cb9f136d72141b5dbf54d9e0a6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Also move the setting of default RCC_DIR into qtFlattenResources as we
need a valid RCC_DIR there.
Fixes: QTBUG-81699
Fixes: QTBUG-81713
Change-Id: I7558d99f3aca75d2e9cad0ec89fbb0aa0758dcc7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
These tests fail locally, and have been reported to
fail on the CI system.
Change-Id: Ia76bb15c288af4171ebe47b3c30f3651a63df3f2
Task-number: QTBUG-75786
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Use QPalette::Button instead of Base as does QFusionStyle
so that style sheets specifying colors for the non-editable
case work correctly.
Fixes: QTBUG-81573
Change-Id: I84cecb38a48a1450c82498558aa350f3e60a5df6
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
They're value types, so we should show them being used as such.
Change-Id: If9f0c366fac66306b7861f04e2f047540d444acc
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Since datestring implies textdate, we don't need to check the latter
inside the #if-ery of the former.
Change-Id: I01e648245bc7707db024eac925092ed816173781
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Qt::LocalDate has been deprecated for ages as an alias for
Qt::SystemLocaleDate, which we intend to remove at Qt 6; and all use
of them can (and should) be converted to use QLocale::toString().
So do that.
Task-number: QTBUG-80441
Change-Id: I0a40fa287cb347c704ec3673d17ef18381063f7f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
As the method returns a pointer to a private type (QPA), add see
also with link to QPA docs.
Fixes: QTBUG-76978
Change-Id: If59670ca0a9a47b42b6441baa23525eb20f92979
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We must use Windows line endings in .vcxproj files to separate command
lines of custom build steps.
This amends commit f65cfadd.
Fixes: QTBUG-81553
Change-Id: I8d257f3846af7006df7f8d462b8f44efdce6a1fd
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
The qt5_make_output_file macro returns the wrong outfile for infiles
containing multiple dots in the file name, e.g. 'foo.bar.h'. To fix
this we need to use get_filename_component(... NAME_WLE) which is
available since CMake 3.14. Re-implement the NAME_WLE functionality
for older CMake versions by using multiple get_filename_component
calls.
Fixes: QTBUG-80295
Change-Id: Ib8e11a69a41ba7f6739eb3d5541ce8f6f59dc18c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>