Likely culprit for issues in the CI when building iOS tests.
This reverts commit 9a7564edee.
Change-Id: I02ac77a305b5863c9533c97ba06aaafe8f176a22
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Orca expects text attributes with different names (and sometimes also
different values) than IAccessible2 ones (which Qt uses). So adapt the names
and values accordingly.
[ChangeLog][Accessibility] We now report text attributes correctly on Linux,
so ORCA+F now works properly in QTextEdit and other text controls.
Change-Id: Iad6d38168b309669c00069a6167f4f54cbd64cf0
Task-number: QTBUG-44479
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
NSAccessibility has no explicit analog for
QAccessibleActionInterface::toggleAction(), checking checkboxes/radio
buttons is handled by NSAccessibilityPressAction. So ensure exposing
the action properly on OS X so that VoiceOver users can check/uncheck
checkboxes, select radio buttons etc.
Change-Id: Idc8b048de2313a3e875a929516baf3dded9c68cc
Task-number: QTBUG-44852
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
In order to support testing values of more accessibility attributes
and parameterized attributed, we provided some "infrastructure" to be
able to query them with minimal effort. We also reworked current 6
supported attributes to use this new way.
Change-Id: Id0ceb59aa0fe063c9aedad27cffcc3aef0899d7f
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
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 <jan-arve.saether@theqtcompany.com>
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 <jan-arve.saether@theqtcompany.com>
textEditTest in qaccessibility test was using QTextEdit::setCurrentFont
on second pass, but that did not change the font used for text in any way.
I don't know what was the purpose. So I changed it into something that
made sense to me and actually tests text with a different font on second pass.
Also fixed characterRect function in tests to use correct font/format.
Change-Id: I843c5b29f8048196ec3405b6717655e77b567dbb
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
On a high resolution display the test will potentially create a text
edit that introduces line breaks and these make it fail then.
Change-Id: I38807a9b3b511478a1742c4422a97c1cb3395a02
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
The driver used on the Odroid-XU3 does not like doing just glFlush()
before accessing the texture in another context. There is no guarantee
that glFlush() is enough to sync access to resources between contexts, so
start using glFinish() as the default, except on common desktop hw + iOS
where flush is enough and presumably more efficient.
To unify the code pathes, remove the separate flushes and do it only
once, before the backingstore compositor indicates that it is about to
access the textures. This should improve performance a bit, esp. when
doing multisampling since we flush only once then.
A helper function is added to the internal QOpenGLExtensions because
it is highly likely that QQuickWidget will need the same.
Task-number: QTBUG-45106
Change-Id: Ifb405c5723f29f2f6c04df8e15fb70280681755e
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Make eglfs and linuxfb use the same code via QFbVtHandler.
Task-number: QTBUG-45106
Change-Id: I876bbf5f13bab6d4a81f616c01f15f9c98edf5fc
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
Without QProcess support we do not run test which initTestCase is
trying to find.
Change-Id: Icecaad90f61a019489e372517a6d62372155bd46
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The documentation claims that operator== is needed, not operator!=.
While at it, we can also replace the loop with std::equal, which
might even allow STL implementations to choose a hand-optimized
version of the algorithm for C++ builtin types ...
Change-Id: I988b326d6af3b767526952e303468e18ff6594f9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Implement an initializer_list constructor, which was probably
just forgotten so far. Technically this is a SC incompatible change,
since
QVarLengthArray<int> array = {10};
will now create an array with one element 10, instead of an empty array
with a reserved size of 10. Anyhow, keeping the inconsistency with the
STL / other Qt containers here would certainly do more harm than good
in the long run.
Task-number: QTBUG-45047
Change-Id: I4675880f93e141181250939942fa32300916b0e3
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Keep the win_x/y position in device independent
pixels. Call glViewport with the device pixel size.
Change-Id: I96fa038b1a0a3e18cb7f467b65def09cb89692a3
Task-number: QTBUG-38778
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Factor in the target devicePixelRatio when setting
the size (and devicePixelRatio) on the target pixmap.
Task-number: QTBUG-41682
Change-Id: I16a85cf7ba0adb6d6c05e9de4fd44ff5533b5f60
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
- Move m_eglDisplay to private section
- needsBasicRenderloopWorkaround is needed only locally so, make it a
static function
- remove unused member variables.
Change-Id: I3e845301ec66a322621c7d9e6fac257320a40f77
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
The limit has been removed in the change
a317ee0a6f.
Task-number: QTBUG-44865
Change-Id: I7106f7e7a2653e1ab03d79861ac505d4666598eb
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Locales with an explicit parent locale should not inherit
the language-default locale.
For example, a correct chain for zh_Hant_MO is:
zh_Hant_MO -> zh_Hant_HK -> zh_Hant -> root
(two fixups: zh_Hant_HK and root, so that do not inherit zh)
Fortunately, this didn't do any difference in a generated data.
Change-Id: I92e09a95bd86f8723d8fe993f57d99af6f50db5e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Since Qt 5.0, static overloads of QChar has a uint parameter only,
so there is no more ambiguity between uint<->ushort and thus some tests
does not make sense anymore; avoid explicit cast to uint for the others.
Change-Id: Ibc7a2ac4de63d3f023a8dbb5e53211ef8521579d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
The difference between BSD and MIT is the need to reproduce the
copyright in the documentation and the non-endorsement by a particular
company (the name of which was stale in the forkfd code).
Change-Id: Iee8cbc07c4434ce9b560ffff13cd0174934935e9
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Storing the position of the first selected item in the view can lead to
wrong extended selections if the contents of the model change. Future
Shift-clicks will always use the previous position of the first selected
item, which may not be correct any more, to calculate the current
selection.
To fix this problem, a QPersistentModelIndex is used to keep track of
the first selected item.
A new unit test is added. Moreover, one function of the QTableView unit
test is changed such that it shows the view prior to performing the
test. Without this change, this test may fail. That the test, which
simulates mouse presses without showing the view, worked at all seems
to be a coincidence, as pointed out in QTBUG-18009.
Task-number: QTBUG-18009
Change-Id: I0d844fbd1a994c279a7c8ee5d9b5b9fccecd25bf
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Added a flag to QCocoaWindow to ignore shouldCloseWindow. This is set
from within QNSView when escape is pressed and the current focus widgets
is processing input method events (like QTextEdit). This lead to
unwanted dialog rejects.
Task-number: QTBUG-44076
Change-Id: Ic90a8a6ba8c5cddbc0d486563acad57dd384d179
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
As we build PCRE outside of QtCore, there is no need to do that anymore.
Change-Id: Ib184966062f6afe7a449b860058e61e1ab2f7939
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
We already have an infrastructure for that.
Change-Id: I9110b74dcf7f93362586687da6f112e72cb663a4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Simply to hide the magic bahind the scenes.
Change-Id: I69a159eb14712e68117f10e78745bdfbad46b6f2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
As per spec not requesting a profile on 3.2+ is same as requesting
core since the profile mask defaults to core.
Change-Id: I5d03ac08bcba20c273c1c32a51f6a105eba0629f
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Even though immutable storage is available and the glTexStorage2D seems to succeed,
the subsequent glTexSubImage2D calls always fail with GL_INVALID_OPERATION.
Falling back to mutable storage works just fine.
This makes QOpenGLTexture and examples like qtbase's textures functional on Mali T628
(tested with Odroid XU-3).
Task-number: QTBUG-45106
Change-Id: If1b4fe6673ba924cfa7cfd7af7d4f0bc3b6a0fe8
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
By using the QDateTime::msecsTo to do the sorting it means that if
there is support for a precise time on the file system then this
ensures it sorts correctly.
Change-Id: I00528596908bba7b586aeffe5b0aa81019ff5722
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Keep DirectWrite initialization code in a single place and
fallback to GDI implementation if DirectWrite initialization has failed.
Change-Id: I2da185dbc073c58a7ba47bae09957ecac877d712
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
For !ttf and stretch==100 case, it was:
hfont = CreateFontIndirect(&lf);
TEXTMETRIC tm = ..;
if (!ttf) {
DeleteObject(hfont);
lf.lfWidth = tm.tmAveCharWidth;
hfont = CreateFontIndirect(&lf);
}
Unless there is some special behavior for non-TrueType fonts I don't
know about, it looks to me like a 100% waste.
Change-Id: I864340e50591ba1d8006d1a80f36f6f06f2734b6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>