A QVector<int> uses 50% less space on 64-bit platforms.
Change-Id: I6a2174b04b362188597bc42cad84b7ce2018ea78
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The old code assigned an empty QPoint to elements contained
by value in a QHash that was cleared out in the very next
step.
That makes no sense, because the operations in the loop cannot
possibly cause a re-entrancy into QGraphicsItemCache, which
would be the only explanation for modifying the state of a
death-row object.
While at it, replace the use of the highly inefficient
(and no longer needed) QMutableHashIterator with C++11
range-for, taking care to iterate over a const reference to
avoid detaches.
Change-Id: Ie3eba0f954644a27932666bc9e97f1ca8f36a578
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
While investigating a rendering bug I noticed that methods marked in the
blitter engine as virtual and intended to override a base implementation
where in fact just shadowing a non-virtual method in the raster engine.
Fix that and add Q_DECL_OVERRIDE all around to avoid similar breakage
in the future.
Change-Id: I24c5bb27fb6d3ac57dddb704a14dab7ce153a72a
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
A few things were changed in Android 6.0
Task-number: QTBUG-49323
Change-Id: I3112d885881dce541d5c4f3a1561f6c34d75e319
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
This was a regression (it worked in 4.8) that was probably introduced
by the refactoring of the accessibility framework in Qt 5.
Now, QPlatformAccessibility::notifyAccessibilityUpdate() is called
regardless of isActive(), so its the responsibility of each
implementation of notifyAccessibilityUpdate() to check for isActive()
where it matters.
Task-number: QTBUG-33303
Change-Id: I0d18f8c1890ef679460408b05e704712b886bf7c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Change-Id: I071810cc5bc2773df9f6202c4547379d3ecd8b5c
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Adds a NEON optimized version of the QImage smooth scaling.
Change-Id: I27c0a24d25f66bda3b5c55a8fabdb8b583fcd5c6
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
when embedding a QWindow into a native win32 window hierarchy, dragndrop
is not working, as RegisterDragDrop is not called.
the parent HWND is wrapped via QWindow::fromWinId(), which is topLevel, but
a Qt::ForeignWindow. it's children are not topLevel.
we therefore add a conditon to call RegisterDragDrop on non-topLevel windows
whose parent is a Qt::ForeignWindow
Change-Id: Id2bfa1130857c21566feae9cb10b62b648d86a72
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
QColor always uses unpremultiplied alpha, but the new QImage methods
were based on the QRgb versions which might be either. This patches fixes
the two new methods so they treat QColor alpha correctly.
Change-Id: I78a5b875ad4e78ad7fde3b811c6187482b4f6d15
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
The special case was needed for INTEGRITY 5, but select support has
since long been added.
Change-Id: Ice25c5becc9d7dcdf6c5bc9eeac36b70e1b94df3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The variables were always intended to be located inside the #ifdef
Q_OS_INTEGRITY.
Change-Id: I5e223ff8b5b2a686e4b45e2b8eb731e8406a199f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
More specifically, equivalent declarations to this BSD header are
defined implicitly on INTEGRITY, and the header does not exist.
Change-Id: Ib0bd4b22742ef403c83dab0d72c268c1571b8250
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Some systems, like INTEGRITY, may support Posix/unix but lack system()
in certain configurations.
Change-Id: I8ef09fac03f8d16d791cdf1073f32b1c7c911776
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
cpuid and cpuidex are available as intrinsics, but the GNU-style
assembly is needed for xgetbv.
Change-Id: Ib9f280ac6b69b7ffb9c39289b52fa4af5e2de9ba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The GHS toolchain needs names for enumerations that are used for
template instantiation.
Change-Id: I4e184cd77074fd7ece89f21317536e6006ab257d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Using single-process mode of INTEGRITY, there is no notion of user,
so no notion of home directory or tilde expansion.
Change-Id: Ia128b8cd2c7392ba9cf201b74a5118b94d79b4c5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This avoids several warnings with the GHS toolchain, in the form:
warning #111-D: statement is unreachable
This is because the sizeof() equality test is statically determined,
but the following code is not discarded automatically. It is when
using an explicit else clause.
Change-Id: Ic0584aafc72f70badcf5285ab635f9d99eac161a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
On INTEGRITY, the header does not exist and is not needed for compilation.
Change-Id: I7e473c30d23f213a31fc39ad4ef86c06db299f16
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Repeatedly calling QVector::erase(it) (via QMutableVectorIterator::remove())
results in quadratic runtime.
Use std::stable_partition, which does exactly what the old code tried to do,
except in linear time.
Change-Id: I6e5911ee781071bbb84d72449c969e3b9907da51
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The capacity of 'result' is reserved, but QVector::clear() always
deallocates. Fix by using resize(int) instead, which at least
preserves capacity when it has been reserve()d.
Change-Id: I198d532661f4f767588c4ce244c2454eb8823e54
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Repeatedly calling QList::erase(it) (via QMutableListIterator::remove())
results in quadratic runtime.
Use std::remove_if, which does exactly what the old code tried to do,
except in linear time.
Change-Id: I682e5e05f04953ae1c8788e5d66335241de39fee
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Repeatedly calling QVector::erase(it) (via QMutableVectorIterator::remove())
results in quadratic runtime.
Separate the removal of expired objects from the sending of the event to
the remaining objects, so we can use QVector::removeAll() for the former,
which does exactly what the old code tried to do, except in linear time.
Use range-for for the sending-loop. This could cause detaches, but since
we modify the container two lines before, and we don't copy it anymore,
anywhere, detaches are impossible.
Change-Id: I9aa6427e3646c8ad92b673fe42a86a0dfe79ee80
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
- Remove Qt::WindowContextHelpButtonHint.
- Make the server label interactive (enable copy).
- Introduce new connection syntax.
- Remove unneeded member variables.
- Use constructor initialization where appropriate.
- Adapt the layout to fullscreen platforms by wrapping it
into a QGroupBox.
Change-Id: I6e397ad082f22ba1e99fc5a17440b2be1f9584f6
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
Introduce QVERIFY2() to get some information when exactly it fails.
Change-Id: Icaddf2ecae434d0bafc90c18458c5ee067dfd506
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Environment variable storage implementations on Windows Runtime and CE are
very similar. For better maintainability have just one implementation.
Change-Id: I12ec38f7bde3fcc0bcc56face88d5f19cf3b3504
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
This reverts commit d0f57439d0.
This commit had introduced a wrong statement about the sorting.
Change-Id: I2f6ea6f7cfb318bca7bd44c686956ba135b65b20
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
Previously, lists containing one empty string were returned for the
unimplemented functions.
Change-Id: Ia64b53325420e32076f2bacf22c48885d7121df0
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
QAbstractItemModel::rowCount() is a potentially expensive
operation, so cache its value whereever possible.
Change-Id: Ib2829b20a0fedcbf091a535945b88db323b53fbe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
KMS and backends using the default logicalDpi() implementation
(EGLDevice for instance) did not correctly check if the physical width
and height are greater than zero. The result is a NaN dpi on systems
where the drivers report a zero size. This in turn breaks font
rendering and various other things.
isValid() is changed to !isEmpty(). This way we check for width and
height > 0 instead of >= 0.
Change-Id: I8cdcf93a116379ae33c65599ad792a3b712518a3
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
Due to kerning and other OpenType features, it's possible
that the advances from the shaping process are fractional, but
this gives uneven glyph positioning for font engines that don't
support subpixel positioning (since the glyph will not match the
expected position, some gaps will look too large and some
too small). To match how e.g. GDI renders this, we round the
advances before setting the glyph positions for engines that
do not support subpixel positions.
[ChangeLog][Windows] Fixed uneven kerning for some fonts.
Task-number: QTBUG-48546
Change-Id: Ic00dc402abf7149aab6bf9b05b42827b805c1a15
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Symmetric text rendering seems to be the equivalent to no hinting
at all since it does subpixel antialiasing in both horizontal and vertical
directions. Let people select non-symmetric, natural rendering as well,
by setting vertical hinting on the font. This is the mode used for many
UI elements in newer versions of Windows (like the title bar of windows
etc.)
[ChangeLog][Windows] Added differentiation between vertical hinting and
no hinting in DirectWrite font engine.
Task-number: QTBUG-48546
Change-Id: I2f75ae2d16fdf26706587d92da43daf29afbbcf2
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
When a fallback font is selected, we need to copy out the
properties from the main font which can be synthesized
by the font engine. In particular, this is weight > normal,
and oblique style.
This is the DirectWrite equivalent of
a856c4a902.
Change-Id: I5d1215c66a433c8a8029c06e7a3dcee287f3f76f
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This is convenient when we you want to check which permissions the
application has been granted at run-time. On Android device running
Android 6.0 or newer the permissions might be changed by the user,
so there are cases where this will be needed to determine what
APIs are available. On older devices or if the application is built
for an older SDK version, the old behavior is used, that is, the
permissions from the manifest is the permissions the application has.
Change-Id: I17ad588b35b26dd7ab26fa4b749764c1602c6854
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>