Re-use font engine obtained in the first place
Change-Id: Icdc2ad404ba9b2aadf2732e95c43a47aa957a6fb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Use a built-in JSON file in case the QT_OPENGL_BUGLIST environment
variable is not set. When QT_OPENGL_BUGLIST is set, the built-in list
is ignored.
To make the implementation simpler and more readable, some of the code
in QWindowsOpenGLTester is reshuffled a bit. It also caches the results
now, so it is safe and fast to call supportedRenderers() and friends
multiple times.
The blacklist currently contains the Intel card from QTBUG-43263 (Intel
GMA / HD3000 ?) and may also apply to QTBUG-42240.
[ChangeLog][QtGui] Qt now contains a built-in GPU driver blacklist for
Windows that disables the usage of desktop OpenGL with some older cards
that are known to be unstable with opengl32.dll.
Task-number: QTBUG-42240
Task-number: QTBUG-43263
Change-Id: I1ecd65b51fca77925317d52048e7ab01d9b8797c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
When climbing the menu hierarchy, it's sounder to
check whether the actual QPA menu is enabled. This
way we can trigger modifier-less shortcuts even in
submenus.
Task-number: QTBUG-38256
Task-number: QTBUG-42584
Change-Id: I13a27027306bce0f0732b05bf9469f3b77028f73
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
This allows us to lazily load icons from the platform theme
by reimplementing the pixmap(). Otherwise, we would instantiate
pixmaps in several sizes even though we would not need them
right away. Since, at least on OS X, icon sizes can go up to
128x128 pixels, we can end up saving an order of magnitude of
memory on icon pixmaps alone if we only use the smallest sizes
in our application.
Two side modifications are included. The first allows sub-
classing QPixmapIconEngine by exporting this class. The second
fixes the q_ptr in QFileIconProviderPrivate which was never set.
Change-Id: I91af322ded2823e475703871e607773177ae25d3
Task-number: QTBUG-41796
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
If you call libraryPaths() before constructing a QCoreApplication,
intersting things may happen.
Task-number: QTBUG-38598
Change-Id: I2861746277e391ede9e921e4a8ad825007e25fa0
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Need to emit availableGeometry not geometry
Task-number: QTBUG-44916
Change-Id: I6eb7eb0b8e46d6d8249fa67f57374b25e21f2ade
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Apparently failures can occur not just when doing eglMakeCurrent() but
also when creating window surfaces.
Change-Id: Ife1210293d5120fd41352164d9c89e83fb5ce468
Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Support statically linking the MSVC/mingw runtime libraries without
manually tweaking mkspecs. This is helpful for projects like the
installer framework.
MSVC does not support mixing MT[d]/MD[d] flags in different
compilation units. The static_runtime option is therefore added
to both QT_CONFIG and CONFIG.
Change-Id: Ifd6dc9c362090457de8e2c62477d0445f9479722
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The QFile::exists() check in the end was redundant if one of the
!QFile::exists() had returned false before. By always doing the
positive check we can get rid of it and also avoid excessive
nesting.
Also, on OSX the isEmpty() clause probably never evaluated
to true, with the effect that qt.conf in an applicationDirPath was
never found.
Change-Id: I750735741b707d3e98c4bf6c6b9558618e1fcc59
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This allows QGtkStyle to check the role and do appropriate styling
(bold font) for the label.
Task-number: QTBUG-43736
Change-Id: I735f5f7ffadd7a435fa9e28fab45b202eec0252e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
In QXcbWindow::setParent(), the window may not have a screen,
and in that case we cannot get the root window in this way.
Task-number: QTBUG-44719
Change-Id: I719e5e2f8cad13b1460b4d9df6ffd6c4a48e0d37
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
If a parameter contains quotes the check for "-binary" fails.
Change-Id: I27148b590d85291a93f1992dfd277fb857bec6e2
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Let's not try to to compare our QTimeZone handling with the system one.
Our handling goes beyond the range of the POSIX APIs, so that's a recipe
for error.
Change-Id: Iee8cbc07c4434ce9b560ffff13ca4a4f335bdbae
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
It is possible for there to be a HCBT_CREATEWND hook which can set the
touch window flags already while the window is being created. Therefore
we want to defer to those settings instead as they should take precedence.
Change-Id: If8dcbd34db2b3bbbfb1bc36731665fb17fb87c24
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Querying X server for data can be very expensive, especially when there
are multiple processes querying it at the same time (which is exactly what
happens when screen configuration changes and all Qt applications receive
XRandR change notifications). This patch is aiming to reduce the number of
queries to X server as much as possible by making use of detailed information
available in the RRCrtcChangeNotify and RROutputChangeNotify events.
Firstly, the backend now does not rebuild all QXcbScreens on any change (which
involved the very expensive xcb_randr_get_screen_resources() call), but only
builds the full set of QXcbScreens once in initializeScreens(), and then just
incrementally updates it.
Secondly, it avoids querying X server for all screens geometry as much as
possible, and only does so when CRTC/Output change notification for a particular
screen is delivered.
As a result, handling of all XRandR events on screen change is reduced from tens
of seconds to less then a seconds and applications are better responsive after
that, because we don't block the event loop for long. The X server is also more
responsive after the screen change, since we are not overloading it with requests.
Change-Id: I9b8308341cada71dfc9590030909b1e68a335a1f
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
The refactoring from a8c74ddcf7 commit
exposed more issues in the Windows API. There were already quite a few
QEXPECT_FAIL for this, so this isn't new.
For example, localtime(1351386000) on the Central European Timezone
should be "Sun Oct 28 02:00:00 CET 2012" (the second occurrence of 2
am), but the Windows API returns tm_isdst = 1 (i.e., still in the CEST
timezone) and that's incorrect.
Change-Id: I1bc63ac99b1d67b55d783f9606e5c59b24223b13
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Refactor the code so that the localMSecsToEpochMSecs function always
gets the daylight status as input. The calculation can be very wrong if
we forget to set it.
Change-Id: I39e2a3fa6dc7c4a417f23288f10b303e450b8b98
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
to_tis620 modifies cstr, so it mustn't be const.
Change-Id: Ia0aac2f09e9245339951ffff13c8d77c886f767d
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Found with GCC's -Wcast-qual.
Change-Id: Ia0aac2f09e9245339951ffff13c9468642b2db83
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
In QtScript we use the msecs since epoch conversion (JS date is based on
the concept). After a8c74ddcf7 the date
conversion test in qtscript started to fail. Instead of relying on the
code working by chance, simply update the date when setting it with
setMSecsSinceEpoch.
Task-number: QTBUG-44885
Change-Id: I9f95c9cdccea52e7d1f808f3cb9e18570ef0df13
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This also removes a dependency to 3rd party licensed code.
Change-Id: Ia4818a5cf306501bdb7192265edc4bcba8e597d8
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
In the case of calling processEvents with WaitForMoreEvents and ending up
processing a Qt timer, we explicitly interrupt the runloop, as CF doesn't
normally treat handling timers as having handled a source. That way we
can re-evaluate whether processEvents should return.
But, we need to compute eventsProcessed before breaking out of the
Q_FOREVER loop, otherwise processEvents will return false when
waiting for events and processing a timer.
Change-Id: Ie5f8905228cce1508b5b2e040cf1186820855191
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
We used to support calling QEventLoop::exec() from within a processEvent
recursion and still jump down to the root native runloop, but this does
not work as intended due to how QEventDispatcherCoreFoundation uses
flags in its ProcessEventsState for e.g. deferred wake up or timer
updates. The logic in QEventDispatcherCoreFoundation assumes that
the next recursion to processEvents will be handled by itself, so
that it can interpret the flags in ProcessEventsState. The iOS
event dispatcher subclass, QIOSEventDispatcher, does neither of
these things, and should only be used from a 'clean' state.
Change-Id: I44fa156feecc45772806002465c35bef0797ead2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
We release the UIWindow that retains QIOSViewController in the
QIOSScreen destructor, but other parts of the OS may have retained
the view controller, so the dealloc may not happen until later. In
the meantime we may receive calls to shouldAutorotate, so we need to
guard this code for the situation that m_screen has been deleted.
Change-Id: Iefeb75f4fc698b5e80417ffd3a971b7de625bcd5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Following up on using GCC's autovectorizing for faster SSE4.1
premultiply, this patch adds specialized autovectorized versions
of premultiply for AVX2, giving another almost doubling in speed.
To make the speed up for AVX2 and also SSE4_1 available to non-GCC
compilers, the target-specific methods have been moved to separate
files.
Change-Id: I97ce05be67f4adeeb9a096eef80fd5fb662099f3
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
On OSX we don't need the applicationDirPath to find a qt.conf
located in the application bundle. Let's take advantage of this and
allow findConfiguration to use it.
Task-number: QTBUG-24541
Change-Id: I38c349a3bcd140fcf91352c88c24ca662e6e6f2e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Some of the paths may only be resolvable if the application path is
known. On some platforms we can only figure out the application path
if argv[0] is known. Thus, if the paths have been queried before the
QCoreApplication is created, the cached settings may be wrong. We have
to reload them after creating the QCoreApplication.
Task-number: QTBUG-38598
Change-Id: Idf5822be87aa0872b099480040acd7b49939a22c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
When pressing a button with the mouse and then moving the focus away,
the internal and visual state of the button would get updated, but the
released signal would not be emitted.
The same goes for disabling the button, although in 99% of the cases,
disabling the button will also move the focus, so the first case
already takes care of emitting the signal.
Task-number: QTBUG-42775
Change-Id: Ib6ba8e0a75f0349b66d1e799b02bd8498db85022
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
setDevicePixelRatio is often called unconditionally even when the
devicePixelRatio matches the pixmap or image.
This causes a lot of unncessary detaches wasting some memory.
Change-Id: I27535b2b22312ec0edc9bdc00c99d322afb727c1
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
QOpenGLWidget exhibits the same issue as QQuickWidget in the linked bug.
Task-number: QTBUG-39917
Change-Id: Ib231fb88f73c6ef68f12cc3fecf462679e8184a7
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
The trick to get design metrics on Windows is to request the
font with the design size, however we were passing the em square
size in as the cell height instead of the em square size (aka
character height in Windows docs). This would give us hinted metrics
and thus the design metrics would differ from other platforms.
[ChangeLog][Windows][Text] Fixed design metrics for text
Task-number: QTBUG-44501
Change-Id: I4cffc3b86359cfdaf2ece07e1259f6fa862132bc
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
The Google Suggest API doesn't return the 'num_queries'
anymore. Had to remove code related to 'num_queries' entry
so that the suggestion list shows up.
Task-number: QTBUG-42817
Change-Id: Ic918d1c86840fa4c1e18f32a984f5a9dd911261d
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Neon support needs to be enabled unconditionally in mkspecs, so removing
-neon and -no-neon command line options from configure app. It now has
the same functionality as configure script.
Task-number: QTBUG-44690
Change-Id: Iaf5bf7ac4e11fcb798f643660e48a4ed3ce1036b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Neon detection in configure does not work unless correct
flags are passed to compiler.
Task-number: QTBUG-44690
Change-Id: If119cc9ed80275aaa8796c1be8853559a7670d6a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Xcode has a setting for script phases to filter out the environment
variables, so we don't need to use grep.
Change-Id: Ica1c64321385ab3e3b47cf6f8f4d4191bd963540
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>