In order to properly use QHistoryState object in QML we need to know
when these properties are changed.
Change-Id: I28c783436410c84bc64a919ac18c183f7a5eb9ad
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
In order to properly use QState object in QML we need to know when these
properties are changed.
Change-Id: I37f8295e5201686a52d448cc42db331a8f8e792f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Call the standard functions directly in GLES 3.0+ builds.
The catch here, just like with the mapBuffer changes, is that we could,
in theory, dynamically load a GLES3 implementation on the !QT_OPENGL_ES_3
path too. However this is limited to Windows currently and we don't have
a full GLES3 stack there (yet), and even when we do get it, the ANGLE
extensions for blit and multisampling will still work. Therefore this
isn't really an issue for now.
Task-number: QTBUG-38168
Task-number: QTBUG-39187
Change-Id: I343a737218c9fe438ee1603b37e93f0400d952a5
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
The support already in place for ANGLE is now extended for NV.
On ES 2.0 the only way to get multisampled renderbuffers and blitframebuffer
is through vendor-specific extensions. QOpenGLFunctions is updated to resolve
the related functions for both ANGLE and NV, in addition to EXT.
Task-number: QTBUG-39187
Change-Id: I1aab805ced3d06dde3dc547221bbf833ff8e06c2
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
The config test correctly recognizes if GLES 3.0 is
available, however qopengl.h still includes the ES2
headers. This causes issues for the new GLES3 support
patches.
Change-Id: Ia97f556cc207f7d828918f493fe1adab93cf31ec
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
[ChangeLog][QtGui] Keymaps are now changeable at runtime when using eglfs
Task-number: QTBUG-39583
Change-Id: I93480da72c1d1d1db1914298fe624cae02b0b2d0
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Will Wagner <willw@carallon.com>
This allows QQuickApplication to listen to layout direction changes
without installing an expensive event filter on the application object.
Change-Id: I2d7d8906acecbc092657c4bd918bbdc9aad9744c
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This version has a few new C99 support added, including snprintf.
Change-Id: I5776456fd94254a64f08791f59bc775cb24c9b7f
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Task-number: QTBUG-39136
Change-Id: I4d2626416fae99339988cd994653ce7ec753f081
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When qtbase has been compiled with PCH and trying to compile the
disassembler in QtDeclarative creating the PCH for "C" is failing
due the C++ includes. Guard the includes with __cplusplus to be
"usable" on C code. This guard is proposed for the "stable.h" in
the qmake precompiledheaders documentation.
Change-Id: I7a8fb9e59c666a2e1535d988fd71c5cd67d0587d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
According to the spec rects get returned with iiii but we were directly
serializing QRect resulting in (iiii) as signature.
This would trip up Orca when trying to use flat review in text edits.
Task-number: QTBUG-39702
Change-Id: I8d6769688586e678d27cc4341de5176a91f057fc
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Increase and decrease actions can be generally applied to any value
interface. We therefore make them available regardless of the
existence of any action interface.
Change-Id: I82ba01965dc869439b9d741ce681e0c0687263ca
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
To support increment / decrement of sliders, dials and spin boxes.
(anything with an {in,de}crementAction or a valueInterface.
Other platforms will follow the same pattern in follow-up patches.
Task-number: QTBUG-38832
Change-Id: Ie570acc39b3d9494a8bb9f624b61a398b1d8de89
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Task-number: QTBUG-39215
Change-Id: I727a12fa9696e22d3f31393a0fe2f9392afbfe45
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
There's now a C++ standards Standing Document that defines preprocessor
macros in the same way that we used to. So we no longer need to define
them ourselves. The current macros are kept for compatibility purposes,
for the compilers where they used to be defined.
The list will not be extended with new macros or for new compiler
versions.
[ChangeLog][Deprecation Notice] The Q_COMPILER_xxx macros for C++14
compiler features introduced in Qt 5.3 are deprecated and will not be
updated for new compilers either. User code should be changed to use the
macros from Standing Document 6 instead:
http://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations.
This does not affect C++11 feature macros.
Change-Id: I246afb84263f3d7ff72ccc0bc44bf86a6fc7cd96
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Change the semantics of QWindowPrivate::screen to contain the screen of
top level window only. Child windows always return the screen of their
toplevel window by recursing up.
The QPA plugins then no longer need to report screen changes for child
windows.
Change setScreen() accordingly, bail out for child windows, and
emit screenChanged() recursively.
Also add a check to setParent() preventing screen changes.
Task-number: QTBUG-36659
Change-Id: I19c8e12217cba1513e947a027f2492abc7b98816
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
ICC 14 (Intel Composer XE 2013) already supported range for and explicit
conversions, but looks like we missed adding them.
ICC 15 (Intel Composer XE 2015) is C++11 language feature complete.
Change-Id: I6eb8a3059f5df3604716666311aa01a6cf01918d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Orca is extremely picky when it comes to key presses and modifiers.
Sending ctrl as modifier for itself for example seems to break things.
Also use the ATSPI modifier constants, weird as they are.
Task-number: QTBUG-39361
Change-Id: Id809e0dd2a7d20a533bd783888ccbdf748becacc
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
If -qreal float is passed, fullCpuArchitecture() will now include
"-qreal_float". If something else other than "float" is passed to
-qreal, we'll try to encode it (e.g., -qreal "fixed<int, 7>").
Change-Id: Ie33fd1a643f4376e6f01a7966e01c7c34e6fcffd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
The next commit will add something to ARCH_FULL that requires
qconfig.h. That means we can't extract the full info until qconfig.h is
created, which hasn't happened yet at the time that config.tests/arch is
compiled.
Change-Id: Icbbd8c448423a93296a986ede3771e82e4d61e07
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
When using a linear index, all items in a scene are stored in a QList.
While adding new items is a constant operation, removal requires a
traversal through the entire list. This is especially problematic
when the scene contains millions of items and many of them are removed,
which requires a linear search for each item, resulting in a very slow
operation. Moreover, this behavior is actually inconsistent with the
current documentation which states for the linear index:
"Adding, moving and removing items, however, is done in constant time."
Instead of removing items from the list in the index, this patch just
marks the list as invalid. The next time the list is required it will
be rebuilt from scratch by traversing all items from the scene. This
new behavior more accurately matches the documentation.
Testing this change in a scene with over 1 million objects, resulted
in a massive speed up, effectively eliminating the overhead of item
removal.
[ChangeLog][QtWidgets][QGraphicsScene] Speed up the removal of items
when using the linear index.
Change-Id: I95c7b90b9f1fe426018695b6429138530e6d2f3e
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Enable QWindowsMimeConverter to use external mime handlers which it
does not own.
Task-number: QTBUG-39559
Change-Id: Ife6607dffd9571fa4aa12fffdc61b42662182b0a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This makes it possible to retrieve the EGLConfig used by Qt to
create the QOpenGLContext. QtWebEngine needs this to be able to
get rid of EGL_BAD_MATCH errors on certain hardware by using the
exact same EGLConfig in Chromium as used by Qt.
Change-Id: I049c0d8637c44acfe160230e4bb81364d66413ab
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Currently QJsonValue and QJsonValueRef behave differently in
regard to the default values leading to confusion compile errors
depending on which of the two types one is actually using. Before
this change it was possible to write:
QJsonValue value = jsonObject["item"];
QString name = value.toString(QStringLiteral("default"));
but not:
QString name = jsonObject["item"].toString(QStringLiteral("default"));
Change-Id: Id1185acf339aa3a91e97848e85d068f84552df71
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
-"HTML.tocdepth" variable controls depth value.
-setting to "0" disables table of contents.
-sections 3 and 4 usually don't have descriptive titles
to warrant their listing in the table of contents.
-table width and CSS (online and offline) don't support wide entries.
-Config class' getInt() function now returns -1 if a variable is
not set.
-for Qt 5 and projects which use html-config.qdocconf, tocdepth is
set to "2".
-added variable documentation.
Task-number: QTBUG-38967
Change-Id: Ibd612f5b846ecb9c4b575e7ac11605c6efd2b77c
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
A disconnectSignal() call with a wrong signal name caused that hook
wasn't found and thus kept in QDBusConnectionPrivate::signalHooks
forever.
Change-Id: Id7cda225be7580529fc835b377636226abb229f9
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This lays the foundation for iOS accessibility.
The approach is slightly different from other a11y bridges in
that we completely flaten the hierarchy of wigets/quick items to
a list. This works well with VoiceOver since there are comparatively
few elements. The cache implementation for OS X is re-used.
With this patch VoiceOver on iOS works on many applications out of the box.
For now it sends the screen changed notfification somewhat overzealous,
that will need revisiting and potentially new API in QAccessible.
Device orientation changes are not yet supported.
[ChangeLog][iOS] Accessibility was added to the iOS platform port.
This enables Qt applications to be read by VoiceOver on iOS devices.
Task-number: QTBUG-39097
Change-Id: I441e844652d528cc2fdcc444f43b54ed6fa04f0c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
When navigating with the directional keys or tab/backtab, there are
certain situations where the cell that is edited is incorrect.
For example, consider the table below.
'^' represents the starting cell and the direction of navigation.
'c' represents the index that is arrived at as the currentIndex prior to this patch as
reported by view.selectionModel()->currentIndex().
'x' is the cell that should be edited:
+---+---+---+---+
| | | e | |
+---+---+---+---+
| | x | |
+---+ +---+
| | c | |
+---+---+---+---+
| | | ^ | |
+---+---+---+---+
Before this patch, the cell that will actually be edited is c, rather
than x, so after editing the cell and pressing enter, the previous
contents of the cell will still be shown.
With this patch, currentIndex() will be changed after every call to
cursorMove(). Navigation into and out of cells is not affected because
the visualCursor member in the QTableViewPrivate tracks the keyboard
navigation entry point. If after the up navigation into the span, the
user presses up, the cell entered is 'e', not the cell above 'x'.
Task-number: QTBUG-29239
[ChangeLog][QtWidgets][QTableView][QTableWidget] currentIndex() now
reflects the top left cell when in a span.
Change-Id: I3dc3db46ebba340102860fc4ad98fcaf91484983
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Traditionally, RCC in "C mode" was meant to bundle small resources into
a binary, like help texts or an occasional icon. RCC produces a .cpp
file containing the actual data in a char array which is then passed
to the compiler and linker as a normal source file. Larger resources
should be compiled in RCC's binary mode and loaded at run time.
Current Qt Quick use tries to deploy large hunks of data in "C mode",
causing heavy compiler/system load.
This patch works around the issue by splitting the process into
three parts:
1. Create a C++ skeleton, as usual, but use a placeholder array
with "easily compilable" (mostly NULs) data instead.
2. Compile the skeleton file.
3. Replace the placeholder data with the real binary data.
time (qmake5 ; make clean ; make) takes 1.3 s real time for a
100 MB resource here, and there is still room for improving patching
performance if really needed.
Change-Id: I10a1645fd86a95a7d5663c89e19b05cb3b43ed1b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
We duplicate quite some code here in an attempt to still print
messages, even in OOM situations. However, we've in general given up
on handling OOM exceptions gracefully in Qt: On modern systems
you hardly reach the point of not being able to allocate (smaller)
chunks in the first place, since the system will usually overcommit,
or bring the system to halt by heavy paging.
In 7cafb62538 we removed already similar logic in QDebug
class.
Change-Id: I4f84641c41c5e230a60dc0b7a5b0a13dec20f90f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This simple patch was an unfortunate victim of the Gitorious to
Gerrit transition. (https://qt.gitorious.org/qt/qt/merge_requests/1179)
As noted in the Gitorious review, a small bug in readHeader is also fixed: ||
instead of &&.
Done-with: Pali Rohár
Task-number: QTBUG-12684
Change-Id: I1fe16359b9b68c10e518904c6a5c58b00fb7379b
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Now that the current fbo is not tracked anymore, toImage() and
blitFramebuffer() will not restore the previously bound (or
whichever Qt thinks was current before) fbo. toImage() needs to
accommodate this since the isBound() check was going wrong now that
the blit always makes the fbo non-current.
The current fbo is now queried via glGet both in toImage() and
blitFramebuffer().
This will fix the recently introduced Lancelot failures with -glbuffer.
Change-Id: I43a780beaeac4697d92cb0ebda7d14ca28a3924f
Reviewed-by: aavit <eirik.aavitsland@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
toImage is a virtual method declared in QPlatformBackingStore and is
useful when you need to access the image buffer from outside the QPA
plugin. (e.g. you can use
QPlatformBackingStore::toImage().save("bs.png") to save it).
Change-Id: I7cc70ed295070707ed0ef3ce208129f174f68cfb
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
- fix build on 10.6
- actually build it at all
Change-Id: Ib929f8b56e55f00191f7fcfb2be25975e46a1af2
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>