Replace QWidget::repaint() with update() + wait until the paint event is
received.
Task-number: QTBUG-80237
Change-Id: I57da7cd8fa119344484b849a88729bca7b48616c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
For Metal and Vulkan this needs actual work because that's where
the concept of renderpass descriptors is relevant. GL and D3D can
just return true always.
The big benefit of this is that Qt Quick can now compare renderpass
descriptors via isCompatible() for its pipeline cache (similarly to
how it is already using isLayoutCompatible() for srbs), and so
renderpass descriptors for layers (Item.layer, ShaderEffect) will
typically be compatible and so can pick up pipelines created by other
layers from the cache.
Also add autotests for shader resource binding and renderpass descriptor
compatibility.
Task-number: QTBUG-80318
Change-Id: I0008bc51c4ee13b0113d2c8caf799e1257f18a18
Reviewed-by: Paul Olav Tvete <paul.tvete@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>
While we are at it, remove the Border and MirrorOnce wrap modes that have
not been supported on OpenGL, because they are unsupported with Metal+iOS
as well.
Task-number: QTBUG-78580
Change-Id: I0db94b9d3a6125b3bb5d7b1db5d02a42cd94d2c2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
QLayoutItem::widget() should be const since it does not modify the
class. Since this can not be done within Qt5 in a binary compatible way,
change it for Qt6.
Fixes: QTBUG-41997
Change-Id: I9211eb1c36a5bc4f06ab417a9df790ebedb7fcda
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
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>
This function and the two macros are natively supported by all
compilers needed since Qt 5.7 as explained in
4c704fad08
Change-Id: Iac01d2481ef4a6ee333e3ee5f09082a9fba725e8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Set them to be designable by default, fixing:
kernel/qaction.h:66: Warning: Providing a function for DESIGNABLE in a property declaration is deprecated and will not be supported in Qt 6 anymore.
kernel/qwidget.h:178: Warning: Providing a function for DESIGNABLE in a property declaration is deprecated and will not be supported in Qt 6 anymore.
kernel/qwidget.h:179: Warning: Providing a function for DESIGNABLE in a property declaration is deprecated and will not be supported in Qt 6 anymore.
kernel/qwidget.h:180: Warning: Providing a function for DESIGNABLE in a property declaration is deprecated and will not be supported in Qt 6 anymore.
kernel/qwidget.h:181: Warning: Providing a function for DESIGNABLE in a property declaration is deprecated and will not be supported in Qt 6 anymore.
kernel/qwidget.h:182: Warning: Providing a function for DESIGNABLE in a property declaration is deprecated and will not be supported in Qt 6 anymore.
kernel/qwidget.h:204: Warning: Providing a function for DESIGNABLE in a property declaration is deprecated and will not be supported in Qt 6 anymore.
widgets/qabstractbutton.h:67: Warning: Providing a function for DESIGNABLE in a property declaration is deprecated and will not be supported in Qt 6 anymore.
widgets/qgroupbox.h:60: Warning: Providing a function for DESIGNABLE in a property declaration is deprecated and will not be supported in Qt 6 anymore.
The toolbar properties were not caught by the warnings, but it appears
the checks do not work; the properties are designable when parented
on a non-QMainWindow parent.
Change-Id: Ib7dfb878ba593f2dfa05b85db2c384bf3d860e46
Reviewed-by: Jarek Kobus <jaroslaw.kobus@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>
Fix include, removing:
QtWidgets WARNING qtbase/src/widgets/kernel/qtestsupport_widgets.h includes qtwidgetsglobal.h when it should include QtWidgets/qtwidgetsglobal.h
Change-Id: I3dc608cba48e9ae36b0683a94a4bf411e23f5136
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reimplement QDomDocument using QXmlStreamReader and switch to the new
implementation starting from Qt 6.
The changes in the behavior are reflected in tests: some test cases
which were marked as "expected to fail" are now passing.
Task-number: QTBUG-76178
Change-Id: I5ace2f13c036a9a778de922b47a1ce35957ce5f6
Reviewed-by: Kai Koehne <kai.koehne@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>
The cursors in QTextDocumentPrivate are held in a QList.
This becomes a serious performance problem with lots of
extra selections due to a call to
QTextDocumentPrivate::removeCursor() from the QTextCursor
destructor.
Given the following test program:
QPlainTextEdit *editor = ...
std::list< QTextCursor> list;
for(int i = 0; i < 100000; ++i) {
QTextCursor c(editor->document());
c.setPosition(std::rand()%100);
list.push_front(c);
}
list.clear(); // <-- clear calls hangs for 3+ seconds
// due to time spent in
// QTextDocumentPrivate::removeCursor()
// due to QList::removeAll() call
Note the push_front because it exacerbates the issue because
the entire list will be traversed.
The change submitted changes the structure to a set,
removing the issue.
In theory, this limits that a cursors cannot be in the
structure twice, but this neither happens nor would it make sense.
Change-Id: I817dc5d1bda1d98c6725a531b32d1c711a029a34
Reviewed-by: Langonda Agag <namezero@afim.info>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
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>
The convenience functions setBackground(), setForeground() and
setSizeHint() a default constructed value as 'reset'. This means a
default constructed QBrush or QSize is returned in the data() function
which leads to an unexpected background or forground color or size hint.
Therefore check if the passed value is a default constructed value and
set an empty QVariant instead which.
[ChangeLog][QtWidgets][ItemViews] The convenience views
QList/Table/TreeWidgetItem now treat a default constructed QBrush or
QSize as an empty QVariant which allows to reset the values set to it's
default values.
Task-number: QTBUG-76423
Change-Id: I840570bbad3e5fd8c5b4b58903b4fd0066dbdeb7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Amends qtbase/af2daafde72db02454d24b7d691aa6861525ab99.
Where applicable, port over to member initialization, thus also
fixing nullptr warnings.
Change-Id: Iaaf2dbbbcf2952253390b8839fd15a1b17be32c0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@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 was used to support QFlags f = 0 initialization, but with 0 used
as a pointer literal now considered bad form, it had been changed many
places to QFlags f = nullptr, which is meaningless and confusing.
Change-Id: I4bc592151c255dc5cab1a232615caecc520f02e8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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>
Fix warnings introduced by
qtbase/72f57cc84244633ca69ede9a1fd510b9b1881c1d:
qwindowstheme.cpp:167:62: warning: 'bool QWaitCondition::wait(QMutex*, long unsigned int)' is deprecated: Use wait(QMutex *lockedMutex, QDeadlineTimer deadline) instead [-Wdeprecated-declarations]qwindowstheme.cpp: In member function 'bool QShGetFileInfoThread::runWithParams(QShGetFileInfoParams*, long unsigned int)':
qwindowstheme.cpp:201:63: warning: 'bool QWaitCondition::wait(QMutex*, long unsigned int)' is deprecated: Use wait(QMutex *lockedMutex, QDeadlineTimer deadline) instead [-Wdeprecated-declarations]
Change-Id: Ie33f8b0e1e742f972d2a8065eba9e16a13ec43ee
Reviewed-by: Oliver Wolff <oliver.wolff@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>
Use a QVector where possible. Otherwise, try
to introduce auto to make migration easier.
Change-Id: I9deadb363fabd1755deca180ed5cb771390fcb30
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>