QStyleSheetStyle did not check if a border (which includes the padding)
is given and therefore the padding attribute given by css was ignored.
Only when another attribute was additionally set, the padding was used.
Task-number: QTBUG-59501
Change-Id: If3e691a23266ef6d0fb942a43053b29d65e40047
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The special handling when a font for a headerview is set became useless
after a4e6117c53 since it is now included
in branch four lines above.
Change-Id: I73bec48913ebca5f278128a124b58d1b6172e334
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
When QHeaderView has an elide mode set, the available width passed to
QFontMetrics::elidedText() was not adjusted when padding or margin was
set. This lead to a too long text displayed in the header.
Now QStyle::subElementRect(SE_HeaderLabel) is used to get the correct
rect.
Task-number: QTBUG-23203
Change-Id: I12fc646092470272bb91b3ffb7c7a51e239c7a35
Reviewed-by: David Faure <david.faure@kdab.com>
src/sljit features the BSD-2-Clause license, not the BSD-3-Clause one.
[ChangeLog][Third-Party Components] Added documentation for the SLJIT
part of pcre2, which is available under the BSD-2-Clause license.
Change-Id: Ie1e981ef6eab2c8d2960919b66ac85b29450f919
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Before this fix, QStandardItemModel::itemData returns
a map containing role 255 which is used internally to store the flags.
This role is an undocumented implementation detail so it should
not be returned to the user.
[ChangeLog][QtGui][QStandardItemModel] itemData does not return role 255
Change-Id: Ibead3cba84cfe92b3c664bc8ce87508cbcbdc9bd
Reviewed-by: David Faure <david.faure@kdab.com>
Before this patch QStringListModel::setItemData emitted dataChanged
twice if the roles map contained both DisplayRole and EditRole.
This fixes the duplication.
Increased efficiency of QStringListModel::itemData
Task-number: QTBUG-67511
Change-Id: Ibaea17530f15627a3cb8003e5284e54001731ded
Reviewed-by: David Faure <david.faure@kdab.com>
Implemented the virtual method moveRows to allow row movement.
[ChangeLog][QtWidgets][QListWidget] Implemented moveRows in model
Task-number: QTBUG-69807
Change-Id: I212b560b8778306a0315d9d5e4710efcc7dbbe44
Reviewed-by: David Faure <david.faure@kdab.com>
A virtual method clearItemData was added to QAIM for Qt6.
This patch implements that method to all Qt concrete models for which
it makes sense.
Task-number: QTBUG-69616
Change-Id: If980fcfc36f723128bc56ec4587c5c3a338dbbcc
Reviewed-by: David Faure <david.faure@kdab.com>
Applying the transformation in question has no effect on the winding
order. Rewrite that section.
While all the examples are correct, clarify the rules for the geometry
they use since the winding order varies. Fix up the triangle example code
to use front=CCW for clarity (even though it does not matter much since
culling is off there).
Change-Id: Icb968c76cc9fa918a5608d3c66b4fccd5668175e
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
The snippet tries to explain the advantage of
str.arg("Hello", QString::number(20), QString::number(50));
over
str.arg("Hello").arg(20).arg(50);
which only makes sense, if str contains the same formating sequence,
namely "%1%3%2". That also matches the belonging comment.
Amends 8481500f63
Task-number: QTBUG-44044
Change-Id: Ic2595107bc599c6d244ebf88184a5cc5569ed4f1
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This new test double-checks the bugfix for QSortFilterProxyModel::insertRows
in commit 70ba75519d. Previously, when using QComboBox on top of
QSortFilterProxyModel and calling QComboBox::addItem with row==rowCount(),
an empty item was inserted in one place, and then another item was modified
(instead of the inserted empty one). This test checks that the above bugfix
indeed fixes the behavior of QComboBox::addItem when used in this manner.
Task-number: QTBUG-69158
Change-Id: Id01345e0525694a57250c656222d626e2267aa8e
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: David Faure <david.faure@kdab.com>
Although it is safe to slightly overread a string (provided it doesn't
cross page boundaries), ASAN is extremely picky about this kind of
behavior. So, do not run with this vectorized code when ASAN is
enabled.
Task-number: QTBUG-70269
Change-Id: I2b59b524d608afec8985227285feab55158d7247
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It seems when a WebEngineView is parented by a window its accessible
interface will not know its parent, which prevented the root of an
UI Automation fragment from being found, causing missing accessibility
info. This change adds a workaround to avoid this issue.
Task-number: QTBUG-70199
Change-Id: Ia7cfc9f410c4f0ef3b5f9d1700748a9a3e29b7c2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Weak pointers are zeroed before destroyed() is emitted. This makes sense
because the signal is called "destroyed()", not "aboutToBeDestroyed()",
and the code has been like this for a long time.
Change-Id: Ic852fe354405e328d1922a75931e7eb7bf651b26
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Do not unconditionally enable precompiled headers
for MSVC since clang-cl does not support it.
Task-number: QTBUG-63512
Change-Id: I95df7d3bb51647ecee8ddc3161421768313ab4a1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This is a follow-up on commit 6553921dd5,
which fixed the drawing of the surrounding rectangle when used in item
views. This one now fixes the drawing of the check mark itself, for both
item views and standalone items.
Change-Id: I14f359e9d2ef33652cc68494b7d114e61110e5e0
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Add feature guard around the include in the header and remove the one
from the implementation file.
Change-Id: I8dc133cce786ead6059cc66b40a0ffb6c420096f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Add QMAKE_QMLPLUGINDUMP_FLAGS variable that allows plugins to set
qmlplugindump options like -app, -noforceqtquick.
The naming follows the example of e.g. QMAKE_LRELEASE_FLAGS.
Task-number: QTBUG-70264
Change-Id: I1d11b7f3b03fab79ab9e06188cecf31650789302
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
There was a QStringView::compare(QString, CaseSensitivity) but it's
good that the symmetric also exists
Change-Id: Ic789f11d41eb8cfa393cb51c19bd1f89bb87d912
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Noticed during review of clang-tidy warnings. I have searched the
source tree (using grep) and only this one file contains examples of
this mistake.
Change-Id: I3bbcec736e5a184db7251962fd3671a21ab5d238
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Some people suggested the later, so let's have a second look at it
before it's too late.
Although I was in favor of the former I'm now having second thoughts.
connectTo() is meant to only be used in classes which have a clear dominant signal,
but there are rare classes that have two (example: QAbstractButton::toggled, QAbstractButton::clicked).
QAbstractButton::connectTo() would be ambiguous if we ever wanted to add these shorthand connects
to QtWidgets
Change-Id: I198ad3326d31dcf89b9c47a299124572ee7b11b3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The earlier NDK platforms do not support 64 bit architectures, so
configure would fail with a confusing message about problems in
the environment.
[ChangeLog][Android] Default to android-21 for arm64 builds instead
of failing.
Task-number: QTBUG-70280
Change-Id: Ib9846d6deee3d453fd4a17a3ae92306482d380ba
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
They were incorrectly attempted to be read as Indexed8, instead use
the RGBA64 formats to read them with full accuracy.
Task-number: QTBUG-45858
Change-Id: I14fc3cb0d59fa2fc0e68fd870f3b32352c34161f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Android doesn't like nor use RTLD_NODELETE
Tasnk-number: QTBUG-64654
Change-Id: I2d884bbf22a681cca592942eba84ba97327ba974
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This is marked to be removed in Qt6, so switch to
SE_ItemViewItemCheckIndicator internally and define the old value as
copy of the new one instead of the other way round.
Change-Id: I9e9804a7ff0e9b2ae1e24698d45b2cbd44423420
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This does not really work: as soon as you build with
the 10.14 SDK you opt-in to having updated palette
management, which the Qt 5.11 series does not have.
This leaves app developers with two ways to opt-out
of dark mode:
- Build with the 10.13 (or earlier) SDK.
- Set NSRequiresAquaSystemAppearance in Info.plist
This reverts commit 04671a80db.
Change-Id: I5c01b9965da45de914f699526ba0723837f36e1d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
The widget visibility state was set to explicitly hidden,
which was preventing it from working correctly when
its parent widget was shown.
This regression was introduced by commit d7a9e08,
which made QWindow::setVisible() call QWidget::setVisible().
QWindow::destroy() calls QWindow::setVisible(false),
which means that the destroy() call in setCocoaView()
would set the CoocaViewContainer to be explicitly hidden.
Clear WA_WState_Hidden to work around this behavior.
Task-number: QTBUG-67504
Change-Id: I77438fcd01f165f058eea178c214838bd4f27084
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Snap now uses xdg-desktop-portal for portal support. Add check for apps
running in Snap and make them use portals by default. We also should be
using different name for the platform theme used by sandboxed apps.
Change-Id: Ibaa35b7549b3d94775d7edb937f729a300d071b6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Replace by switch() where appropriate, remove else and unindent code
or simplify the return value.
Change-Id: Ie988b9068a9579ae5a899b3765e43aad480b564e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add override, disable copies where appropriate and use = default
for trivial functions.
Change-Id: Ia5bc7419b1aa053c5503ea7dfaf11cb6dfafd2e2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Some Pointer Input messages are defined only for Windows 10 and new
versions of the Windows SDK and could break compilation with older
SDKs. Currently, they are not used anywhere outside of the
MessageDebugEntry debug function. Checking if they are defined before
using.
Change-Id: I5fc7bb8e52ab8aca66bb21084289ab8938938063
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
...not just the debug flag. The information is saved outside of the CBOR
map for two reasons:
1) removing the hack that depended on how QCborStreamWriter and
TinyCBOR internally work, allowing for the extra parameter to be
written directly. We wouldn't be able to use that hack anyway and would
have needed a further, uglier hack to encode a byte whose value we
don't know.
2) outside the map, this information can be parsed more quickly and
then we can discard any plugins we shouldn't actually load.
Since we're doing this for a flag, I decided to move the Qt version
there too for reason #2.
Change-Id: I61ecce6b1324410bbab4fffd153d4e5fc696d19e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
In preparation for Qt 6 deprecating the binary JSON format. Also reduces
the size of the metadata a little: for the xcb platform plugin, it went
down from 264 bytes to 138; for the jpeg image plugin, it went from 320
to 135.
I've had to change the signature so older versions of Qt won't try to
parse the CBOR data as Binary JSON. Unfortunately, before QJsonDocument
could get a chance to reject it, qJsonFromRawLibraryMetaData() needed to
allocate memory and that causes crashes with Qt < 5.11.2.
Change-Id: Ieb48f7c0dd0e4e0fb35efffd153bee34e16ce347
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
These fake mouse events should be synthesized by QtGui, not the QPA plugin,
when the tablet/touch events are not handled by the application and the
Qt::AA_SynthesizeMouseForUnhandledTouchEvents or
Qt::AA_SynthesizeMouseForUnhandledTabletEvents flags are set.
Task-number: QTBUG-47007
Task-number: QTBUG-60437
Change-Id: I4d6d5e6667d245c45a4eb4f3a94db05cf9772f52
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Romain Pokrzywka <romain.pokrzywka@gmail.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
QOpenGlWidget and QuickQidget do not work at this time anyway.
This also causes gl to be initialized for widget apps, so disabling this
will optimize widget apps.
We could use Qt::AA_ForceRasterWidgets as well.
Task-number: QTBUG-67797
Change-Id: I8f86a9f72e6f3d437a818b4fbe3d6f3658e17d04
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The NSOpenGLPFAStereo attribute was deprecated in macOS 10.12, without
any replacement, and adding the attribute to the pixel format results
in context creation failure, so we're assuming the feature is no longer
supported an disable it wholesale on macOS.
Change-Id: I27d9f300fdaff9abe90781e3160b97f8b66121ad
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>