The code was assuming that if the parsing of the value worked,
then it must be a list of 4 variants. But in this case it's just
a single length.
This came from <td> using 4 values for border-width
while other elements use a single value. But the storage
is shared. So the fix is to use 4 values everywhere.
When reading 4 and there's only one, it gets duplicated,
so the caller can just use the first one in that case.
Task-number: QTBUG-80496
Change-Id: I682244b6e3781c4d673a62d5e6511dac263c58e8
Reviewed-by: Nils Jeisecke <nils.jeisecke@saltation.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The dark edit field is now centered within the frame around it, with a
thin border on all sides, including between input field and button.
Change-Id: I27e853289e9048c21fdc81e45fadacba9665b49e
Fixes: QTBUG-63454
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The JavaScript implementation of that function has
the following code:
if (typeof JSEvents === 'object')
JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas); // Release all
// JS event handlers on the DOM element that the GL context is associated with since the context
// is now deleted.
This breaks mouse/keyboard events, etc.
Disable this logic by temporarily setting the JSEvents object
to undefined, for the duration of the emscripten_webgl_destroy_context
call.
Fixes: QTBUG-74850
Change-Id: Ied3177b0ca6e63e8ea07143bf7d6a850b0bce35a
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Two little tool functions had come between it and the function it
actually describes.
Change-Id: Ib49d1623833275ea79c7916fece29aed9503aa40
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
These were kept around to keep Qt Quick compiling, but the
migration there has been done a long time ago. Remove these
leftovers now.
Change-Id: Ibd47381b410b11b5475a85c7ed3cb05c22f7adbb
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
AppKit will initialize NSScreens nowadays, so we don't need to manually
trigger it.
Task-number: QTBUG-80193
Change-Id: Ic0251a1b978b9d4ff53f20e67902787cf529fa87
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
QVulkanWindow support has long been removed from the Vulkan backend.
The include is a leftover from those times.
Change-Id: Ie68ac3611b24310f2b6111a72dd0679adafdc74d
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Otherwise combobox with editable text field won't work.
Change-Id: I135c3a63cf8fba66d724e140a5a63828853e154e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
We need to reset the pressed index when the decoration was pressed on
otherwise if the mouse ends up over an already selected item that was
previously clicked on. This prevents it from thinking that the mouse
has been released on this item right after pressing on it.
Fixes: QTBUG-59067
Change-Id: Iab372ae20db3682ab0812661f86533079ba4083c
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Instead of OID as string, OpenSSL returns a human-readable name.
No need to fail then, use such a name in QVERIFY if OID not found.
Fixes: QTBUG-80329
Change-Id: I4392fc9f37367f7c34c05d172db015b44e2a8497
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The WebGL 2.0 specification explicitly does not support texture swizzles. Therefore,
disabling it when targeting WASM. This fixes "WebGL: INVALID_ENUM: texParameter:
invalid parameter name" when running in Chrome or Firefox.
Change-Id: Ic7e22e0f623095245274924095cb63fd0ff7e8c2
Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#5.19
Fixes: QTBUG-80287
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Add the equivalent intel warning macro in public header where there
was already the macro for -Wfloat-equal
Change-Id: I8f20400f0b95c8f3857fa7a0a33464c8c34d5c0e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The aim is to make it suitable to test for High DPI
bugs, ideally removing the need to provide bug report
examples.
- Add descriptive window titles/output
- Add options to force scaling on/off
- Change the updating of the text to be done in screenChanged()
and log the signal.
- Rearrange the layout and show the descriptions as labels
Task-number: QTBUG-80323
Change-Id: Ia44c184c2b38cb18045c40b440fe785c6c17925f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
- Use C++ constructs like range-based for, member initialization
- Fix formatting in a few places
- Silence clang warnings:
- Add override
- Make member variables private
Task-number: QTBUG-80323
Change-Id: I5b0fda06acb6c8054aafa4dd934b763f8493a6b3
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Unlike renderbufferStorage, renderbufferStorageMultisample is not
guaranteed to accept the unsized GL_DEPTH_STENCIL internalformat. For the
former, WebGL 2 guarantees it for compatibility for WebGL 1, but the
multisample version does not exist in WebGL 1, so from the specs it is not
given at all that the unsized format would be accepted. So use the ES 3.0
sized format instead, like we would on a "real" ES 3.0 implementation.
Fixes: QTBUG-80296
Change-Id: I822ae382097085c0a3279c16bb69a173dbf15093
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
macOS fails to create a zone for the name its own systemTimeZone
claims to have (see new comment). So make sure we do consistently
recognize the name systemTimeZoneId() returns, using systemTimeZone
from which we got its name.
Add minimal testing of system time-zone.
Fixes: QTBUG-80173
Change-Id: I42f21efbd7c439158fee954d555414bb180e7f8f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We introduced a work-around for iOS 11 which breaks on more
recent OS versions because we try to request meta-fonts by
name instead of using the special system font descriptors.
This would cause warnings on the console and Times New Roman
when requesting e.g. the system fixed width font.
When testing on iOS 12 without the work-around, we are no
longer able to reproduce the original issue, so the
assumption is that this problem has been resolved. Since
iOS 11 is not a supported target for Qt 5.14 we can remove
the work-around entirely.
[ChangeLog][macOS/iOS] Fixed a bug where QFontDatabase::systemFont()
would return the wrong fonts on macOS 10.15 and iOS 13.
Fixes: QTBUG-79900
Change-Id: Ie375c8c2ab877d6d66e3696662c4939f639a6e9e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Fix an issue where qmake on macOS will generate a Makefile with a path
to a macOS bundle instead of a bundle-less executable in the Makefile's
check rule if cmdline is specified before testcase in the CONFIG
options.
Fixes: QTBUG-80280
Change-Id: Icc9ee1355b0641981ce79526b36f29957e1afb00
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Introduced by fe6e54fb1f. The probability -> 0,
meaning malloc must fail to trigger it, but it is still a leak. We now use
std::unique_ptr which improves the code in general a bit and fixes a leak.
Change-Id: I6c0fa36953196d3235fb60354dc9ad2396d8dfcb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
When the geometry of a hidden widget was set with setGeometry(),
WA_PendingMoveEvent and WA_PendingResizeEvent were set unconditionally
even if the crect already had the correct value. This lead to
unneeded Move/Resize events within sendPendingMoveAndResizeEvents().
Fixes: QTBUG-75475
Fixes: QTBUG-79906
Change-Id: Ibbe03882f039948b6b7c04887420741ed2e9c0f7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
It set the time-zone member sensibly to the default zone, but then
called init("UTC"), which over-wrote that default with UTC. This had
no visible effect (as the default-constructed object is only used to
access methods that (though virtual) are effectively static), but was
needlessly complicated.
Tidied up systemTimeZoneId() at the same time.
Change-Id: I897aff16855c28487a1029bef50c75ebc1ff5b55
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It was setting the system zone ID if it somehow managed to find a
match for an empty zone name; that makes no sense.
A case-insensitive comparison seems reasonable for the "this isn't
just a default zone object, used because the name I asked for isn't
recognized" check.
It set m_id after it had checked everything, where it could just as
well have used m_id as the variable in which to record whether its
check has succeeded already.
It was using the name it was asked for, rather than the one this ended
up being mapped to, which is probably a better name to use for
it. (This should only differ in case.)
Split a long line.
Change-Id: I41a3b01ba99522ee68f3d7941c532019b9ebf946
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The ones we reject used a zero offset while the one that does parse
(though it shouldn't - revised comment) has a one hour offset. Made
them all use that offset and added a partner test that has no invalid
characters, so ensure the success of the invalid character tests isn't
due to falsely rejecting the valid date/time text to which the invalid
characters are added.
Task-number: QTBUG-80038
Change-Id: I6e3dd79b981af6803e60877229c56599cfd719cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The qdatetime implementation's rfcDateImpl() uses regexes which did
not match its comments; nor did either the regexes or the comments
match what was documented. A review of relevant RFCs suggests we
should revise this in future, probably at Qt 6.
The documentation also only addressed the formats recognized when
parsing a date-time, without indicating how they are serialised or how
dates and times are handled separately.
Added a note to the tests for the read-only formats, to remind the
reader that the RFCs merely recommend recognising these - be
permissive in what you expect and strict in what you deliver.
Change-Id: I0f0bec752e7a50bde98cceceb7e0d11be15c6a6f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Chrome 78 is outputting "INVALID_ENUM: renderbufferStorageMultisample: invalid
internalformat" when running a Qt application after building it for WebAssembly (WASM)
against the Qt 5.13 branch using the Emscripten 1.39.3 (upstream) compiler.
The problem appear to be caused by glRenderbufferStorageMultisample not supporting
GL_DEPTH_STENCIL directly. Instead, GL_DEPTH24_STENCIL8 or GL_DEPTH32F_STENCIL8
should be passed. Keeping the glRenderbufferStorage call as-is.
Change-Id: I777dbc26b1d989950525a434a25ed344389f5059
Reference: https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/glRenderbufferStorageMultisample.xhtml
Fixes: QTBUG-80286
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The POSITION_INDEPENDENT_CODE property was introduced in 2.8.12, so
use it in versions newer than 2.8.12.
Fixes: QTBUG-79671
Change-Id: If7f023e80964f2e47edc35eee617b51aeecbf032
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
When the pixmap for the QDial was cached, the button color for the knob
was not properly set
Fixes: QTBUG-19855
Change-Id: Ib09ac12f0b11c47a0d05f01759fc6eeadbeab06c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The explanation of the input mask syntax and behavior was somewhat
unclear.
Task-number: QTBUG-76320
Change-Id: I45dc4a883c491d3dc08125b0f7efad46f2a9a33f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This is already the second surrogate of the pair, there's no need to +
+i.
Fixes: QTBUG-80268
Change-Id: Ia2aa807ffa8a4c798425fffd15d9a48ee0ca8ed7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The example is useful as a gallery for widgets in
which case the custom Norwegian Wood style is not primarily interesting.
Change-Id: I96e304f97edeb43da6e8f572e01a768b1317722c
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This change detects that the Qt Virtual Keyboard is in use through the
QT_IM_MODULE environment variable and disables the native Windows OSK
accordingly, to avoid showing both virtual keyboards at the same time.
Task-number: QTBUG-76088
Change-Id: I2715b337e6de729f0514ea1892b94b3c4f9cd984
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The equivalent of setting acceptsTouchEvents to YES is enabling
indirect touches. Direct touches are enabled by default by AppKit,
but can be explicitly disabled by clearing the NSTouchTypeMaskDirect
bit.
Change-Id: I5ba09d36f6ee2ce962e3ce21bab06537dd1fa5ad
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The system include paths need to be added to the include
paths passed to Clang so it can find the standard types.
Change-Id: I83e13e73a606130e3bc4762b01368bcd4a8bb0dc
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
After appropriate link flags are determined, they are added to the
INTERFACE_LINK_OPTIONS property. Unfortunately this property was added
in 3.13, and thus static builds on Windows for instance failed with
missing symbols due to missing system libraries on the link command
line, when the CMake version was lower.
When detecting a lower version, add the flags instead to
INTERFACE_LINK_LIBRARIES, which is a property that is available in
older CMake versions. To do this we have to strip the SHELL: prefix,
which means that the added link flags might get deduplicated, and thus
it can happen that the linking phase might still fail.
Nevertheless, on Windows this improves the situation when using an older
CMake version.
Amends 44602224bf
Task-number: QTBUG-38913
Change-Id: Ib710b8ea691d4a9281dcd5f5b9700b11df0a5c10
Reviewed-by: Kyle Edwards <kyle.edwards@kitware.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Since a34e81ab [1], 'xkbcommon_support' is under
'src/platformsupport/input', and will not be defined when building
with -no-libinput, and as such, 'xkbcommon_support-private' added in
'src/plugins/platforms/xcb/xcb_qpa_lib.pro' will be unknown.
1. https://code.qt.io/cgit/qt/qtbase.git/commit/?h=5.14&id=a34e81ab
Change-Id: I79563b329623651b462b8fedcfb59ef5f2c2e52a
Gentoo-bug: https://bugs.gentoo.org/699110
Suggested-by: Petr Zima <zima@matfyz.cz>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
We already did that when parsing from CBOR binary data, so the code was
already present.
[ChangeLog][QtCore][QCborValue] The constructor taking a CBOR tag and a
value to be tagged now attempts to convert to a QCborValue extended
type. For example, if the tag is 0 (UnixTime_t) and the payload is a
number, the resulting object will become tag 1 (DateTime) and the
payload will be the the ISO-8601 date/time string.
Fixes: QTBUG-79196
Change-Id: I6edce5101800424a8093fffd15cdf650fb2fc45c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Makes it more easily consumable from QML.
This patch only adds them for properties where no behavior change
(i.e. no "if (m_foo == foo) return" changes) is necessary.
The other ones will be done in a follow-up patch.
Change-Id: If9f35cf9ac382e6f626db138a88eb14cebda1d52
Reviewed-by: David Faure <david.faure@kdab.com>
When building against a 8.1 or older SDK the Windows 10-only value
DXGI_SWAP_EFFECT_FLIP_DISCARD may not be present. Just use the value
directly. At runtime that code path cannot be hit anyway when running
on 8.1 or older.
Task-number: QTBUG-80084
Change-Id: I0974b82db770e5487315798432ee601937b96c5e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
At the time of writing, they were still planned to be in qtbase.
Change-Id: I27cba2bbd176d930990270ea68f077ec6e0a2d5b
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
This warning turned out to be spammy, since the env.
variable may be set by KDE, in which case there is
nothing the user or app developer can do to fix the
situation.
QT_AUTO_SCREEN_SCALE_FACTOR is now Done on X11, and
remains Deprecated on all other platforms.
Change-Id: I9d372655624b0e0b822f0a70e9aec4b18ab98630
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
...if the feature is enabled.
This fixes the build for MSYS2 with fontconfig.
Fixes: QTBUG-79748
Change-Id: I2c834b6d968766f98c5df2f3df5c8c9bdbd80f11
Reviewed-by: Kai Koehne <kai.koehne@qt.io>