This is not the time to update and the window is
repainted on expose anyway.
Change-Id: I07680a2c351d337e2f35a18b804a03631d5cedc5
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
drawRect is a general “repaint now” function, which
we should handle also for OpenGL content. Make that
clearer by moving the implementation details of drawing
the raster backing store using CoreGraphics to a
separate function.
Behavior change: Call invalidateWindowShadowIfNeeded
also for the OpenGL case.
Change-Id: I158ebef548e063f826db2dc708c14ab1d784b095
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
The former is easy to mistake for the isExposed state of the event.
Change-Id: Ic769ac332901ac97449ebc8dcca5959b6b42df68
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Fixed double delete of QBsdFbScreen in destructor, first it was
deleted in destroyScreen, then as a smart pointer. Take ownership of
pointer before passing it to destroyScreen to avoid second delete.
Change-Id: I252fcd1f31a32b463ecefce5b7139c4b3c857d33
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
To avoid build system warnings about including _p headers.
There is no real reason to have this as a .h header anymore, now that
it is in the device integration private module.
Change-Id: I16526419356284e66861f95d1d0553abf0711218
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Move platform integration, context and offscreensurface to under 'api'.
This allows accessing these from out-of-tree eglfs backends as well.
For instance, the upcoming eglfs_emu backend for the Qt Simulator may need
access to QEglFSIntegration.
Clean up the project files and remove out-of-date comments (the private
module QtEglFSDeviceIntegration is not really header-less since 5.7).
Change-Id: If96dd5780a6bd33a1cf29164364df9bf921c4d01
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Just setting virtualDesktopLayout and virtualIndex are not
always enough. To create more complex shapes (e.g. a T-shaped
cluster) the top-left position has to be specified explicitly.
Enable this via an optional virtualPos property.
This also involves improving evdevtouch's mapping functionality.
Instead of fragile indices, rely on the screen name instead.
Change-Id: I138840779032ad9da674bfef7763adfdfc74ccd4
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
When resolving the filenames of fonts, we would first match against
the font face name, meaning that an italic font, for instance would
always be matched to the file of the regular font in the same face.
To fix this, we look up the full name in the file name cache first,
before the face name.
Also, since the font names in the registry are the English names,
but the names we get when enumerating the fonts on the system can
be localized on non-English locales, we need to translate the
full name of the font before we give up on matching it against the
registry. Since this can be a heavy operation, we add a cut-off
which skips resolving the English name when the style is one of
the most common "Italic" or "Bold" since we know these to be
English.
[ChangeLog][QtGui][Windows] Fix selecting non-regular fonts when
using the Freetype engine.
Task-number: QTBUG-47485
Change-Id: If897abb93dc93263902b1c62bc3f66c4d06721c2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
When the font in question is a color font, we should call
the appropriate function bitmapForGlyph() and return the
color bitmap from the font, rather than the alpha map in
QRawFont::alphaMapForGlyph().
Change-Id: I2c3cd66db5a93ddf0cc463f4d136dd6771b9734c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
With the removal of Windows CE support(52623d6d) the logic of these
checks have changed, as it was always true for non Windows CE builds
before.
This did not affect WinRT, as those mkspecs define VCPROJ_ARCH
explicitly in their qmake.conf.
Task-number: QTBUG-55753
Change-Id: Ie2eddf197c17fcbf7343b444cfe8940a332a545c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
5971b88e is not needed in new configure.
This merge also reverts "fix QMAKE_DEFAULT_*DIRS resolution with
apple SDK", 2c9d15d7, because it breaks iOS build with new
configure system.
Conflicts:
mkspecs/features/default_pre.prf
mkspecs/features/mac/toolchain.prf
mkspecs/features/toolchain.prf
src/dbus/qdbusconnection.cpp
src/plugins/sqldrivers/mysql/qsql_mysql.cpp
src/sql/drivers/mysql/qsql_mysql.cpp
src/widgets/widgets/qmenubar.cpp
src/widgets/widgets/qmenubar_p.h
tools/configure/configureapp.cpp
tools/configure/environment.cpp
tools/configure/environment.h
Change-Id: I995533dd334211ebd25912db05b639d6f908aaec
If the destination format is 32bit, we can convert directly in the
destination instead of in a buffer.
Change-Id: I2b4407da77b863deec7869c341e1a8d464b46600
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This patch adds a sample native event filter that can be easily
integrated in a project.
Task-number: QTBUG-53209
Change-Id: Iedf6df33a3de5b01dc7871cca5e7897a5b485733
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
Collapse the tables that are mostly identical, to much shorter tables
and a simple functions to make it easier to read and maintain.
Change-Id: I44fdaebe9927b49a94385057756d9d87ad3c33f5
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Only return activity object when available and *not* when unavailable.
Task-number: QTBUG-55035
Task-number: QTBUG-50759
Change-Id: I60b1be528b2e4a3d630f4085b7642d74e18482bd
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Change-Id: I682fabe8891e0325e6545b4499a59af4ad584c41
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
It should be possible to show a menu by calling showPopup, even if
visible is set to false. After all, it's only logical that visibility
is false before showing it. And whether or not the menu is
enabled should not matter as well.
Change-Id: I9a2b453c8c6e88c47812c652d99e4b4a9c7524a7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
The synthesized properties were defined as (read only)
methods in the UIViewController API in iOS9, and we
extended them into readwrite properties in our own
sub class to enable some local bookkeeping in addition
to normal overriding.
But in iOS10, Apple has changed the methods into being
readonly properties instead. The difference then is
that automatic property synthesizing
will ignore our local readwrite declarations, and use
the declarations in the super class instead. And this
will lead to a runtime crash on iOS10 since no
setter methods are generated.
This patch will instead explicit synthesize the affected
properties to ensure that both getters and setters will be
generated.
Change-Id: Iac330e991b8a0fe335e383e1f7d9ff30c0ce1559
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
In the iOS 10 SDK, method signatures has been annotated with
NS_ASSUME_NONNULL macros and 'nullable' keywords. This means
that certain methods should not be called with argumens
that can be null, or in this case, set to 0 explicitly. The
result will be compiler warnings.
This patch will rewrite the explicit call we do to touchesCancelled
so that we send an empty set instead of 0.
Change-Id: I50aa80b91312397d17e0e380815adff87cee852b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Allows us to detect cases where the requested vsync combination was
not possible to fulfill.
Change-Id: Ie8f3665129f7a1ab7fcefb94b2298d54520b753a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The FPS is now calculated and output on the command line in a single
place. The animated fps counter has been replaced with a vertical line
which should make it easier to observe tearing issues when vsync is
disabled.
Change-Id: Id356fc1958c048d85aba48edfed59124454038d4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
QSurfaceFormat is recreated from scratch, and by not reading back the
swap interval the QCocoaGLContext seemed to be vsynced even if it
actually was not.
Change-Id: I72ddaae9a4c695fe4c74d7b4b70ca9db84bcc084
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The animated FPS counter should be enough to observe smooth animations,
so we use the color of the window to visualize frame latency.
Change-Id: I1171a1c4bdc261ca8655771290c6735357821781
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This patch adds AVX2 versions of the fast blending functions that we
already have SSE2 versions of.
Change-Id: Ifd1a22f7891b6208cb74929ad26095d12c5a1efb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
As the d-pointer, QBrush uses a QScopedPointer with a
custom deleter that checks for QBrushData::style and
casts the QBrushData pointer down to corresponding
subclasses before calling delete on them.
In QBrush::detach(), however, any of the three brush
data classes were held in a QScopedPointer _without_
the custom deleter, invoking UB when that scoped
pointer would ever get to be the one that deleted
the payload instead of handing it over to the objects
d-pointer.
Found by making dtors protected following a Coverity
report wrongly marked as 'dismissed' (these static
checks are not included in this patch, since they
are binary-incompatible), to find out where Coverity
could possibly see a problem.
Also replace the d.reset(x.take()) that allowed this
mismatch to compile with d.swap(x), which nicely
ensures that x and d are of the same type.
Coverity-Id: 11772
Change-Id: I85e2c205df9291bd7508b6c90f7b03fbe8c3bcd2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The previous detection of device pixel ratio changes in paintDevice()
is not needed, as QBackingStore::beginPaint() already does this check
and calls resize().
Change-Id: I9ee8410fa3a5404c5ec19d2cba4543a9e3359fe9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Only windows that are part of the application can be grabbed. This
excludes the system statusbar and other system overlays, as well
as windows of other applications. This is a limitation due to the
security model of iOS.
There exists APIs to grab a snapshot of the complete screen, but
these APIs return a view that can be used as a placeholder e.g.
during view transformations, and doesn't match our API that require
reading of pixels.
Task-number: QTBUG-49944
Change-Id: I8fd5b4c2777be1486f0ff22762d5e9b64c927e70
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Coverity somewhat rightfully complained that the FD may be leaked in
certain cases, e.g. when the new-expression throws. Yes, the plugin
is compiled with exceptions disabled, but the code is still a bug
waiting to happen, because it's too easy to just add an early return
to the function and leak the FD that way.
Fix by writing a small RAII class for FDs (can't use QSharedPointer,
since it's not a pointer we're dealing with). It's quite generically
named, in anticipation that it might come in handy elsewhere, too.
Coverity-Id: 89046
Change-Id: I83d1ed3f11219065d2248c129ed191a651f617c7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Instead of the global state
Task-number: QTBUG-48795
Change-Id: Ic2c545718adb68df41730e5a3bf25adb374ffce3
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Costs only ~300B in text size in QtCore, which is roughly compensated by
savings in other QtBase libraries, even without specifically porting
users to QL1S.
Of course, the raison d'être for this overload is avoiding the expensive
QLatin1String -> QString conversion which, for small lists, can take up
to 50% of the total runtime (assuming memory allocations dominate over
scanning and copying the list).
[ChangeLog][QtCore][QStringList] Added join(QLatin1String) overload.
Change-Id: I91d7e1d4e2c76d6dc79f2b750cf8e256dd4e0ab6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The implementation was duplicated and spread out between QMacStyle,
QMacPaintEngine, and the Cocoa platform plugin.
Moving it into QtGui allows using it on other Apple platform.
Change-Id: Iadcbd71998204887e116271c575037789b6e2163
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
If the main thread is blocked updateApplicationState will hang. It
happens when we're using functions like runOnAndroidThreadSync or
requestPermissionsSync.
Change-Id: Ic1135c5630b48cf1076ef5cbc133933fce439bfb
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Isolates the test from anything that might be going on on the globalInstance().
Enabled by the explicit thread-pool feature on QtConcurrent::run().
Add explicit timed wait (unit tests should contain as little indefinite waits
as possible).
Also avoids the use of QFutureSynchronizer, which makes my static QList
checker go nuts, with no way of fixing it until Qt 6.
Change-Id: I0829992642b2a49bb6a10ddd4b31eb3f88e3adeb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
... and plaster API with nothrow (well, one function).
Change-Id: I36fd64c6fda5390954c82bba307c720d3b3215df
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>