This will blacklist this test for ci. Currently blocking enabling tests
for MSVC2019
Task-number: QTBUG-65667
Task-number: QTQAINFRA-2875
Change-Id: I7198490b1529ce2f4409bfa7399031dad7644a06
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This patch aims to implement the session management available on macOS.
Currently applicationShouldTerminate is just a go through that closes
everything and ends the application. The new implementation calls
first appCommitData and cancels the termination properly if required.
This means that if a user wishes to logout, Qt applications can now
cancel that like e.g. answering to Safari asking whether it is ok to
close because of a number of opened tab/window.
Fixes: QTBUG-33034
Change-Id: Id5d7416cb74c762c5424a77c9c7664f0749da7f6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The warning pragmas don't work in gcc due to the fact this is a
template.
I've been told that unite() will disappear but meanwhile i think it's
better if we simply don't give a warning that people can't protect
themselves against
Change-Id: I358e629be86e0e675ef3e49a7fbc4f7f65ae97f6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
QtDBus caches well known interface objects when there is a non-emtpy
interface name passed to the QDBusInterface constructor.
This commit amends the constructor documentation to explain this
behavior.
Change-Id: Ic51836be6d833411500ea05fcc895cd4f6e96407
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It doesn't seem to be working correctly with array of literal types,
blocking the patch refactoring the webgradient support:
10171: "painting/webgradients.cpp", line 79: error #28: expression must have a constant value
Change-Id: I9ddd768d24ef79dd7a69e23c91988d891e41d4b9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Enclose QAssociativeIterableImpl::advanceImpl within
QT_WARNING_DISABLE_DEPRECATED, fixing numerous warnings:
MSVC\14.23.28105\include\xutility(727): warning C4996: 'QHash<QString,QVariant>::const_iterator::operator --': was declared deprecated
include\QtCore\../../src/corelib/tools/qhash.h(432): note: see declaration of 'QHash<QString,QVariant>::const_iterator::operator --'
include\QtCore\../../src/corelib/kernel/qmetatype.h(1217): note: see reference to function template instantiation 'void std::advance<QHash<QString,QVariant>::const_iterator,int>(_InIt &,_Diff)' being compiled
with [ _InIt=QHash<QString,QVariant>::const_iterator, _Diff=int ]
include\QtCore\../../src/corelib/kernel/qmetatype.h(1253): note: see reference to function template instantiation 'void QtMetaTypePrivate::QAssociativeIterableImpl::advanceImpl<T>(void **,int)' being compiled
with [T=QVariantHash]
include\QtCore\../../src/corelib/kernel/qvariant.h(793): note: see reference to function template instantiation 'QtMetaTypePrivate::QAssociativeIterableImpl::QAssociativeIterableImpl<QVariantHash>(const T *)' being compiled
with[T=QVariantHash]
Amends dbb54805f6.
Change-Id: Ieb875eaa943100ce1941cb1473b35892330c3889
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The code was initially introduced in
9204b8c31e but getting the names were
conditioned on whether or not Windows identified it as a truetype font.
This excluded cases which had preferred names embedded but was not
truetype fonts. To fix that we run the code unconditionally.
[ChangeLog][Windows] Fixed a bug where some fonts would not be
accessible by referencing their typographic name.
Fixes: QTBUG-78556
Change-Id: I8823684b09cce3b1b8722b1e609a5bb49b13da13
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Some structures needed to be cleaned for the reuse to be safe.
Reusing it cuts down on the overhead in lancebench.
Also uniqueness of block names are now enforced, and the common pattern
of "end_block blockName" could now be parsed if not always commented
out by begin_block handling.
Change-Id: I0daf6445292383aaab9392550d0842e0a654ad27
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
It was only used by conversions to indexed8 and mono, and is slower
than the generic conversion which is optimized.
Change-Id: I0480c5a1b5fa2de7e3c87fd621064dace46e5945
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Remove the include path for wintab which is no longer needed in Qt 5
(the code is in the QPA plugin).
Remove the inclusion of win.pri for the Windows vista styles plugin
and specify the theme library directly.
This should result in simpler CMakeList.txt files.
Change-Id: I736db5c965982cdf79a234a94fc723f0556c1717
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Put blank lines before the final Num*Classes entries in enums, to set
them off visibly from the "real" members. Moved some oddly placed
commas to the ends of preceding lines, so that later additions can
just add lines (with comma on end) without having to modify the
preceding line while doing so.
Change-Id: I5188dc25af9e4c17a1882fd9dab070e88013060b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Also remove two stray commas pointed out in code-review and some
others noticed on checking for similar.
This amends commit c3eb521a0f.
Change-Id: If20c5146b740defe8d25ff61d399031b5c66ded1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Replace the macro with a logging category so that it's not necessary to
patch Qt to get output about e.g. ambiguous shortcuts.
Change-Id: I4d365aac5a5c0da8629447d93d3bc90c9c3076c2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Our WebGL 2 support is half finished, since we use surface format verion of 3
to map to webgl2, but do not enable Open GL ES3 needed for WebGL2 support.
This allows glDrawArrays and glDrawElements to be used
Change-Id: Ifbd434f4d25e49f671145a6727999a90920d6810
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
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>
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>
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>
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>
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>
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>
If the destination image format is smaller than the source one, allow
an inplace conversion followed by a shrinking realloc.
Change-Id: I99b3e285e06fb37fd5fe7412749fa87f4cf2ee9a
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
QDomElement::setAttribute(QString, double) did not use QString::setNum()
but qsnprintf(). This is wrong because qsnprintf() is using the current
locale instead QLocale::C. It was also inconsistent to
QDomElement::setAttributeNS() which was already using QString::setNum().
Also fix the documentation which stated that all
QDomElement::setAttribute() format the values according the current
locale.
Fixes: QTBUG-80068
Change-Id: Iabb0b39c0d0723060527542c283a5435f26f31ca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
c08bf215cc added a new QWheelEvent ctor
but missed the \since flag.
Fixes: QTBUG-80088
Change-Id: I6c81179999dd100162dc0cd5dc28e7b5b843b437
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The current example using QFileSystemModel doesn't take into account the
asynchronous nature of that model. This puts people on the wrong path on
how to use it.
This patch improves the snippet as well as the explanation steps.
Change-Id: I5c7a3c19aad48847f0b965b5eb69b492d6263f51
Reviewed-by: Paul Wicking <paul.wicking@qt.io>