The stored context pointer has to be reset to null in
destroy() even when no VAO was created (vao is null).
Otherwise destroying the context that was stored in the VAO
will not lead to resetting the stored pointer, and a subsequent
destruction of the VAO object will try to dereference it.
Task-number: QTBUG-44562
Change-Id: I438bb3954d4bbd8b8d8704f6087479804f0073a7
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Rounding the bottom right corner position means that the size
can change when the window moves. For windows we need
to round the size up in order to have a stable geometry.
Task-number: QTBUG-45076
Change-Id: I9a85a5915bfec55b0a7295be137b6fbfd7b53095
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
When CSS is set in a head tag then it was not being inherited by the child
tags when the CSS specification indicates that the properties are in fact
inherited. This ensures that those properties are inherited and the non
inheritable ones are unchanged.
A test is added to cover the different situations with inheritance and a
fix is done for the QTextDocumentFragment test which was passing despite
having incorrect defaults.
Task-number: QTBUG-28770
Task-number: QTBUG-34153
Change-Id: I55966240845a885852a04ecb82c61926dea9f800
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Add a new style hint to QPlatformIntegration: ReplayMousePressOutsidePopup.
Return false for it in the xcb plugin.
This commit restores the behavior which was in Qt 4.
Task-number: QTBUG-34814
Change-Id: I19fee762395a51475cc67b52b368c70679ca736b
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Enable native popup on iOS as well as OS X
Change-Id: If99180a017768d9c94241adf2282ee9b3f69cbc1
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
QPlatformMenu::showPopup() is supposed to be non-blocking.
So ensure that we don't start cleaning up the menu items directly
after the call in showNativePopup, but wait until we need to reload
the items, or the combobox is destroyed.
Change-Id: Ie4c9b6425cec44861af38e517fc5ef226e0903c7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
This change adds missing variables in mkspecs/qconfig.pri about gcc
compiler version when using mingw: QT_GCC_{MAJOR,MINOR,PATCH}_VERSION
This is needed in case CONFIG += c++14 is used.
Task-number: QTBUG-44142
Change-Id: I34c27f9154bb745a8ee75c777a0acbdbc5bda5a9
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
We have two State types in the All QML Types list. One is in QtQuick
and the other is in QtQml, but they are both just listed as "State"
with no way to tell which is which. Now they look like this:
State: QtQml
State: QtQuick
Change-Id: I48bb3deda10a61f565d1aed1910360fea4fb7891
Task-number: QTBUG-45141
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Remove the \service and \mainclass commands, and the ditamap stuff.
Also remove all reverences to these commands from qdoc itself.
Change-Id: I8d150acdd56d40e6a4198a021e50f5fe3f3b1194
Task-number: QTBUG-45143
Reviewed-by: Martin Smith <martin.smith@digia.com>
Avoid showing unnecessary "TouchFrame without registered device"
warnings. That should be reserved only for not having a device ready.
The touch point list's emptyiness is a different story - there we
should stop silently as that is not an error.
Change-Id: Icdb8b352351b70a7e1af2d3a1de3001dfb751aae
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
With reasoning similar to commit v5.5.0-alpha1~123 (Make some
QAbstractItemModel API invokable, 2015-02-25)
Change-Id: If0bf3a756ab1031f906c5bf9c823aafae4c3873c
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Stephen Kelly <steveire@gmail.com>
With reasoning similar to commit v5.5.0-alpha1~123 (Make some
QAbstractItemModel API invokable, 2015-02-25)
Change-Id: I77c72f7bb856a1eee966b45950384fe03a8eaac6
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Gitorious is closing down, so point to code.qt.io instead.
Change-Id: Ibc453f05e59cf227a7a7086201b008cf7b576a26
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Use the debug operator for enums and flags to format keys and
modifiers.
Change-Id: Id748e4b2202797efcbf3a616d111399929ada8b1
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Compilers don't like out parameters.
Effects on Linux GCC 4.9 stripped release builds:
text -584B
data +-0B
relocs +-0
Change-Id: Ie00c89b9edaced3a6adeb2707734c8f5238e67c1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The function getDateFromJulianDay() is simple arithmetic, but still
~400 bytes in executable size.
Yet GCC inlines this everywhere I looked, which makes some sense,
as different users of the class only use parts of the return
value and the optimizer has a field day removing all that dead
code.
However, that function has only one conditional, so presumably it
executes at full pipeline speed and it doesn't matter that it
calculates too much in some cases. More important is to use the
I-cache more conservatively.
That's what not inlining the function achieves.
The function returns its result in registers and doesn't spill
registers when called (at least on AMD64), so the effect on
runtime should be negligible.
Effects on Linux GCC 4.9 stripped release builds:
text -1536B
data +-0B
relocs +-0
Change-Id: Ia16838102d29ad67ee5efdc8b7b0a26f2f921df1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Instead of using a QString::arg() cascade, which creates tons of
temporaries, use good 'ol sprintf().
Effects on Linux GCC 4.9 stripped release builds:
text -308B
data +-0B
relocs +-0
Change-Id: I348577491d1399b5040f7ed9e9f6b111a9528e5d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Save one return statement per function. I don't see why the compiler
can't fuse these itself, but apparently it cannot, since this
transformation saves 72B in text size.
Change-Id: I3a661456554bf451ed53110ad546946ff7b84ec5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
All other similar functions in QDate just return an empty string
in case none of the switch labels would trigger (which would now
cause a compiler warning, after removing the default case label),
so do that here, too.
Saves 44B in text size.
Change-Id: I80ee4975082706adcd15fe89511d08c67e149324
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
They're pure whitespace, since in each case there is a fallback
after the switch, anyway, and their presence prevents compiler
warnings about unhandled enumeration values in switch statements,
which is nice-to-have, when adding to the enum, eventually.
No change in executable code size.
Change-Id: I77aecaeff990601f957ec9ee827eff5ead25aaa1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This will prevent unnecessary warnings about unknown types for signals
or slots that are not even exported to the D-Bus.
Change-Id: Iecda5beca5ebe6665a193245fe1c2578156f6abe
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This allows applications that need additional symbols from the library to
easily obtain them without needing to replicate the library open logic
from qdbus_symbols.cpp.
Change-Id: Ic65ef6684637fbcd1c9f4fe1dc7a57f0624b61a8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When building the test while qtbase has been installed and the
build dir was removed, the include paths were not found in
frameworks builds.
Change-Id: I32d9e61176a5e19c86095580ddad6914f25ff952
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
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>