| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the existing QAccessibleTextWidget logic to implement
the QAccessibleTextInterface::textAfterOffset,
QAccessibleTextInterface::textBeforeOffset and
QAccessibleTextInterface::textAtOffset interface
methods using a QTextCursor out of that class to
3 new QtGuiPrivate helper methods.
This will allow to reuse them in QAccessibleQuickItem
in qtdeclarative, which implements the exact same logic
(for one code path).
In a first step, only move the existing logic, i.e.
no change in behavior is intended by this commit.
In an upcoming commit, the actual logic will be improved,
which will then fix both, the QAccessibleTextWidget
and QAccessibleQuickItem implementations without having
to keep the code in sync manually.
Task-number: QTBUG-140504
Change-Id: I87690fb6af040d6c9207bf19ddffe2e3eba16b0d
Reviewed-by: Morten Johan Sørvig <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The QAccessible::Window role is for toplevel windows
only, and using it for non-toplevels e.g. breaks
window-relative coordinates in AT-SPI for non-floating
dock widgets and their content.
A QDockWidget is only a top-level if it is floating,
so only report the QAccessible::Window role in that
case, otherwise use QAccessible::Pane ("A generic container.")
because it's a container containing the QDockWidget::widget().
Adjust tst_QAccessibility::dockWidgetTest accordingly.
Notifying about the role change when (un)docking
a dock widget depends on introducing a new QAccessible::Event
and will be implemented separately in an upcoming commit.
Fixes: QTBUG-138206
Pick-to: 6.10 6.9 6.8
Change-Id: I9eb1bdc2a60260f169910671ebc82d9735e5ba13
Reviewed-by: Volker Hilsheimer <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The qt_accStripAmp helper function takes a string that
may contain an accelerator/mnemonic and escaped ampersand
characters and returns a "plain text" version of this that
is suitable for an accessible name of the widget/control
containing that text.
Move the helper function to a new private header
(and source file) in QtGui in order to be able to reuse
this in Qt Quick in an upcoming qtdeclarative commit.
Task-number: QTBUG-134208
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I4dfac2d179baf36101066962b6a5f542b3a6fc03
Reviewed-by: Volker Hilsheimer <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement support for QAccessible::Attribute::Locale
(newly introduced in a previous commit) for QWidget
by introducing QAccessibleWidgetV2 which subclasses
QAccessibleWidget and implements the
QAccessibleAttributesInterface to report the QWidget::locale
property for QAccessible::Attribute::Locale.
(Leave QAccessibleWidget unchanged for ABI compatibility.)
Switch QAccessibleWidget subclasses to subclass the
newly introduced QAccessibleWidgetV2.
Add a corresponding unit test.
Task-number: QTBUG-137144
Change-Id: I61385b17ee1272801ad769da5a807ca4e068cfb2
Reviewed-by: Volker Hilsheimer <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
As a drive-by replace QList::append and operator<< with emplace_back,
to avoid repeating value_type.
Task-number: QTBUG-115841
Pick-to: 6.9 6.8
Change-Id: I6fb790f959b41b0feb49e3a0f0b6b3631e24a232
Reviewed-by: Marc Mutz <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
The accessibility implementations require the type to be fully
defined anyway in order to call type-specific APIs, so there's no
need to use inherits(). Use qobject_cast instead.
Pick-to: 6.7
Change-Id: I5c013be57f48272a748451f4888911fe6aa6574e
Reviewed-by: Pavel Dubsky <[email protected]>
Reviewed-by: Santhosh Kumar <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Let `QAccessibleTextWidget::attributes`
report whether strikeout is applied to text
via the "text-line-through-type" IAccessible2 text
attribute [1].
Use a value of "single" when strikeout is applied,
and "none" otherwise.
A previous change already implemented bridging that to
the corresponding AT-SPI "strikethrough" attribute.
Update the existing test tst_QAccessibility::textAttributes_data
to take into account that this attribute is reported
as well now.
[1] https://wiki.linuxfoundation.org/accessibility/iaccessible2/textattributes
Fixes: QTBUG-118106
Change-Id: I0416f00b1c11709d9cd0ca0ee38cc6df6caa6dcf
Reviewed-by: Jan Arve Sæther <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
There doesn't seem to be reason for it to exist, and apparently it
causes compilation failures with icc.
Pick-to: 6.6 6.5 5.15
Fixes: QTBUG-116517
Initial-patch-by: Yorick Bosman
Change-Id: Ic2ed1d4318d522851278afa7f9791441af4fa709
Reviewed-by: Volker Hilsheimer <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
They cause clashes in CMake Unity (Jumbo) builds.
Properly prefixing the childWidgets() function also prevents
it from cluttering static builds.
Task-number: QTBUG-109394
Pick-to: 6.5
Change-Id: Idd2b1ec748f33cfae8f3213847c43b3fb0550377
Reviewed-by: Axel Spoerl <[email protected]>
Reviewed-by: Jan Arve Sæther <[email protected]>
Reviewed-by: Qt CI Bot <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is semantic patch using ClangTidyTransformator:
auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o)
makeRule(cxxMemberCallExpr(on(QtContainerClass),
callee(cxxMethodDecl(hasAnyName({"count", "length"),
parameterCountIs(0))))),
changeTo(cat(access(o, cat("size"), "()"))),
cat("use 'size()' instead of 'count()/length()'"))
a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'.
<classes> are:
// sequential:
"QByteArray",
"QList",
"QQueue",
"QStack",
"QString",
"QVarLengthArray",
"QVector",
// associative:
"QHash",
"QMultiHash",
"QMap",
"QMultiMap",
"QSet",
// Qt has no QMultiSet
Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af
Reviewed-by: Qt CI Bot <[email protected]>
Reviewed-by: Volker Hilsheimer <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
This commit addresses on of the comments from the review of QTBUG-98434.
Use remove instead of replace to delete from the string.
Task-number: QTBUG-103100
Change-Id: Ifa00a9bae24767eb42d6fa5da0ffdbaa230d5d96
Reviewed-by: Marc Mutz <[email protected]>
|
| |
|
|
|
|
|
| |
Pick-to: 6.4
Change-Id: Iee4bd8970810be1b23bdba65a74de912401dca65
Reviewed-by: Qt CI Bot <[email protected]>
Reviewed-by: Marc Mutz <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.
Task-number: QTBUG-67283
Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1
Reviewed-by: Qt CI Bot <[email protected]>
Reviewed-by: Lars Knoll <[email protected]>
Reviewed-by: Jörg Bornemann <[email protected]>
|
| |
|
|
|
|
|
| |
Task-number: QTBUG-98434
Change-Id: If20e217e6e4fecd18c7707bf94650f5ba856893f
Reviewed-by: Qt CI Bot <[email protected]>
Reviewed-by: Marc Mutz <[email protected]>
|
| |
|
|
|
|
| |
Task-number: QTBUG-98434
Change-Id: I310ea8f19d73a79d985ebfb8bfbff7a02c424360
Reviewed-by: Volker Hilsheimer <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
Required for porting away from QLatin1Char/QLatin1String in scope of
QTBUG-98434.
As a drive-by, fix qsizetype -> int narrowing conversion warnings for
the touched lines.
Change-Id: I133b80334b66e0a5ab9546dd8e1ff0631e79601e
Reviewed-by: Volker Hilsheimer <[email protected]>
|
| |
|
|
|
|
|
|
| |
Since doing a split will create an empty entry, then we can save time
and just return an empty QStringList in this case
Change-Id: I86a6532e7243151493ea4021bfcc05e4c2a9cbf0
Reviewed-by: Fabian Kosmale <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By depending on setFamilies() then we can be sure that font names with
spaces, commas, quotes and so on are correctly handled without being
misinterpreted. For now it will split on the comma when a string
containing one is passed to setFamily. But from Qt 6.2 this will be
removed to preserve the family string as a convenience function.
[ChangeLog][QtGui][QFont] Indicated that setFamilies/families is
preferred over setFamily/family to ensure that font family names are
preserved when spaces, commas and so on are used in the name.
Change-Id: Id3c1a4e827756a4c928fed461a4aafa5a0f06633
Reviewed-by: Qt CI Bot <[email protected]>
Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
They were masked by all QChar ctors being made explicit, except the
char16_t one, which was left as the only viable choice.
Change-Id: I210d50dc243391ad2c7dd353ba9ae40147585d04
Reviewed-by: Friedemann Kleint <[email protected]>
Reviewed-by: Volker Hilsheimer <[email protected]>
Reviewed-by: Mårten Nordheim <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
Move away from using 0 as pointer literal.
Done using clang-tidy. This is not complete as
run-clang-tidy can't handle all of qtbase in one go.
Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0
Reviewed-by: Friedemann Kleint <[email protected]>
Reviewed-by: Lars Knoll <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
... for poor compilers such as GCC.
Change-Id: Ifcf603657ff6242599972c21b135d7b6a0af4c35
Reviewed-by: Giuseppe D'Angelo <[email protected]>
|
| |
|
|
|
|
| |
Change-Id: Idb745f6a59d102f2f89b2cfa5177ec874d7599a8
Reviewed-by: Friedemann Kleint <[email protected]>
Reviewed-by: Edward Welbourne <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
QFontMetrics(F)::width() has been deprecated and is replaced by
horizontalAdvance(). This updates all usage of it in tests and
documentation.
It is worth noting that many or most of the usages of
QFontMetrics::width() probably intended to use boundingRect().width(),
but since it currently works, I have not looked into that, just
replaced the function name mechanically.
Change-Id: Iec382e5bad0b50f37a6cfff841bfb46ed4d4555f
Reviewed-by: Lars Knoll <[email protected]>
|
| |
|
|
|
| |
Change-Id: I031356411294b259ebd2b22c53159c93fd92af6e
Reviewed-by: Oswald Buddenhagen <[email protected]>
|
| |
|
|
|
| |
Change-Id: I0fb0e658796484f374586d8d1f0f1b9167ab30d2
Reviewed-by: Oswald Buddenhagen <[email protected]>
|
| |
|
|
|
| |
Change-Id: I6d2ec035a218869aa6595f5848de94ce491d3124
Reviewed-by: Oswald Buddenhagen <[email protected]>
|
| |
|
|
|
| |
Change-Id: If7efc8c15d8876f5bc5575d48686894ea71bbe62
Reviewed-by: Oswald Buddenhagen <[email protected]>
|
| |
|
|
|
| |
Change-Id: I06b7fb9736620dcdfda21fc0a06e13cb02f9a1e7
Reviewed-by: Oswald Buddenhagen <[email protected]>
|
| |
|
|
|
| |
Change-Id: Id6ea899c0fddf0de636701cfdc5f01ba20024976
Reviewed-by: Oswald Buddenhagen <[email protected]>
|
| |
|
|
|
| |
Change-Id: I7abfe0166a021c439f6ed4465631ba62660ef001
Reviewed-by: Oswald Buddenhagen <[email protected]>
|
| |
|
|
|
| |
Change-Id: I02a0c39c308204f7c67674928973275fa1247d38
Reviewed-by: Oswald Buddenhagen <[email protected]>
|
| |
|
|
|
| |
Change-Id: I1d4b0268df01f8bc0aec28af52cc4b639a376863
Reviewed-by: Oswald Buddenhagen <[email protected]>
|
| |
|
|
|
|
|
| |
The QT_NO_ITEMVIEWS queries in corelib/ seem to had no effect at all.
Change-Id: I494ee2309a96b0cf25de18781fc9a675878a2ee9
Reviewed-by: Oswald Buddenhagen <[email protected]>
|
| |
|
|
|
| |
Change-Id: I93c2e00828a233f004c599bd0702d0a470ae29ff
Reviewed-by: Oswald Buddenhagen <[email protected]>
|
| |
|
|
|
| |
Change-Id: I6d634bafa6d26c1e78069fddd412e6de24f5775c
Reviewed-by: Oswald Buddenhagen <[email protected]>
|
| |
|
|
|
| |
Change-Id: Ie93c6d0a8256bc466d3419408b753d5f3738aa6b
Reviewed-by: Lars Knoll <[email protected]>
|
| |
|
|
|
|
| |
Change-Id: I8c136024c3bf431529033a806be646d867919daa
Reviewed-by: Oswald Buddenhagen <[email protected]>
Reviewed-by: Lars Knoll <[email protected]>
|
| |
|
|
|
| |
Change-Id: I8f9d5ef6b7f7102e56816677f1d3a5b5144b7083
Reviewed-by: Lars Knoll <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QString::fromLatin1 always allocates memory, but there are
cases where we can avoid/reduce allocations or/and reduce
text size, e.g.:
QStringBuilder expressions
Fix: replace QString::fromLatin1 with QL1S
QString::fromLatin1().arg(String) pattern
Fix: replace with QStringBuilder
Overloaded functions with QL1S arg
Fix: replace QString::fromLatin1 with QL1S
In rare cases if there is no overloaded function
with QL1S and we have deal with string literal,
replace QString::fromLatin1 with QStringLiteral.
Change-Id: Iabe1a3cc0830f40ef78a0548afa4368583c31def
Reviewed-by: Edward Welbourne <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace it with QL1S in QStringBuilder expressions
and in overloaded functions.
Replace patterns 'QString::number() + QStringLiteral'
and 'QStringLiteral + QString::number()' with
QString::asprintf.
Saves some text size.
Change-Id: Ib39b2332264dfc3df04e77f2c101b47a1030cef4
Reviewed-by: Edward Welbourne <[email protected]>
Reviewed-by: Thiago Macieira <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new LGPL header instead of LGPL21 one
(in those files which will be under LGPL v3)
Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9
Reviewed-by: Lars Knoll <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
QAccessibleTextWidget::attributes()
Saves ~100b in text size.
Change-Id: I144b8c1d02ce8a24f1654d54abad90ba1054be9a
Reviewed-by: Olivier Goffart (Woboq GmbH) <[email protected]>
Reviewed-by: Boris Dušek <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The QMap<QByteArray, QString> was only used to hold key/value pairs
until they were serialized into a QString at the end of the function.
Serialize into QString directly instead, dropping the temporary QMap.
The problem is that we'd like to keep the line formatting central
while at the same time harnessing the power of QStringBuilder.
This is possible with a templated function with an input/output
parameter:
format_attr(QString &result, const char *key, T &&value)
format_attr(result, text-foo, str + str2 + str3);
Or with return type deduction:
formatted(const char *key, T &&value) -> decltype((expr)) { return expr; }
result += formatted(text-foo, str + str2 + str3);
I don't like out parameters, and we can't rely on auto return
type deduction, yet, so I opted for a miniature expression
template solution that can only match the expression
attr[key] = value;
where 'key' is a const char* and 'value' can be anything that
QStringBuilder supports. This allows to keep the syntax of a map
while at the same time serializing to QString immediately.
The only behavioral difference to the old code is that the
attributes are no longer sorted, but order doesn't matter.
Saves more than 10KiB in text size on optimized GCC 4.9 Linux
AMD64 builds.
Change-Id: I7b3bec0466ef24156c693adaa95f0316007e0bfe
Reviewed-by: Olivier Goffart (Woboq GmbH) <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This needs to be handled a bit carefully, because Qt containers
will detach upon being iteratoed over using range-for.
In the cases of this patch, that cannot happen, because all
containers are marked as const (either by this patch or before).
Separate patches will deal with other situations.
Apart from being more readable, range-for loops are also the
most efficient for loop.
This patch shaves almost 2K of text size off an optimized Linux
AMD64 GCC 4.9 build.
Change-Id: I53810c7b25420b4fd449d20c90c07503c5e76a66
Reviewed-by: Edward Welbourne <[email protected]>
Reviewed-by: Lars Knoll <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If, after checking a condition, we issue a qWarning(),
by definition that check is unlikely to be true.
Tell the compiler so it can move the error handling
code out of the normal code path to increase the
effective icache size.
This change contains the changes to the accessible/,
effects/, kernel/, styles/ and itemviews/ subdirs.
Moved conditional code around where possible so that
we could always use Q_UNLIKELY, instead of having to
revert to Q_LIKELY here and there.
In QWidgetPrivate::setWindowModified_helper(), as a
drive-by, I swapped the evaluation order of an
&&-expression (newly wrapped in Q_UNLIKELY) to be
more readable and more efficient (cheaper check
first) at the same time.
In qDraw* (qdrawutil.cpp), simplified boolean
expressions (sometimes by skipping re-checking
conditions already checked in a previous guard clause).
Change-Id: I58be22be0a33522c2629a66c2f6c795771a99f3f
Reviewed-by: Lars Knoll <[email protected]>
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
qmake/doc/src/qmake-manual.qdoc
src/corelib/tools/qstring.h
src/gui/image/qimagereader.cpp
src/network/access/qnetworkaccessmanager.cpp
src/tools/qdoc/doc/examples/examples.qdoc
src/widgets/accessible/qaccessiblewidgetfactory_p.h
src/widgets/doc/qtwidgets.qdocconf
Change-Id: I8fae62283aebefe24e5ca4b4abd97386560c0fcb
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When merging the accessibility plugin into the widgets library, the
headers were just moved. They should have gotten the _p at that time.
Task-number: QTBUG-47569
Change-Id: I0a2290dae3a8187596e9d7541ccf69beeb603296
Reviewed-by: Dimitar Dobrev
Reviewed-by: Thiago Macieira <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Current code retrieved the character format at position where the cursor
currently was, irrespective of the position actually passed to the
characterRect function. This is now fixed and we retrieve the character
format for the QTextFragment containing the specified offset.
This fixes display of visual bounds around text by screen reader in some
cases. E.g. on OS X, when searching text using VoiceOver, VoiceOver
first queries the visual bounds of the found text (and thus also
characterRect), and only then it moves cursor position to the found
text. If before the change of position the cursor was on some text with
different metrics (i.e. a bigger font), the visual bounds for the found
text reflected those metrics, not the metrics of the actual found text
for which the bounds were drawn. This resulted in smaller/bigger
rectangles around the found text than was actually correct.
Change-Id: Ie2a4dfc714504b7923cdaf8ff875c438aeccddee
Reviewed-by: Jan Arve Sæther <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Current implementation of QAccessibleTextWidget::characterRect returned rect
with correct vertical position only when the font point size did not vary
inside the line. This commit makes it work for lines where point size changes
by taking text ascent and descent into account.
Change-Id: I4ee43701a30ce9bff1db2f2d0422227496c3df4c
Reviewed-by: Jan Arve Sæther <[email protected]>
|
| | |
| |
| |
| |
| | |
Change-Id: I9eccc66624f5d789cc8778d4376338207beb4a14
Reviewed-by: Jan Arve Sæther <[email protected]>
|