It was obsoleted for quite a while already and we forgot to get rid
of it the last time.
Change-Id: Ib15e71829e80648aa667a6b0af31698460b99cc1
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Instead of creating a QList with the keys with one of two statically
known sizes, stream the contents itself. Apart from QDataStream,
this no longer allocates any memory.
Change-Id: I5ed814b186dcaf8cc7dedcc520928aefab01f009
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QImage is larger than a void*, so holding them in a QList is needlessly
inefficient. Worse, the code could come to depend on the fragile property
of (inefficient) QLists that references to elements therein never are
invalidated.
Change-Id: I153995d691692f7317cab31b95a00d679f31c0af
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
QPixmap is larger than a void*, so holding them in a QList is needlessly
inefficient. Worse, the code could come to depend on the fragile property
of (inefficient) QLists that references to elements therein never are
invalidated.
Change-Id: I82bb9a88e7030e566f39421cd78babcf01bce285
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
... even if they are not (currently) held in Qt containers
(though FileInfo is).
Change-Id: Id14d4af89fed8bcefdbb9b28d11c1c43fccf7190
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
QPainterPath isn't marked movable , so holding them in a QList is needlessly
inefficient. Worse, the code could come to depend on the fragile property
of (inefficient) QLists that references to elements therein never are
invalidated.
Change-Id: Id4dae8037401c52fd57a2274e45399a9b70beb69
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This reverts commit a6000e2b66.
Temporarily remove this to unblock the qtdeclarative dev CI.
While Windows 8 VMs are fixed by this patch, Windows 7 has different
problems.
Change-Id: I45ef064ed953cc4b7bbf19657300d4fc43d82452
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Mesa provides GL ES 3.0 so using GL_RED in place of GL_ALPHA should work.
This is apparently not the case.
Task-number: QTBUG-46605
Change-Id: I4f661487b47e9cc11f5de110196ec37150c99c7f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
The PNG image plugin has the capability of applying gamma correction
to read PNGs, but doesn't do so by default, and we export no way of
accessing this through the qimagereader API.
This patch adds the ability to read the PNG file gamma, and overriding
decoded gamma to get gamma correction.
Change-Id: Iaf9eaac0827516db6bc02247c58026270cd1f610
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
QImage is larger than a void*, so holding them in a QList is needlessly
inefficient.
Use QVector instead.
Change-Id: Ifcc9eca18a87e29327586506e3a3bb7874c8b3a7
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
QPointer is larger than a void*, so holding them in a QList is needlessly
inefficient. Worse, the code could come to depend on the fragile property
of (inefficient) QLists that references to elements therein never are
invalidated.
Change-Id: I104d11cc530c9c1579e82bf4e28e3353c00b34b4
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
QImage is larger than a void*, so holding them in a QList is needlessly
inefficient.
In this case, the maximum size of the container is a small compile-time
constant, so the best container to hold those QImages is a C array, even
though it will default-construct all 12 QImages before even starting the
loop, since the QImage constructor does not allocate memory.
Change-Id: I83ca65aa1ca51c400ca696202d24cfaeab505a5b
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
ad9698713f reduced the curvethreshold
for wide lines, to fix QTBUG-46151. But as a side effect, the
threshold was increased for lines of widths >=0 and <4. This commit
fixes that, and also adds a lance test for the issue in QTBUG-46151.
Change-Id: I52507db622435fe1d2646640cb0bd9cd8222e453
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Virtually all of these types are too large to fit into a QList.
Change-Id: If55496ef3fb26d6531e9ef1bb1558887d9077a3b
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Looping over QList::contains() constitutes O(N²) behavior,
the more so as this QList is horribly inefficient since
WritingSystem is not a Q_MOVABLE_TYPE.
Since the range of possible unique values in the result
is severly limited (by virtue of being enumerated values),
use a bitmask to remember which WritingSystems were
encountered, then, after releaseing the mutex again, use
that bitmask to populate the QList.
Change-Id: I1d12eb487513ec17faa6f38942f8b681819dc0e8
Reviewed-by: Adam Majer <adamm@zombino.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
By adding support for the driver description, we can detect if
we are in VMware. In this case D3D9 and 11 get disabled, so only
the software-based options are in use.
This allows running autotests like tst_qopengl, tst_qopenglwidget,
tst_qgl, etc. in the Qt CI system. There OpenGL 2.x is not available,
so ANGLE is the only option. D3D11 is not an option, so it picks D3D9
by default. However, this results in mystic failures. The stable solution
seems to be to use WARP. This can be achieved by setting disable_d3d9 in
the built-in GPU blacklist.
Change-Id: I937c4b3fa82fc1a2d524b4eb712732722df2070c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
The default constructor already sets the d-pointer to nullptr,
so the move constructor does not introduce a new state.
Change-Id: Icd47952bdf76d2106992d6babea40d68f18d067e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Unused by tst_qpixmapcache.cpp and everything else, and
uses an inefficient QList, so remove.
Change-Id: Ia410ed19db9bb3db97460b21bc2fd9d53c95a73d
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Currently all icon resolving is passed thru to the platform icon engine,
even in the case where the application developer has set their own
requested icon theme. In that case, the application developer
specifically does not want to follow the icon theme of the system, so
don't ask the platform, but rely on Qt code instead.
It leads to bugs reported to platform icon theme providers like this:
MMC: https://github.com/MultiMC/MultiMC5/issues/796
KDE: https://bugs.kde.org/show_bug.cgi?id=344469
Thanks to the multimc people (Jan Dalheimer and Peterix) for the
reports and testcases.
Change-Id: I52cda6f688b2ef9e44e060c8ae67831cb02b26c8
Reviewed-by: Eike Hein <hein@kde.org>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This reverts commit 21e6c7ae47
because in QtQuick.Controls, we do not call exec(): we just set the
dialog visible. If it is a sheet, then it is already acting as a
modal dialog, basically.
Task-number: QTBUG-46691
Change-Id: I7fe89f2a2ade0d4ddcf540c9bfc4f5963a077471
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
In case of QT_NO_LIBRARY there are no plugins after all.
Change-Id: Iad891d0cf0edf9e4418a4fe4ac49cf6497ceeb79
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Setting the version breaks on Android as it has no .so versions, leading
to aborting apps on devices that support GLES 3.x.
Change-Id: Id4381e08a2615a0898def8f075ce5a5c5b9c7a7d
Reviewed-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
When a font style-name is not directly available from the font we
need to generate it with the data we have, so we should include all
the new supported weights.
Change-Id: I45cc0114f8c76f45bc7a639f9d0d8096a064bc51
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: René J.V. Bertin <rjvbertin@gmail.com>
Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
Use a QStringRef instead of a QString.
Change-Id: I63bf9775606b071cd9614306375e1316dada9f61
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This prevents compiler warnings on less common branches of certain
ifdefs.
Change-Id: I89bae68491151b21cf6887a854cc4c9f68838cf9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Avoids the copying of the contents when returning devices().
Remove an unneeded #include (already includes by public
header; unneeded there, too, but leaving for SC purposes).
Change-Id: Ifa9a3dc2c7fada01fb624527dd4d16d0cb32a658
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
QPainter::clipRegion() is expensive especially for certain clip paths.
QPainter::clipBoundingRect() does not promise to return an exact (tight)
bound but delivers the desired result quickly. In addition, this avoids
discretization.
Change-Id: Ib35406edc12fb8206ca978bc140a7c5e21279ca2
Task-number: QTBUG-46578
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Previously, QStandardItem::operator<() returned true when both
items had invalid data. With MSVC in debug mode (checked
iterators/STL), this triggered an assert in
tst_QStandardItem::sortChildren() since that verifies
that !(b < a) when a < b:
Debug Assertion Failed!
Line: 3006
Expression: invalid operator<
Introduce a stable sort order for invalid items such that
other items are always less than invalid items and comparing
invalid items returns false (indicating equivalence).
Change-Id: Ica0f0d9f001c86973b1941dbcc1faf282e4c47df
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Don't return a const QString &, return the QString by value. This
is still broken for some of the older methods, but let's not add
to it.
Change-Id: Ic5cabb1b89eda0fcf678dbe175963e03109e5c2c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Removes the feature of scaling only a clipped area of the input
which was unused and only made the code harder to read and
maintain.
Change-Id: I296a804a5bd083016fbc47543e00eb586b530d71
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Make sure GLESv2 library to be loaded even when the symlink of .so is
not installed.
Change-Id: Ie7c810a137cebc7fa59612830e3643861b532fdb
Reviewed-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Change a21dfab54e de-inlined its
destructor, so, the class needs to be exported.
Change-Id: I32d21622a944a93718f549060e5e5f7e71fd2646
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
This qdoc command is deprecated.
Task-number: QTBUG-46476
Change-Id: Iee36f91bdcf500c2e88022a5f8a9c3accc6048c2
Reviewed-by: Martin Smith <martin.smith@digia.com>
Since we added font matching by style name, the style name is not just
a derived property and should not be ignored in comparisons.
The QFontDef::exactMatch comparison is left unchanged, since it tests
if a loaded font matches a requested one.
Task-number: QTBUG-30851
Change-Id: I4187c5b993815001f35bcf24dc449059bfdcba6f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
The difference between rectangle and boundingRect was not quite clear.
This patch adds a snippet with a corresponding image, in order to
illustrate the difference.
Change-Id: Icb1fe737788cc93f1c5baa16bc0e04b8ec728f3a
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
By making the destructor (usually the first non-inline, non-pure,
virtual function, and therefore the trigger for most compilers to
emit the vtable and type_info structures for the class in that TU)
out-of-line, vtables and, more importantly, type_info strucures for
the class are pinned to a single TU. This prevents false negative
dynamic_cast and catch evaluation.
In this third batch, we de-inline dtors of exported public classes
from the QAccessible subsytem.
Since they are already exported, users of these classes are unaffected
by the change, but since it's public API, and the dtors may have been
de-virtualized and inlined into application code, we need to avoid
adding code to the out-of-line dtor until Qt 6.
Change-Id: I5324bd1b3b9210a3ac5cf4eee9317a34e4a3b048
Reported-by: Volker Krause <volker.krause@kdab.com>
Task-number: QTBUG-45582
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Adjust doc text to what's used elsewhere in QAccessible.
Change-Id: I8bd194e55374b8258361ae254817a4298c4fa3dc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
By making the destructor (usually the first non-inline, non-pure,
virtual function, and therefore the trigger for most compilers to
emit the vtable and type_info structures for the class in that TU)
out-of-line, vtables and, more importantly, type_info structures for
the class are pinned to a single TU. This prevents false negative
dynamic_cast and catch evaluation.
In this second and last batch, we de-inline destructors of exported
public classes.
Since they are already exported, users of these classes are unaffected
by the change, but since it's public API, and the dtors may have been
de-virtualized and inlined into application code, we need to avoid
adding code to the out-of-line destructor until Qt 6.
Change-Id: Ieda9553cb4b0dae7217c37cc7cde321dd7302122
Reported-by: Volker Krause <volker.krause@kdab.com>
Task-number: QTBUG-45582
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
By making the destructor (usually the first non-inline, non-pure,
virtual function, and therefore the trigger for most compilers to
emit the vtable and type_info structures for the class in that TU)
out-of-line, vtables and, more importantly, type_info structures for
the class are pinned to a single TU. This prevents false negative
dynamic_cast and catch evaluation.
In this first batch, we de-inline destructors of exported private
classes.
Since they are already exported, users of these classes are unaffected
by the change, and since it's private API, we don't need to avoid
adding code to the out-of-line destructor until Qt 6.
Change-Id: I450707877d2cb6a77f79ae1dd355facb98d6c517
Reported-by: Volker Krause <volker.krause@kdab.com>
Task-number: QTBUG-45582
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
De-duplicates vtables and enables RTTI on this class
hierarchy.
Export, as QOpenGLStaticTextUserData (QtOpenGL) inherits it.
Change-Id: I0662870538c35f23baf6bde4594ec8b9055efae7
Reported-by: Volker Krause <volker.krause@kdab.com>
Task-number: QTBUG-45582
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
When a premultiplied alpha changes value because it is rounded to fewer
bits the premultiplied colors may need to be recalculated with the new
value. Otherwise the color will both be wrong and potentially invalid.
Change-Id: I9ec74a22aac73cd7ffab04e180cf2bf35bb4c315
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
It should also be possible to use QT_STRICT_ITERATORS in Qt's own code base
Change-Id: I0914db480d4d2b06e71e3a2588163efdd3ff6d27
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Calling QCursor::setPos() to emulate mouse move events
is a rather bad idea, as it creates round trips through
the server, leading to timing issues etc.
In addition, we should not call qapp->notify(), but rather
route the events through the proper QPA interface. This
is required to properly generate all other events such
as enter/leave etc. As this breaks existing tests,
put the new behavior behind an #ifdef for now. Like this,
we can fix tests one by one, and then turn on the define by
default for 5.6 (with a changelog message).
We emulate timestamps to avoid creating double clicks
by mistake. In addition, fix QGuiApplication::processMouseEvent
to not push events back into the QPA event queue (as this is
a bad hack and breaks the new testing system).
Change-Id: I71774cb56674d7fb66b9a7cf1e1ada1629536408
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Corrects a few white-spaces, return statements and else statements
to fit Qt coding style.
Comment updated to indicate how far the code is getting from its
original roots.
No semantic changes.
Change-Id: Ia2288c501788a291bfc4e8b70e8eb1efb7a90128
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The methods are called hslHue and hslSaturation. This was leading
to dead links.
Change-Id: I0997c415958aae9a66fb037d98f8ad3d43b38231
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
It's not a real dependency as all we need is to store a pointer,
but better not to use the name QWidget at all.
Change-Id: I30ef1dd44ac7e42c1b9c84675f94088b8c516076
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Introduce support for the widgets' clipRect(). Right now render-to-texture widgets
in scroll areas placed close to each other result in broken (non-existent) clipping.
Similarly, stack-on-top widgets fail to clip when placed inside a scroll area.
This is now corrected and the qopenglwidget example is enhanced to utilize a scroll
area.
Task-number: QTBUG-45860
Change-Id: I859a63d61a50d64ba9e87244f83c5969dce12337
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
De-duplicates vtables and enables RTTI on this class
hierarchy.
Export, as QPlainTextDocumentLayoutPrivate (QtWidgets)
inherits it.
Change-Id: I8aee43b43898a72430d8bc1247ea76c7d4e9031d
Reported-by: Volker Krause <volker.krause@kdab.com>
Task-number: QTBUG-45582
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Change-Id: Ia825ef6d932fbd45ceaf8c54a3207f207fa40994
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
QTextLayout::additionalFormats setters and getters using QList<FormatRange> have
been deprecated; port to the QVector versions.
Moved op== definition for FormatRange needed in tst_qsyntaxhighlighter.cpp
to a friend declaration in FormatRange itself, because MSVC 2008 doesn't find
it otherwise.
Change-Id: Ibab6589df057f02377d895079b56395859e3401e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
The range sampling operates the same in both directions just with
different step-sizes, so the code can be unduplicated,
Change-Id: I47805a7e925d4058f62c558ef08e79485915e937
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
The global variable is a left over from when there was an MMX assembler
implementation, and is now just making the compiler's job harder.
Change-Id: I686704b64a2f8c68ec8ca83f2ac3e465ded773e0
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The QTextLayout::FormatRange is larger than void* and thus should not be held in
QList. Use a QVector instead.
Other parts of Qt already hold FormatRanges in QVectors, so this also makes
handling FormatRanges more consistent.
To avoid ugly names for the getter which doesn't overload on return type alone),
rename the set of function to format (from additionalFormats).
[ChangeLog][QtGui][QTextLayout] Added QVector-based alternatives setFormat(),
format(), and clearFormat() to setAdditionalFormats(), additionalFormats(),
and clearAdditionalFormats(), resp.
Change-Id: Ie04a561b43c91c3b2befb3cac2981821f84d5f77
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
This involves deinlining some private class stuff to keep things
readable and maintainable.
Task-number: QTBUG-46002
Change-Id: Ie2888aa6c16a6f5182b61fbaa43288cfcc96cbc4
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
The connection to the deviceListChanged() signal may be queued. To make it
work our custom types have to be registered.
The problem is only visible with input backends like evdevtouch that live
on their own thread.
Task-number: QTBUG-46069
Change-Id: I4c03e8031e4337b5e711a3bd2cf405d15d6ce214
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
The destructor is the first virtual method. By not defining it
out-of-line, we provoke multiple copies of vtables, not all of
which can be merged by the linker. If the linker fails, RTTI
such as dynamic_cast and catch-blocks involving the type will
not work.
Additionally, QFontEngineGlyphCache was not exported, and
therefore also not its vtable, making it impossible for
users outside of QtGui to get a unique RTTI for the class.
Change-Id: Ib265945934216bb609629431eb4c71996d4fd39d
Reported-by: Volker Krause <volker.krause@kdab.com>
Task-number: QTBUG-45582
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Key sequences can be compared for equality,
so qHash should be overloaded, too.
[ChangeLog][QtGui][QKeySequence] Added qHash(QKeySequence).
Change-Id: I3cf896292459897d66198d96dfcdba1a39bdafce
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Directly process events delivered from testlib in QGuiApplication. The
old code put these events into the QPA event queue leading to race
conditions with plugins delivering native events from a secondary
thread.
Change-Id: I5646b1014f681593d487c9d1e65053ba06206411
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Currently curveThreshold is relative to pen width, this allows wide
pen to be increasingly off target.
This patch adjust the curveThreshold relative to stroke width, thereby
ensuring wide pens stays on the curve.
Task-number: QTBUG-46151
Change-Id: Ifd4371aa2853331d02e3c6f6565c243eb1b7ed2e
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Make it possible to stream the enumerations to a debug stream.#
Change-Id: I0add2dcd835333a8d6cebf779252f22c1418faf3
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
We should not configure the decoder when just determining the image-
format. Doing so can cause all versions of libpng to print a warning,
and some versions to fail to decode.
The code appears to be a leftover from when the image-format logic was
copied out of the introduction of the decoding method, where the proper
settings are still applied.
Task-number: QTBUG-46233
Change-Id: I6619728804f040ae6c9d637c7298a8586e22499e
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
QMenuPrivate::init() calls QPlatformTheme::createPlatformMenu() to
create a platform menu, but on Linux, that returns null for now.
QSystemTrayIcon::setContextMenu() results in recursive calls to
QSystemTrayIconPrivate::addPlatformMenu() which then calls
QDBusTrayIcon::createMenu() for the context menu and each submenu.
However if a submenu is added afterwards, a corresponding platform
menu is not immediately created. Now copyActionToPlatformItem()
will detect and create the missing platform submenu, by calling
a new method: DBusPlatformMenu::createSubMenu(). This is because
there is no way of knowing that it's a tray-specific context menu
(which is so far the only case in which we use DBusPlatformMenu).
So, QPlatformMenu::createSubMenu() needs to exist as a new
QPA interface for this use case.
Task-number: QTBUG-45803
Change-Id: Ib319e873082196515ea0580d70d069099cf2c175
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Add the option to load the testability library based on whether
an environment variable QT_LOAD_TESTABILITY is set, in addition
to the current "-testability" flag.
This improves the use of testability library together with the
autopilot functional testing tool.
Task-number: QTBUG-32974
Change-Id: I6abf2c004cbff2ce0aff44e24a99bcc8188a52ae
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
A style name 'Extra Thin' or 'Thin Italic' should be parsed as Thin
font weight.
Change-Id: I8acebed7330c23231b3742d887081d8b3d0aeb19
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Append a version number to QPlatformInputContextFactoryInterface_iid
as is done for QPlatformIntegrationFactoryInterface. Start with 5.1 since
c91c05b056 changes the API in 5.4.
Use macro in plugins.
Task-number: QTBUG-46009
Change-Id: I1d1a89bde50d263354f33a6917efb1c084211842
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Increase version 5.2->5.3 in macro
QPlatformIntegrationFactoryInterface_iid and use that in the plugins.
Task-number: QTBUG-46009
Change-Id: I491ab0ac169ede5c103b40e1bcbcbf511922a911
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Previously, for Qt::WindowModal dialogs we were creating modal sheet with beginSheetModalForWindow:
and later (from exec) calling -runModal, essentially making a window modal dialog into (now) application
modal sheet, which is not right- it's centered relative to desktop and the jump from window modal sheet's
position (centered relative to a window) to application modal was quite visible.
Now, instead of [panel runModal] (== [NSApp runModalForWindow:panel])
we call [NSApp runModalForWindow:theRequiredWindow].
Change-Id: I793dc72c7d1fe96497bb35754f4d0eac9a5e00e5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Swap subexpressions around so the expressions involving w
(the first member in memory order) execute first.
And no, compilers don't do that automatically. Well, GCC 4.9 doesn't.
Change-Id: I918ecc27a9ac9775fa91968c0548d182d7ad28e3
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
The cached list didn't take fontStyle, styleHint and script into account.
As long as QFontCache isn't explicitly disabled, loadEngine() rarely
called for the same family, foundry, style and size - so avoid caching
anything here at all.
Change-Id: I7779bf33fc074edc00799f9a39d67327f8c88ccc
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
QFontDatabase::load() is the only caller that passes non-null
QFontPrivate* to QFontDatabase::findFont(), to adjust the pointSize
with regards to the font's dpi; do that right in QFontDatabase::load().
The `multi` param's meaning is, in fact, an absence of the
QFont::NoFontMerging flag,
so prefer the latter and prevent ambiguity in the future.
Change-Id: Icc7751044e454ca438e7627364faa415287bf1ae
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
The logic this code was aimed for has been covered by a more complete
solution in QFontDatabase::load() years ago; simply drop the dead code.
Change-Id: Id8860353ff4f4d2f1529aa89810d6c5725e97d24
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Simplify the code by passing the source of a mouse event
directly to the constructor instead of setting it by
QGuiApplicationPrivate::setMouseEventSource().
Change-Id: I1774cf39a211d36d3adf0ff30f3bd2fb7c5fb429
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Make it possible to read images with EXIF orientation automatically
applied. This was originally implemented without opt-out in Qt 5.4, but
reverted. Here it is implemented as opt-in for JPEG, and opt-out for TIFF
to keep behavioral consistency.
The EXIF support for JPEG was written by Rainer Keller.
[ChangeLog][QtGui][Image plugins] An option has been added to
QImageReader to enable automatic application of EXIF orientation.
This behavior was default in Qt 5.4.1, but reverted in Qt 5.4.2.
Task-number: QTBUG-37946
Task-number: QTBUG-43563
Task-number: QTBUG-45552
Task-number: QTBUG-45865
Change-Id: Iaafd2519b63ede66ecc1f8aa4c7118081312b8f5
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
The UNDER_NT define is useless as the include
already happens before in qfunctions...
Change-Id: I25fc23e169ce91d787331a7a86023aa7b424d687
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Targeting a non-primary screen with a QOpenGLWindow requires (at least
with GLX) that the context is created with the same screen. Otherwise
the context cannot be used with the window (BadMatch due to different
X screens)
Change-Id: I64f38ad7317d39a164bb69bb1430692319fc49d4
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
This change introduces the class QWindowSystemEventHandler
which can be used to hook into QWindowSystemInterfacePrivate to
filter and dispatch window system events.
One use case is to intercept key events from the underlying system
in QtCompositor and feed them into the xkbcommon state, and to modify
the events based on the resulting state.
Change-Id: I829eb7d960420135990fb0f6db54c14eea3e8e48
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
The Nexus 6 device reports a GL_VERSION which is strictly not conformant
to what is expected from GL_VERSION, so a check is added for this case so
that it correctly detects the right OpenGL ES version.
Change-Id: I00297dd7c1e505dd7f9ab8a7fa480f514162b488
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Contrary to the comment, MSVC does support INFINITY, but
always prints a warning when it's used:
qpainterpath.cpp(3066) : warning C4756: overflow in constant arithmetic
Avoid this by using numeric_limits<T>::infinity.
Change-Id: Ie925b036b807378da5298a275fa108347c24519e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
In addition to BLACKLIST, Qt will now look for GPU_BLACKLIST too.
Test cases that are specified as disabled in the GPU blacklist
will be skipped. This is particularly relevant when running tests
on Embedded Linux devices.
For example, the following JSON would configure the test case
glxContextWrap to be skipped on drivers where GL_VENDOR contains
UnstableDriverVendor:
{
"entries": [ {
"gl_vendor": "UnstableDriverVendor",
"features": [ "disable_glxContextWrap" ]
} ]
}
In contrast to the regular blacklist, GPU-blacklisted test cases are
not run at all. This is because driver problems and instabilities
often lead to crashes.
Change-Id: I340cf5c0261a206109b78409774408981bba5c68
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
and deprecate isTristate()/setTristate() which isn't specific enough.
This matches the changes to the flags themselves.
Change-Id: I0ba592af340cb81fc9f4d483569844fe8d7510c3
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
This makes the behavior much more clear. You can get a tristate checkbox
just by setting the CheckStateRole to PartiallyChecked, no tristate flag needed.
The flag, on the other hand, enables the automatic-tristate behavior in
QTreeViews (and only there), hence the new name for it.
Change-Id: I18d292a8b8294c863eab806f3874d15dfb72556c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Necessary for iOS. In addition to swizzle we also need to communicate the need
for flipping, so switch to flags instead of bools.
Task-number: QTBUG-40034
Change-Id: I055e591afd838878503be6f5f69aa7347965d9cf
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
On touch platforms, QCursor::pos() will only be 'valid' when a
touch event has (at least once) been translated to a mouse event.
Currently this never happens in QtQuick since QtQuick always
accepts all touch events and performs its own translations.
So rather than setting the geometry of QShapedPixmapWindow from
QCursor directly, we instead base it on mouse events. This will
ensure that we never try to set the geometry of the window to
an 'invalid' value, which can cause a crash on platforms like iOS.
Note that we currenly miss an API in Qt to get the current
touch points. When that is in place, we can also set
a correct start position for the window before the
first mouse move event arrives.
Task-number: QTBUG-45877
Change-Id: I320598e87d43f6e9e087c204a69b95465128f468
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Inform the platform that it should not activate the window
when shown by setting Qt::WindowDoesNotAcceptFocus. This compliments
the already set Qt::WindowTransparentForInput, which specifies
that mouse/touch events should also pass through the window. In
other words, the window is just for showing output and should not
respond to input.
Change-Id: I3e90a28be2f2e27e2044effedf64f47c94a857a5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
The change would remove the noexception hint on MSVC versions that
doesn't support noexcept but supports their older 'throw()' hint.
Change-Id: Ie5163f2413522f427279f59c8562c0ce4769bc82
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Moves some of them to the .rodata section, the rest at least to
.data.rel.ro[.local].
Change-Id: I85676ddf22b0c0097f3f0dce4c3dc018dc29d045
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
...by dropping the use of qIsNull(), which, in Qt 4, distinguished
between -0.0f and +0.0f.
But mathematically, whether x, y, z are ±0 doesn't change the fact
that the result is the identity element (x, y, z should contain the
identity element for addition and w the one for multiplication), or
the null element (additive identity).
So using qIsNull() was wrong even in Qt 4. In Qt 5, qIsNull() returns
true for both ±0, so we can just as well compare to 0.0f instead,
which allows to mark these functions constexpr (qIsNull() can't be).
Do so.
Change-Id: I78b1fa7890036dd3cb4de7f90b75d439f9835e73
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Add the noexcept attribute to all move constructors and assignment
operators in QtGui that didn't already have it.
Change-Id: Idcdf79ae8349b8793e7394b5ae7c08e6111fbc9a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
It's undefined behavior to left or right-shift a signed integer such
that the sign changes. Since SymbolCsbBit is 31, make sure we use
unsigned numbers.
Found by ICC
qplatformfontdatabase.cpp(614): error #68: integer conversion resulted in a change of sign
Change-Id: Idf715b895bac4d56b4afffff13da78d294b1248e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This one has not been unsed for ages (since Qt3?).
Change-Id: Iaf514db1b698b34a303f34c150b72db989eb176c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Many times set but never used.
Change-Id: I297f21d4b9878e5f9559a2dfdb2d3de34107bb7d
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
1. Checking if `db->count == 0` inside the
`for (int x = 0; x < db->count; ++x)` loop makes absolutely no sense;
2. The family gets loaded just a line above (ensurePopulated()).
Change-Id: I72dbd42565c4f5a5d9ff8879f10ee0ece7298fa7
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
When resolve_mask is 0, the font inherits just everything, and there is
no need in checking for any resolved attributes;
the resolved font always inherits dpi, so do not check it either.
Change-Id: Ie5d7ced0859d46a9237447e29051a22569480a51
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Completes the inplace converters so that we can rely on inplace
conversions to succede as long as the image depth is the same.
Change-Id: Ia1ae34b5de1bc16e87ff5403bdacfcae44a22791
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Some inplace conversions would not set the requested image format in
the returned image, due to the same conversion being used for several
destination formats.
This patch ensures all inplace conversions return the right format,
and adds testing infrastructure to easily test iterate over all formats
so that they all can be tested.
Change-Id: I68ab17a713ddb2aa8ed6aaf0a0a1ec8bbcb56090
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
The one converters from RGB30 was misplaced in the method table, and
the unpremultiplication from A2RGB30 to RGB30 had an underflow mistake
when alpha was 2.
Change-Id: I92c11ede28611a3dbdce72aca1898845c120c209
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Due to a behavior change.
This reverts commit 9157087334.
This reverts commit 16c32c6dfb.
Task-number: QTBUG-37946
Task-number: QTBUG-45552
Task-number: QTBUG-43563
Change-Id: Idf8df7d8f22465e8f6b51acb68993ac97208b184
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
There is no reason to use the more expensive ARGB32 conversions when
there is no alpha channel involved.
Change-Id: Ifcb325352b8c806ef755db385121a2939c5825b2
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Some QImage methods were not preserving image metadata, or only
preserving some of it. This adds the missing parts and adds a test for
metadata.
Change-Id: Ib5892a23e49dfde5ea26074d3deaa887fa930c6b
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
...and port to the remaining one.
Can't do the same for QMatrix4x4, because that class is exported.
Change-Id: I5448921af9e9194532be1b9f8d739b5c418a5e0b
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
The compiler-generated one is just fine.
Change-Id: Iaacc56d4224c69b66823cc64640a00117c44d3cc
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Even with SSE4 optimized unpremultiply it is still significantly faster
to skip the calculation on alpha values 0 and 255.
Change-Id: Iafe658fea8eacf35a857f292952b0c1ee056139c
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
"WindowsSystem" -> "WindowSystem".
Strictly a QPA API break; there are no users of the
function in QtBase.
Change-Id: If2151b57587c68a7b5cbf261c54634aa930f2792
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
The QImage inplace mirroring method, failed to handle the middle line
when mirroring both ways (rotate 180). In both other mirroring cases
the middle can be left untouched, but in this case it needs to be
mirrored half way.
To make the logic simpler, double mirroring will now mirror half the
lines instead of half of every line.
Change-Id: Iaa1f1e1c3f7dedfb78891fc93207f6d0c64bcafe
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Could causedSSE4 instructions to be used on non SSE4 machines
in cases when qUnpremultiplywas not inlined.
This reverts commit 964ccc5853.
Change-Id: Ic676ade8f75129e8d37c4d96cbfb2bdb5b794919
Task-number: QTBUG-45741
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
At least clang is unhappy with them when -Wnested-anon-types is enabled.
Change-Id: Ia9869fecb836b27be69f7b9715fd614f384bb912
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Document that fact that for non-create()'ed windows this is the
same as QGuiApplication::devicePixelRatio() which is the highest
dpr in the system. This has consequences when running with multiple
displays so application developer's have to be aware of this.
Change-Id: Ic05a18732ff021659da04428cb49421ac3453870
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
QMatrix and QTransform can be compared for equality,
so qHash should be overloaded, too.
[ChangeLog][QtCore][QMatrix] Added qHash(QMatrix).
[ChangeLog][QtCore][QTransform] Added qHash(QTransform).
Change-Id: I1ce925ebe258c9d7e35b68e5ac5c3373f1460c58
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
To avoid source-incompatibilites, wrap in QT_DEPRECATED_SINCE(5, 5)
in public headers.
Change-Id: I6117e8a6b11200d2f1a0a94a0e87d5c27538218e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
To avoid source-incompatibilites, wrap in QT_DEPRECATED_SINCE(5, 5)
in public headers.
Change-Id: Ic3398f4f330e15a3b55065858add26b90fd70e6c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
In order to obey a palette set globally on QApplication, an application
attribute for checking if it's set at all is added.
Task-number: QTBUG-39800
Change-Id: I26b965e6e18e0e1ca4df03cf343b3527df3636b2
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Merges the SSE4 specific unpremultiply with the normal version, and
adds a SSE2 fallback. There was no reason to split the two since
compile time options will ensure the right version is inlined.
Also adds short-cut for 0 and 255 values.
Change-Id: Ie5aa262f6964219fd3062d4a498f697cf79a4595
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This will be essential on Linux, especially Embedded where PCI IDs are
not that useful.
Change-Id: I2fa8ca07236e8aae203e21fe629d12aab092c7fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
As per spec, both for OpenGL and OpenGL ES. No wrap mode is
applied unless setWrapMode() is called so the default values
should be initialized to match OpenGL's default.
Correct the copy-paste mistake in the warning messages.
Change-Id: I094cc511dc7de4a214da61faadb1fc362270b2d4
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Also changes the way the SSE2 composition modes are inserted into the table,
so it is handled like all the other tables and doesn't require duplicating most
of the table.
Change-Id: I8de383caece0367bc7466d7a1b145aa820c3bd6a
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reading directly from an array instead of calling a function pointer
is much faster.
Change-Id: I833b33448bad064d6f38d2f9ff44138d90206822
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Adds the last two missing source types to rgb64 rendering.
Conical and radial gradients. At the same time linear
gradients are moved to a template form to increase code
sharing.
Change-Id: I30fdd0837b0da03e3447683856ebbe4d7f48df6c
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Cleaning up smoothscale code. Upscaling is improved using existing
optimized interpolation methods, and downscale is given SSE4.1
optimized versions.
Change-Id: I7cdc256c26850948aef7dae26fda1622be6b8179
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
In compare to QTextEngine::atSpace(), this also handles the less-common
"white spaces" and the exceptional control codes.
Change-Id: I52878932926b7f9fe36c9dd01007963b9691fbf0
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
This is similar to how widgets work. On platforms like OS X this
becomes essential since in non-exposed state SwapBuffers does not block
so continuing to update continuously leads to undesirable effects.
Task-number: QTBUG-45524
Change-Id: I80f4c00b218561b9e62c3cad1e66f61f4debd4af
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
A previous commit added 16-bit per color-channel precision to
solids and linear gradients. This patch extends that to include
texture data.
To support that pixellayouts now have a method to convert to
RGBA64.
Change-Id: I661ae91bd7038085787003608a0af4add057e478
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Some tests were failing because the color was not read correctly from
a QImage. To make it possibly to read more accurate colors a pixel
accessor returing QColor has been added.
Some tests also had the wrong order of arguments, confusing dest and src
formats. This has been corrected, so they test what they claim to test.
A test for RGB30 linear gradients is also added.
Change-Id: Ic623ae1b8e0bf7383056b641c6e8230a1d7dd0dd
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
"Embedded objects, such as images, are represented by a
Unicode value U+FFFC (OBJECT REPLACEMENT CHARACTER)."
Also updated the QTextImageFormat docs with the same wording.
Task-number: QTBUG-44538
Change-Id: I64dd5f5be4a0ecc64b30758a72f8b4281c17924b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This completes support for ItemViewActivateItemOnSingleClick in
QPlatformIntegration and exposes the setting in QStyleHints.
Based on the review process, the public name used is
'singleClickActivation' for brevity, as well as to avoid con-
fusion over alluding to "item views" in the Qt Quick context.
KDE Plasma intends to use this via Qt.styleHints to have
Qt Quick-based UI correctly implement the global single vs.
double click user preference for item activation.
[ChangeLog][QtGui] Added QStyleHints::singleClickActivation
to access whether the platform expects item activation to
occur on single clicks rather than double clicks.
Change-Id: I0916e9e68c3a157f95053da8227b2612803653f7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
On OS X the application icon can be changed at runtime, so this adds a way
to set this via the QPlatformIntegration.
[ChangeLog][OS X] QApplication::setWindowIcon now changes the icon for the
application in the dock.
Task-number: QTBUG-43999
Change-Id: Ice298c0bd52f10f4866f37c6d3f20cf5419b7a1b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
There is no apparent reason why these functions should be virtual.
The virtual keyword originates from the CVS import.
Change-Id: I4f8051cd4e89ca3037a78d12f17c93265c755b8e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
This patch updates the internal color precisions of solids and
gradients to 16bit per color. This makes it possible to render
at higher precision on non-premultiplied ARGB32, the RGB30
formats and any other hi-color formats if more are added.
[ChangeLog][QtGui][Painting] Internal precision of solids and gradients
is now up to 16bit per color.
Change-Id: Ieae5468bd6de1f56adfa4cb9fa966faf2ed824fd
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Add native support for linear and radial gradients to our
PDF generator. This fixes a couple of issues with both the
quality of the generated PDFs as well as sizes of the files.
Task-number: QTBUG-42758
Change-Id: Ib905457e11e4dc52443c76b3761bca8d1fbe9bfc
Reviewed-by: Stephen Chu <stephen@ju-ju.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
The internalformat parameter seems to be GLenum (unsigned int) on QNX
based on the error message in the linked bug report. The standard is
GLint, though. To keep everyone happy, add a cast.
Task-number: QTBUG-45346
Change-Id: I57fece7b381e0d02acc842a21b1edc5451ea0224
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
The patch moves the initialization of the format to format blend tables
to runtime, so we only have to explicitly set the values that are
not null. This removes most of the lines in qblendfunctions.cpp.
Change-Id: Ie017f380ff11cfb764a631cfea7626786731b5fb
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
QOpenGLFramebufferObject::blitFramebuffer() passes 0 when no FBO is specified.
This goes against the rest of the framework where the default fbo is what
QOpenGLContext::defaultFramebufferObject() returns. This becomes significant
with QOpenGLWidget and on iOS.
Task-number: QTBUG-45328
Change-Id: Iaeb82cd3786ad395116679c9626bdcb10e93b4e3
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Use GlyphInfo as a temporary buffer for storing the glyph metrics
and go through the same code for fetchMetricsOnly and !fetchMetricsOnly.
Change-Id: If8bb85056e5f09588cc3956b43dc51a54d5aecfe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Move some variables initialization closer to the usage context.
Change-Id: I0f1de0ddc9f0fbe3ec4a56455ccc14f9e8d94e5a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Make it consistent with fetchMetricsOnly path.
Change-Id: I6a2d2568d5579255582217515a4e598722547c60
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
...which constructs a quaternion using specified forward and upward
directions, so that the resulting Z axis "faces" a given forward direction.
Change-Id: Ib77b8ab5c359a4880b0d946face87026acdc6f0b
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Michael Krasnyk <michael.krasnyk@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
...for both cached and non-cached modes, by disabling hinting
for transformed glyphs in loadGlyphFor().
Change-Id: I13766a653ebd72cbed0f5c38ca3536d042aed762
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Until now we applied the geometry in QWidget::setVisible() by
calling QWidget::move() and QWidget::resize(). But these
methods are unreliable when the window is created but not
visible yet. For example, specifying the window position by
"-geometry +0+0" will take no effect.
Apply the geometry directly to QWindow in QWindow::setVisible().
QWidget will update its geometry after the response of the window
system. Besides it allows to specify the geometry for QML
applications.
Task-number: QTBUG-44713
Change-Id: I9a0e110e81e569c81da802729707fec104fef887
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Most of the CPU time was spending in fetching pixel values instead of
calculating the bilinear sample. The access to vectors unions turns
out to be very slow, and should be avoided. This patch removes the
uses of vector,int array union in the bilinear sampling for SSE2.
Change-Id: Ie765a80963c4899db59a583ea9a59d15e05f2b13
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QOpenGLContext::defaultFramebufferObject() knows nothing about QOpenGLWidget
and QQuickWidget. The problem is that this function (and others that rely on it)
is expected to give the widget's backing FBO in paintGL() and friends.
To overcome this, we have to provide a way for such widgets that indicate what is
the expected "default fbo".
Task-number: QTBUG-43269
Change-Id: I43f439f8609382b9f7004707ab0ef9f091952b4f
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Returning dbg.space() breaks formatting on streams that already
have nospace() set.
Change-Id: I55e38b018679a67eb40be6b4664505483a3a7d8e
Reviewed-by: David Faure <david.faure@kdab.com>
As reported by GCC 4.9.2 x86_64-linux-gnu. The error message is correct;
QCss::Property is the name of an enum.
Change-Id: I9fb29d39ac11a644b7b08227f102594b3f3017f0
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Debao Zhang <hello@debao.me>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Two newly adopted currency symbols:
the Azerbaijan manat and the Russia ruble
* Pictographic symbols (including many emoji), geometric symbols,
arrows, and ornaments originating from the Wingdings and Webdings sets
* Twenty-three new lesser-used and historic scripts
extending support for written languages of North America, China, India,
other Asian countries, and Africa
* Letters used in Teuthonista and other transcriptional systems,
and a new notational set, Duployan
For more details, see http://www.unicode.org/versions/Unicode7.0.0/
The Properties struct's .*Diff members were narrowed down
to signed 15 bits and the unicodeVersion has been expanded to 8 bits.
[ChangeLog][QtCore] Unicode data updated to v.7.0
Change-Id: I93ab6f79fa3b05f61abc7279f1d046834c1c1a0b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
QOpenGLFunctions allows both deriving from it and getting an instance
via QOpenGLContext::functions().
Unsurprisingly a large number of users attempt to use the versioned
function wrappers in the same way. Unfortunately this approach was
not that well supported.
Besides some potential base class exporting issues the real blocker for
QOpenGLWidget - or any versionfunction subclass whose associated context
changes during its lifetime - is that the functions instances could
only be initialized once. Unlike instances retrieved via
QOpenGLContext::versionFunctions(), instances created "manually" were not
deinitialized upon the destruction of the associated context because
context did not know about them.
A pattern like
initializeOpenGLFunctions();
delete context;
create new context and make it current
initializeOpenGLFunctions();
is working fine in QOpenGLFunctions-derived classes but not with the
versioned ones.
To overcome this, start registering such instances to the context too.
QOpenGLContext::destroy() can then reset the internal state so a
subsequent initializeOpenGLFunctions() will reinitialize properly instead
of bailing out mistakenly thinking that everything is ready to use.
Task-number: QTBUG-45199
Change-Id: Ia1420bcccb33c51508698b7a1b036c7544a66e74
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
rgb888ToRgb32ConverterPtr was a static variable, written by one thread
and read by others.
Detected by helgrind, in an app doing image loading in QRunnables.
Change-Id: I06813050b75182cffe26338a3af98eb7d2636abc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Replace it with '-' and set dontPrint to true;
later we unset the dontPrint flag if soft-hyphen appears at the
end of a line after line breaking.
Task-number: QTBUG-44234
Change-Id: I05b69bcbbe07e1ee8a5d35d24372356ce8ab9db8
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
> Symbol character sets have a special meaning.
> If the symbol bit (31) is set, and the font file contains a 'cmap'
> subtable for platform of 3 and encoding ID of 1,
> then all of the characters in the Unicode range 0xF000 - 0xF0FF
> (inclusive) will be used to enumerate the symbol character set.
If we detected the font has a symbol character set, report no other
writing systems support.
Change-Id: I1030f3339c166ffd03c7caee1b1b26010dfdc314
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
- Use QDebugStateSaver to restore space setting in stream operators
instead of returning dbg.space() which breaks formatting on streams
that already have nospace() set.
- Fix some single character string constants.
Change-Id: I0fe86bb1adbdd4a76ab6d2f8c19e063b45ddcf3b
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
SHA: 8e3aacf61b is a mac only patch, but
some code introduced by which is not wrapped with Q_OS_MAC. So add
the missing Q_OS_MAC here.
Change-Id: I748d46b977740e6116dab5659ad1e47d23262a0f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
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>
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>
Extract helpers to be able to format classes without type names
and use those for formatting QEvents to reduce clutter.
For example:
QWidgetWindow/"MainWindowClassWindow" QMouseEvent(QEvent::Type(MouseMove), buttons=QFlags<Qt::MouseButtons>(LeftButton), localPos=QPointF(50,116), screenPos=QPointF(948,652))
QWidget/"qt_scrollarea_viewport" QMouseEvent(QEvent::Type(MouseMove), buttons=QFlags<Qt::MouseButtons>(LeftButton), localPos=QPointF(45,32), screenPos=QPointF(948,652))
becomes
QWidgetWindow/"MainWindowClassWindow" QMouseEvent(MouseMove, LeftButton, localPos=50,116, screenPos=948,652)
QWidget/"qt_scrollarea_viewport" QMouseEvent(MouseMove, LeftButton, localPos=45,32, screenPos=948,652)
Change-Id: Ie5441d922962a05caed6b7079a74ea8a2b8a64fb
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.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>
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>
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>