This ensures any non-standard fields (e.g. glibc's tm_gmtoff) are
clear, as well as the other fields mktime overtly promises to ignore.
Change-Id: I45d69eff7b5cb37ab910bf3d4d2d1481fd93aedb
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Make it possible to enable and disable both at the
environment variable level and at the source code
level. This applies to scaling done by Qt using display
density information provided by the operating system.
Disabling is done with a 'veto' system: both the environment
and source code my prevent the other for enabling
scaling. This covers use cases of 'my system does not
provide correct display metrics' and 'my application
needs access to display pixels', respectively.
On the environment, scaling is now enabled with
QT_AUTO_SCREEN_SCALE_FACTOR=1 and disabled with
QT_AUTO_SCREEN_SCALE_FACTOR=0. In source code the
corresponding application attributes are AA_EnableHighDpiScaling
and AA_DisapleHighDpiScaling. Not setting any of these
indicates 'no preference'.
The global scale factor set by QT_SCALE_FACTOR is
not affected by any if the disablers.
Task-number: QTBUG-46615
Change-Id: If18607d4b56ace1914a710e5aa60b2f0968e0010
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Allow setting tryShortcutOverride for handleExtendedKeyEvent
with no timestamps.
Change-Id: I469b144cfcaf063861debe86195e1f96ac94cc37
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
There really is no point in allocating a struct containing a
pointer and an int on the heap. Allocate by-value instead.
Since QList would be inefficient then, switch to QVector.
A pointer to the current token was replaced by its index.
That saves looking it up on every toPreviousToken()/
toNextToken().
This saves 816 bytes of text size on optimized AMD64 / GCC
builds, even though QVector expands to more code than QList.
Change-Id: I030ee3f6acabe76168a518495bd4462711519e54
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
When rebuilding the tab bar after hiding several dock widgets,
the index gets offset.
Task-number: QTBUG-49045
Change-Id: I05f6a976ca1d8c6f7cdf6532f1a728483398eabc
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
There is already a "wl_display" resource used by the client-side
Wayland plugin. This is confusing, and would cause horrible bugs
if ever a Wayland server was run as a client (the nested compositor
usecase). Therefore, use "server_wl_display" for the name of the
resource to be used on the server side.
Change-Id: I30455177a154e89b98ad3620b6a14626b821e54c
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
On some platforms our 1200 x 1000 bytes seems to be not enough to
fill kernel buffers (socket write). But it's not a reason to fail test,
just skip it.
Task-number:QTBUG-49205
Change-Id: I13ea6f315f9318288ba054cf8bfa6cdd61e489d2
Reviewed-by: Richard J. Moore <rich@kde.org>
This test keeps on failing on Windows 8 with 32 bit.
Let's add the platform despite this one test failing.
Change-Id: Id6a2b3e0b587d3cff29d1f616d5edacfcf68746d
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
glslang_tab.cpp was not created in the right subdirectory.
This amends commit 69167189.
Change-Id: I031499baa53b72a1923883c58eb5ddfc2a02789a
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Since hinted text layouts are not scalable, we should disable
hinting by default when the high-dpi scaling is active.
This is the Windows version of 0f7bc885aa,
which solved the same issue for the fontconfig database.
Change-Id: I48b5da5b045dec195fd257743175017f39cf9620
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
The implementation of the close event handler requires handling the two
close events that are received on OS X when the user quits through the
application menu bar or the Command+Q shortcut. The first is an
spontaneous event, and the second a non-spontaneous one with the window
already closed.
Change-Id: I24e3d3f0de4d631bd2d5616c85ce747f085691e0
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
If a native widget has a width or height of 0 we don't have to
invalidate its backing store as that is done by the window
system. Certain applications rely on ... interesting ... behavior
of certain window systems in this case.
Task-number: QTBUG-48321
Change-Id: I78ef29975181ee22429c9bd4b11d96d9e68b7a9c
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Outside qmlscene, a window may be created before its size has been
set. So check if the size is valid before using it.
Also, allow an app to bypass the adjustment to the requested window
size that is normally done in order to leave room for the system's
status panel. Such adjustment does not make sense in the context of
autotests, and would often cause false test failures.
Change-Id: I1627a2e4c37c68ac61c4976be5b73045eb2bb989
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
They were using QStyleOption*V<N>, which are all obsolete since
Qt 5.0.
Change-Id: I6a8a666cf18d52fcac8f305f38c8ef0843ec7bfd
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
This also fixes the underlying cause of QTBUG-44039 and QTBUG-43885.
You can choose between system, qt, and no libdouble-conversion
support. If you choose "no", snprintf_l and sscanf_l will be
used.
By default, system double conversion is used if the system provides a
double-conversion library. Otherwise the bundled libdouble-conversion
is built. sscanf_l and snprintf_l are not used by default as the
planned "shortest" conversion mode to produce the shortest possible
string will give less precise results when implemented with snprintf_l.
Change-Id: I8ca08a0fca5c54cf7009e48e771385614f6aa031
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Windows' configure.exe supports -ltcg since several years,
this patch adds -ltcg to Unix's configure script.
Change-Id: I3f39086c67c3f4cacd252f63de30e3cfc4aa22bb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
After canceling the asynchronous read operation, the
notified() slot receives ERROR_OPERATION_ABORTED.
We must not handle this situation as an error.
This amends commit 5ce567c5.
Task-number: QTBUG-48336
Change-Id: Iff948ceb3ad1f805a9de8c188fbc39ed4c76ba82
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
A wayland compositor on i.MX6 needs to create the wl_display
before creating the EGL display. This wl_display then needs to be
exposed so that QWaylandCompositor can use it.
Change-Id: Id60f6dd2fbba05140ca0671da6f17dbc2ecce3a3
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
If the future is finished when a watcher starts watching it, it is
perfectly reasonable for the watcher to get the finished message
promptly. If you pause the watcher before any message loops get to
run, the message presently won't get through until the watcher is
resumed, but there is no reason to guarantee that; indeed, one could
consider it somewhat perverse behavior.
So move the reportFinished() calls to after the pause()s.
Also eliminate a used-once local variable and use QTRY_VERIFY() in one
place where qWait() was used before.
Change-Id: I4bc6091fd7437a4d341be511b7a140f3d72d850e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Attaching spies afterwards was provoking a warning during tests:
QFutureWatcher::connect: connecting after calling setFuture() is likely to produce race
Change-Id: I6ee8c3613cecebd1c69b0337139d8a19a33f4a11
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Duplicate identifiers were introduced for QString code snippets,
resulting in the wrong snippets to be quoted.
Change-Id: I75e9c99cbc73bf39262079f7f53342a6ac90c2a7
Task-number: QTBUG-49111
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
When calling handleMouseEvent and similar, there are two choices when it
comes to the global and local position: by specifying the window it is the
caller's responsibility to provide a valid local position. When the window
is null, QGuiApplication calculates the local position. The winrt plugin
chose the former and therefore passing the global position as local is
wrong.
Task-number: QTBUG-48208
Change-Id: I3e1137cdb5d023296c4d73899da016641303c7df
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Also involves adding support for sharing contexts.
Task-number: QTBUG-48663
Change-Id: I0b18846ae70b63a0a21132f820a12ea744c0e936
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Mention that it is still used by Active Qt.
Task-number: QTBUG-49148
Change-Id: Ic31b2f60b25886cd55c5fa516082d79311ab84cc
Reviewed-by: Fredrik Orderud <forderud@gmail.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
The compiler-generated ones would break class
invariants.
This internal class so far isn't copied. This patch makes sure
that it stays that way.
Change-Id: I8bf75058edaf2adf148ae9edff4bf4e9a3b3368d
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Pass a QWindow pointer to QIcon::pixmap(), which
allows it to select a pixmap based on the target
device pixel ratio.
Change-Id: Ifb8e49c0eff0a42233a90eee3dfb995c2441bfd6
Task-number: QTBUG-38100
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Pass a QWindow pointer to QIcon::pixmap(), which
allows it to select a pixmap based on the target
device pixel ratio.
Change-Id: Ib592de2a25060658b70b4e4ab7ff5fbaa9b60260
Task-number: QTBUG-44424
Task-number: QTBUG-38100
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Different multicast tests fail on different platforms for different reasons.
Blacklist them to get rid of insignificant and later fix/un-blacklist.
Change-Id: I91548366c7666478ea1cc446bbf337becfdefd49
Task-number: QTBUG-46612
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
Running for instance the widget auto tests reveals a lot of egl warnings
due to items being created and not shown. Hence no surface was created
but tried to be destroyed when window was deleted.
Change-Id: I5c99eeb94a8fc2cfeb98f85445e013de61ff9ca9
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
After returning from main() it is not sufficient to exit the main
thread, it also needs to be ensured that the Xaml::IApplication object
gets notified by invoking Exit.
Task-number: QTBUG-49141
Change-Id: I8ca434be5f17ddddd465ede2a79585c28c51b3ef
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
The QWinRTEGLContext must not store the display, as it might get
destroyed while other objects still need it, for instance QWinRTWindow
to delete the surface. Rather create a global static for creating the
display once and delete it when application lifecycle ends.
Change-Id: Id176b6934e1d1327f5bb70ad0d258de91f675041
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
The minimum feature level is now detected before requesting a display.
If it is less than 9_3, use the WARP device instead.
Task-Id: QTBUG-44495
Task-Id: QTBUG-44694
Change-Id: I9f81f4f92269fab73c291f7373aa07236c7e5f98
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Brings down gui/painting/qcolor from 7s to 3s, reducing the calls
to printf() helpers from 16E6 to 10E6.
Task-number: QTBUG-38890
Change-Id: I34065e6f09fc9a14920b06aa6936908229f3f9c4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>