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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
[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>
- 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>
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>