This code hasn't been tested for at least 4 years. It's not maintained
and probably doesn't work.
Change-Id: I4b9a5179e34111b400914f91caa6b741b69771bb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Properly capitalize the names UTF-16 and UCS-4 and make sure we talk
about UTF-16 and not UCS-2. UCS-2 is not the same and does not support
surrogate pairs.
Task-number: QTBUG-35287
Change-Id: If33270996bacc9ae5d04c87423fa1ee9ddaff230
Reviewed-by: Martin Smith <martin.smith@digia.com>
The #undef in qcompilerdetection.h was missing.
And apparently we can detect Neon since Windows Mobile 6 too.
Change-Id: I38a5f71b2704a29a706183e39f43db3a78a729db
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
In order to make this work better with remote URLs.
Change-Id: Ic440735142441150838b05e88940adcc12a90d09
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
4+6*6+3*1+4+2+6+8 = 63, not 64, so make 'unused' have 9 bits width.
Change-Id: I06e66074a09e93538fac01182c5a0d009d9b6583
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
The convenience subclasses use the QPixelFormat ctor, not the data fields directly.
Change-Id: I011299837cfb3b7006bc8425848989e5739b6082
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This is the second and last part of the forward-port of
https://qt.gitorious.org/qt/qt/merge_requests/1281
[ChangeLog][QtConcurrent] run() now optionally takes as its first argument
the QThreadPool to run the task on.
Task-number: QTBUG-17220
Change-Id: I4b46eca6ef7de9cd34dac07e6d4b8ad830426b97
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Background:
It is often necessary/advisable to schedule tasks on thread pools !=
globalInstance(). As Herb Sutter writes in
http://www.drdobbs.com/parallel/use-thread-pools-correctly-keep-tasks-sh/216500409
and the Qt Training Material stresses, tasks you schedule on a (global)
thread pool should be non-blocking, which currently rules out using any of
the QtConcurrent functions for, say, file I/O.
Nonetheless it's often convenient to have thread pools also for file I/O, as
the thumbnail viewer exercise in the Qt Training Material shows. In this
case, you'd use a dedicated thead pool, leaving the global thread pool for
CPU-bound tasks.
Yet, none of the QtConcurrent functions allow to pick the QThreadPool
instance on which to schedule the work created with them.
This patch prepares for them to do so.
This is the first part of the forward-port of
https://qt.gitorious.org/qt/qt/merge_requests/1281.
Implement by using a new QThreadPool* member that defaults to nullptr,
and adding setThreadPool to set this member, then using it in lieu of
QThreadPool::globalInstance() everywhere.
I chose to leave m_pool == nullptr to mean globalInstance() to avoid
creating the global instance whenever a QFuture is created, even if the
future represents the result of a calculation not run on the global thread
pool.
[ChangeLog][QtCore][QFuture] Can now be used with any QThreadPool, not
just globalInstance().
Task-number: QTBUG-17220
Change-Id: I4e1dc18d55cf60141b2fa3d14e2d44a3e9e74858
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Add a test that checks that QHash keeps the first of the keys
that compare equal. This may or may not be documented, but is
inconsistent with the values in a QHash, where the last element
with equal key is kept.
Document this as a test. That way, we'll be informed when the
behavior changes (e.g. by a port to std::unordered_map).
Do the equivalent checks in tst_QMap, too. There, of course,
instead of equal keys, check equivalent ones.
Change-Id: I2c5f04f8e8a6bbc7dbaadadd878a4c876e4df042
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
These are used in Qt Quick Control's TableViewStyle.headerDelegate.
Change-Id: I2d87896b9987b86e30123b34872f9322d304a190
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
QGLContext already uses ownContext to identify when it "owns" QOpenGLContext
and will delete QOpenGLContext when needed. In the other way
QGLContext::fromOpenGLContext creates a QGLContext for QOpenGLContext, and is
now using qGLContextDeleteFunction to identify if QOpenGLContext "owns"
QGLContext by QGLContext only passing a delete function when QOpenGLContext
should delete QGLContext, and by QOpenGLContext calling deleteQGLContext() from
destory() to do the destruction avoiding the previous leak and sometimes crash
on exit.
Change-Id: I65e791776e99b456e4d0c70fc5b5cdb33c975893
Task-number: QTBUG-40286
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
SubType can be used to determine an internal format of an image such as
pixel format and/or compression algorithms.
Change-Id: Icf296d54bb509e4e2bdb70544df678fc53f57c79
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
On mobile platforms several different popup menu types exist.
E.g on iOS, you have a special popup just for selecting text.
This patch will add a new enum that lets UI controls select/hint
which one to use for a particular QPlatformMenu. It's likely
that the enum needs to be extended later (DropdownMenu, PopoverMenu
etc), but being able to specify the edit menu at least will do for now.
Change-Id: I2aefa5eedb9429921560ac2b778a88721f153459
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
DRI2 clients don't receive GLXBufferSwapComplete events on the wire.
Instead the event is synthesized by the DRI2 WireToEvent handler,
so for an application to be able to see it we have to convert the
synthetic event to an xcb_glx_buffer_swap_complete_event_t and pass
it to the native event filter.
Change-Id: Ic466ff26487937b03f072a57e0ee4df335492a5f
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
A simple convenience class providing a QWindow that has a
paintEvent and supports opening a painter on itself. It
behaves exactly like QOpenGLWindow in this respect, which is not
surprising since they share the same base class (QPaintDeviceWindow).
QRasterWindow does not however have any OpenGL dependencies and will
be present in -no-opengl builds too.
[ChangeLog] Added QRasterWindow, a thin convenience wrapper for a
QWindow on which a QPainter can be opened.
Done-with: Jorgen Lind <jorgen.lind@digia.com>
Change-Id: I37e82720492945d7b85d5f713eea8d5f7556e511
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
[ChangeLog] Added QOpenGLWindow. This serves as a convenience class for
creating windows showing OpenGL content via an API similar to QGLWidget
and without any widget dependencies.
Done-with: Jorgen Lind <jorgen.lind@digia.com>
Task-number: QTBUG-36899
Change-Id: I52e9bc61acb129dbfd3841b3adeffab2dbcf7f05
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
On WP8.0, setting auto rotation preferences at runtime worked like an
orientation update mask, and did not modify the behavior of the window.
With WP8.1, setting auto rotation preferences has the side effect that the
compositor will then resize the window when moving from e.g. portrait to
landscape. Because of this, the auto rotation API should not be called
inside orientationUpdateMask(). The default implementation is now
sufficient, so the platform override is removed.
Developers looking to set auto rotation preferences should use the
application manifest or call the native api directly.
Task-number: QTBUG-35953
Change-Id: I90cf4290ced34df1bb350cb6aa5deff209622865
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
This library was created as a work around for limitations on Windows
Phone 8.0, which will not be supported going forward (Qt 5.4). Therefore,
we no longer need (or want to maintain) this experimental feature and
should remove it from the repository.
Change-Id: Ia417833f9de43e2d3e0940df93625e7d87a555ea
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
As ANGLE doesn't resolve non-extension functions, these need to be
resolved manually.
Change-Id: I0fe45005f662f7d7f2b53c09ef129efd65fb999a
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Currently, the physical size of the screen is calculated with the
logicalSize and the logicalDpi of the screen. This doesn't work because
logicalDpi has a user-defined multiplier and a strange value.
The easiest and accuratest way is to take the raw dpi of the axis and
the raw pixel size (logicalSize*scaleFactor).
This all is needed for a correct value
of Screen.pixelDensity in QtQuick.
Change-Id: I8be0139d762364140043c3fa0d203298ca7ef293
Reviewed-by: Jochen Seemann <seemann.jochen@gmail.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
This partially reverts eea02ff1 in that devicePixelRatio() will now
always return 1. This is because non-integer ratios are bound to cause
problems with pixel alignments, and their use prevents users from
accessing the complete pixel grid in Qt Quick. Now, the full physical
resolution of the screen/window is reported instead.
The EGL initialization is adjusted to match requirements for ANGLE 2.1.
Change-Id: I24c6dcf4419f30e5e4c73c592beb446a418a0b8b
Reviewed-by: Jochen Seemann <seemann.jochen@gmail.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
The EGL_EXT_device_base extension allows for querying the platform
device of the graphics hardware via eglQueryDisplayAttribEXT().
As that extension is not supported by ANGLE, this patch adds similar
functionality to the existing eglQuerySurfacePointerANGLE API. When
EGL_DEVICE_EXT is passed as the queried attribute, the underlying
D3D/DXGI device pointer is passed back to the caller via the value
argument.
The D3D device is needed for video support in QtMultimedia as well as
the IDXGIDevice3::Trim() calls required by the Windows Store.
Change-Id: Ibdf228d81d6604e56db9dd8597d7cd2983ebc428
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This version of ANGLE provides partial ES3 support, numerous
bug fixes, and several potentially useful vendor extensions.
All patches have been rebased. The following changes are noted:
0000-General-fixes-for-ANGLE-2.1.patch
contains compile fixes for the new ANGLE
0004-Make-it-possible-to-link-ANGLE-statically-for-single.patch
has incorporated patch 0015.
0007-Make-DX9-DX11-mutually-exclusive.patch
has been removed as it was fixed upstream.
0007-Fix-ANGLE-build-with-Microsoft-Visual-Studio-14-CTP.patch
has been moved up to fill the patch number gap.
0010-ANGLE-Enable-D3D11-for-feature-level-9-cards.patch
now contains patch 0014 and 0017.
0013-ANGLE-Allow-for-universal-program-binaries.patch
has been removed as it is no longer relevant.
0014-ANGLE-D3D11-Fix-internal-index-buffer-for-level-9-ha.patch
has been merged with patch 0010.
0015-ANGLE-Don-t-export-DLLMain-functions-for-static-buil.patch
has been merged with patch 0004.
0016-ANGLE-WinRT-Call-Trim-when-application-suspends.patch
has been removed and will be replaced by a follow-up patch using a
different technique.
0017-ANGLE-D3D11-Don-t-use-mipmaps-in-level-9-textures.patch
has been merged with patch 0010.
0018-ANGLE-WinRT-Create-swap-chain-using-physical-resolut.patch
has been removed and will be replaced by a follow-up patch extending
the EGL_ANGLE_window_fixed_size extension.
0019-Fix-ANGLE-build-with-Microsoft-Visual-Studio-14-CTP.patch
is now patch 0007.
[ChangeLog][Third-party libraries] ANGLE has been upgraded to
version 2.1, bringing partial support for OpenGL ES3 over
Direct3D 11, numerous bug fixes, and several new vendor extensions.
Change-Id: I6d95ce1480462d67228d83c1e5c74a1706b5b21c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
- Introduce functions to return class name and type name by type.
- Move QDebugStateSaver up.
- Add verbose output for DnD, tablet, native gestures, context
menu, enter and expose events.
Task-number: QTBUG-38858
[ChangeLog][QtGui][QEvent] The debug output for events has
been significantly improved.
Change-Id: I3f11e34c3c9d6a3c6db596be4051b801f00e6153
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
qlist.h(133) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
qlist.h(131) : while compiling class template member function 'QList<QString>::QList(std::initializer_list<T>)'
Change-Id: I8a11e298cd10da199490fbd8b269405a9e1cf5f3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Add a test that checks that QSet keeps the first of the elements
that have equal value. This is documented, but inconsistent with
values in a QHash, which keeps the last element with equal key.
Document this as a test. That way, we'll be informed when the
behavior changes (e.g. by a port to std::unordered_set).
Change-Id: I4ca1718bb86599b925b3ccd13b0856917cd4ce67
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
simply make use of the infrastructure used for "proper" modules.
Task-number: QTBUG-40026
Change-Id: Iffab72f7fb7a128549da2839a7497cff2f48b777
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Keep track of the focus object in the input context ensuring
that events on canceling are sent to the right object.
Task-number: QTBUG-40402
Change-Id: I79820db94d97e21b47abc8fe2bae6fa012d31236
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This makes it easier to forward-declare the exported symbol from
other Qt modules without having to include the private headers.
This keeps the old API until dependent submodules are updated.
Change-Id: I08310a684b79f2f612f2ce897a601ff74178bee6
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
If this fails, we want to know about it when trying to debug.
Change-Id: I33f05186e93fcd9284a7e7c609d00fe7ac87cd4e
Reviewed-by: Richard J. Moore <rich@kde.org>
FD types differ depending on the platform, so using the stream form is the
easiest way to make this work.
Change-Id: I00b1a303f3d865fe5e89ba97bd438c51c6cd8f09
Reviewed-by: Richard J. Moore <rich@kde.org>
This patch adds the option to disable subpixel antialiasing on QFont
basis. This can be useful when painting to offscreen surfaces. On OS X
this option disables the aggressive LCD font smoothing, which can be
necessary for certain fonts it may otherwise ruin.
Task-number: QTBUG-40396
Change-Id: I1664b636520ae63ee1503b5df7436748106b9f5c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
sqlite 3.8.5 supports Windows Phone 8.1. Make required
adaptations and add it to the default build.
For WinRT and Windows Phone the QSqlQueryModel unit-test
fails, both with plugin compiled and using the system
sqlite. Root cause seems to be deep inside sqlite, hoping
for a fix soon. However, all other tests pass and hence we
should enable it.
Task-number: QTBUG-37770
Change-Id: I700dde4a44a8f1d74460ef6cb4a1e1d330073d66
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
The "Fixed CE build of sqlite3" patch is preserved in this change.
(ea70ec8711)
Change-Id: I8ae83bdb0006ee12e371a2a6f396b4a7b798a5e3
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
We currently do not receive events from most multimedia keys on Windows
because they are sent using appcommand events instead of the normal key
events.
This patchs adds support for parsing appcommand events.
Change-Id: I19f568b6fa0d3d136e3a22318df1499a1fab6edb
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Android L adds support for 64 bit (arm and x86) and they did lots of
changes that are incompatible with old implementation.
Task-number: QTBUG-40120
Change-Id: I69b78a9eed896d2ddabc1bf2a55886faeae47974
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Issuing a metacall from swapBuffers is dangerous since the window
may get destroyed by the time the slot is invoked.
This patch changes it to use an event, which is more efficient anyway,
that can be invalidated in case the QXcbWindow is destroy()'ed before
the event is delivered.
Change-Id: I44618ac1cb8b221aecce001ea39702164dcab6a5
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Mention QOpenGLContext::functions() which is used quite commonly in Qt
itself and also some examples.
Also, make it clear that new instances do not degrade performance since
function resolving is done only once.
Change-Id: I74ac194a0b3956a70e5078dd5a1bcdd277b5cc28
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
QOpenGLWidget is now public.
In addition Qt::WA_AlwaysStackOnTop is introduced to support the
special case of semi-transparent QOpenGLWidget or QQuickWidget on
top of regular widgets.
hellogl_es2 becomes the qopenglwidget example. This example performs
painting both via QPainter and native GL commands and has the OpenGL
widget combined with other, normal widgets.
The widget stack receives some changes when it comes to renderToTexture
widgets like QQuickWidget and QOpenGLWidget. Calling update() will now
result in a paint event, which is essential for QOpenGLWidget since we
want it to behave like a regular widget. The dirty region handling is
extended specially for such widgets due to performance reasons.
(an OpenGL content update must not result in any backingstore painting,
and is thus handled as a different kind of dirtiness)
[ChangeLog] Added QOpenGLWidget. This widget serves as a replacement for QGLWidget.
Task-number: QTBUG-36899
Task-number: QTBUG-40086
Change-Id: Ibf7f82fea99b39edfffd2fc088e7e0eadbca25cf
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
The position of high DPI icons is wrong in the Fusion style because
the pixel resolution is not taking into account when centering them.
Task-number: QTBUG-40277
Change-Id: I3593ed461ea57543c3ddfd473105fdc698789132
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
When deploying QML applications, the androiddeployqt tool can
use qmlimportscanner to detect the QML dependencies of the
application, but then it needs to know the root of the project
as well as additional QML import paths. We use the already-existing
QML_IMPORT_PATH for the import paths, and default to using the
location of the .pro file for the root path (same as for static
builds in qt.prf).
Change-Id: Ib536272ed1f3f1320ea8ef529655e2ba003bc734
Task-number: QTBUG-34175
Reviewed-by: BogDan Vatra <bogdan@kde.org>