The "rect cache" has been #if 0'd out for ever. Do not waste time on
maintaining a vector for nothing.
Change the screen image to be a normal member variable. There is no need
for extra heap allocations.
Task-number: QTBUG-56306
Change-Id: Ib88aa57896bf1a616b8cedbec7490f0a4bf0ba5f
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
The generic DRM code, not involving any GBM or EGLDevice stuff, can
now be reused in components outside eglfs, for example linuxfb in
order to get support for DRM dumb buffers.
Task-number: QTBUG-56306
Change-Id: If7dffdb2415489dbc6470782fa76efcaeccf01c7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Cocoa is known for not sending key up events for key equivalents,
regardless of whether it's an actual recognized key equivalent.
Notice that only Cmd-based shortcuts suffer from this feature.
We decide to force fate and forward the key event to the key
(focus) window. However, non-Qt windows will not (and should not)
get any special treatment, only QWindow-owned NSWindows. Since we
know that Cocoa will not send it to the key window, we can safely
forward it and ensure no duplicated key events.
Change-Id: I0449f7f5195a327eef6d792bd441fc3fd0882db1
Task-number: QTBUG-36839
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Add WINDOWPOS, fix RECT and NCCALCSIZE_PARAMS to be in
the Qt style.
Change-Id: I0a0a960115d704cf704df85597ce0940bd8d7211
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Replace which_dotnet_version with a simple function that converts the
value of MSVC_VER to its corresponding enum value in the VS project
generator.
This reduces the maintenance burden when adding support for a new VS
version, because we do not need to update the registry keys in
which_dotnet_version anymore.
The which_dotnet_version function implemented the following logic:
- find all installed VS versions via registry
- select the "best matching one"
- if there is no best match, select the VS that's in PATH
- create a project for that VS installation
The usefulness of this whole stunt is questionable as the VS version of
Qt's mkspec must match the version of a project using that Qt anyway.
Change-Id: I9fb9a099ee5ddb5fc4c450be4f68f41f2b406b9a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
On the way to get rid of this function.
Have one place to determine the VS version instead of calling
this function over and over again (even though all calls but
the first are cheap).
Change-Id: Ic42a65df5a9bbe289f4813e4db85000dba15e672
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The construction 'vector.resize(vector.count())' has no effect.
Change-Id: I3d8ba7aa408599470b3a1ba4d1c1d859cf509d00
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
amends aa3d08ee86, which attempted to
revert the default change to -shared in 4c26b48633 but failed to take
into account an explicitly passed -shared argument, resulting in:
ERROR: Feature 'shared' was enabled, but the pre-condition
'!config.uikit && !config.integrity' failed.
Change-Id: Ide381624245e7c132a07e98c9107be7126dd488a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
qt_find_obj_child is a vestige from Qt3. It is not used nor
exported. It can safely be removed.
Change-Id: Ief6164c361a369559e067b99880c357e421e6342
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
...unless the legacy behavior is requested via
QT_QPA_FB_FORCE_FULLSCREEN=0 or the platform plugin overrides
QFbScreen::flags() to return QFbScreen::DontForceFirstWindowToFullScreen.
The long pending asymmetry between eglfs and linuxfb is going to end
because with the increased focus on the integrated Qt Quick Software
backend the expectation for launching apps with -platform linuxfb is
to behave in the normal, eglfs style, embedded manner. Forcing every
app to handle this manually in QML is silly.
Widget applications also benefit since the old non-fullscreen main
window approach is pretty much never what is wanted (considering there
is no desktop and the content in the background is either garbage or
whatever was on the terminal).
However, not every fbconvenience-based platform wants this. For
example, vnc should remain with the old way where window sizes are not
altered. vnc therefore opts out via QFbScreen::flags().
bsdfb follows the linuxfb behavior.
[ChangeLog][Important Behavior Changes] The linuxfb and bsdfb platform
plugins now follow the behavior of eglfs by making the first window
fullscreen. This provides consistency and avoids applications having
to make their windows match the screen size manually. The new behavior
can be disabled by setting the environment variable
QT_QPA_FB_FORCE_FULLSCREEN=0.
Task-number: QTBUG-48658
Task-number: QTBUG-56306
Change-Id: I63d917147ce37205e29cbd0c6f37f35c46d4509c
Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This is a revert of the default change to -shared in 4c26b48633,
which was landed without dependent changes like
https://codereview.qt-project.org/#/c/160747/ being landed first,
breaking the build for people building with the default configure
arguments.
Change-Id: I66eba76ca681ccf9b2ee54fa16b3e08888ae2fb4
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Since the iOS plugin (kernel) is static, the
optional plugin needs to be static as well. Otherwise the linker
will complain about missing symbols (coming from the
optional plugin calling out to functions in kernel).
Task-number: QTBUG-42937
Change-Id: I154de0d383bfae09c75a57395b57414fc5ffcc2d
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Fix warnings like:
qwindowsdirect2dpaintengine.cpp:722:107: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'HRESULT {aka long int}' [-Werror=format=]
qWarning("%s: Could not convert Direct2D linear gradient brush: %#x", __FUNCTION__, hr);
qwindowsdirect2dintegration.cpp:112:88: error: passing NULL to non-pointer argument 2 of 'WINBOOL GetFileVersionInfoW(LPCWSTR, DWORD, DWORD, LPVOID)' [-Werror=conversion-null]
if (GetFileVersionInfo(filename, NULL, versionInfoSize, info.data())) {
^
Change-Id: Ie03abdb5f4ba47b4803c283b9a4ec10181aae76e
Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
Commit 33d748bb8 (Allow granular synchronous and asynchronous delivery of
QPA events) replaced a postWindowSystemEvent() with a SynchronousDelivery,
which was completely broken, as the delivery is already guarded by a mutex
wait.
Change-Id: I929fddc4e3403f943e8fe0677b5a46bf58419575
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
I'm guess I introduced the regression in the commit
18ed6f20ad, which I wasn't sure about.
Change-Id: Ic46ff326a6ba46bc877cfffd14839f84fdf796e7
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
qiosfileenginefactory.h is now a part of the optional plugin.
Amends d7e49801
Change-Id: Ia1854145f54e4278ab5c0020361915f476d48cc9
Reviewed-by: Liang Qi <liang.qi@qt.io>
Partial Direct2D was added to recent versions of MinGW, which made the
config test pass but is not sufficient to actually build the plugin.
Check for IDXGISurface1 in addition.
Change-Id: Ie108f5735ceb0a44934429b0fd2213612ed28848
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
In change ce2ae6ebd8 we added support for
hinted rendering to the DirectWrite engine. Previously, we would just
use the DirectWrite engine for all text rendering in high-dpi and assume
we would get only vertical hinting, but since the default changed, we
ended up scaling hinted text and the resulting text layouts were a mess.
Task-number: QTBUG-56841
Change-Id: I52101ea264878138de41878d1677c0ef8b522e78
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This improves moc performance on Windows where file-stat'ing is slow
and where the number of project include paths to search is often high
because project third-party headers are installed in separate
directories rather than a shared include path such as /usr/include.
In a real project of non-trivial size it reduces the total
from-scratch build time of an optimized build using CMake+ninja with
32 cores by 11% from ~11m35s to ~10m15s.
Change-Id: Ieed59646927ed75c55ed9efa97600c328b2fed2c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Follows up f607233c7c (which originally
introduced this workaround) and 397f345a6a
(which refactored simulator_and_device not to use exclusive builds).
Change-Id: I97f0edefb1bc97167cfa83e4ac0f7581713fb092
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
At the point in time when the callback is called it is very
unlikely that another thread sets the state or error of
the socket engine. Other members (readBytes, bytesAvailable)
are protected by readMutex.
Change-Id: I76cf12fbc9019d1b42846c4b40e0cd1c06bbb220
Reviewed-by: David Faure <david.faure@kdab.com>
As the list is changed inside a native callback
(handleReadyRead) which can be run inside another
thread it has to be protected by a mutex.
Change-Id: I145a866a36a12b7ea9bfa9f99ad9f7add872a021
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
Commented its purpose and the guarded members for
readMutex.
Fixed places where guarded members were accessed without
using the mutex.
Use QMutexLocker instead of manually (un-)locking the
mutex.
Task-number: QTBUG-44357
Change-Id: I0d46f9592d5a9d1b52e73df961785a6f6c9e80be
Reviewed-by: David Faure <david.faure@kdab.com>
The socket might get closed by some slot connected to its error() signal.
This could lead to 'errorString' being cleared, which would hide the actual
error code from the debug output. Changing the order of calls ensures we
always get the correct message.
Change-Id: If7c01196dbeb3cb0c97235cd02a3baf63fc190da
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Replace QByteArray-based read buffer with a more efficient QRingBuffer.
Change-Id: Id43427a0692463481dfc4dfbe915772afb093364
Reviewed-by: Jesus Fernandez <jesus.fernandez@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Allow to check programmatically whether using the system proxy settings
is enabled. To implement this the QSystemConfigurationProxyFactory is
replaced by an explicit boolean in QGlobalNetworkProxy.
Change-Id: I52231b4ffc890b085bcd1739acf93c97bdb18eb5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
This was added in 28f5d79316 in
conjunction with CONFIG+=single_arch, but CONFIG+=single_arch on its
own is enough to properly disable unwanted architectures for configure
tests in simulator+device builds now that exclusive simulator and device
builds have been removed for all relevant configurations. This change
therefore fixes the -sdk iphonesimulator build for the upcoming merge
from 5.8.
Change-Id: I57fa2c4f0782a84755a39c6edfce2dcfec554c40
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Only detach() if the string does contain the character to be replaced.
Save memory allocations.
Change-Id: I69c070d3f0b99f505fb6c209f657cdce31a35461
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
fixes rebase FAIL in f9a80e06a.
the ft dependency itself is pulled in via the basic font database, which
is included if ft is used.
Change-Id: I4e9c0c44bd0360b702953e51cde4c5d526eff499
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
users may want to use pkg-config regardless of whether qt itself was
built with it. that's particularly relevant when using binary packages
on macos while trying to use 3rd party dependencies from homebrew.
Task-number: QTBUG-36256
Change-Id: I15e6d0bf5cdaff4274e2d7c07917e97f29157a5c
Reviewed-by: Massimo Callegari <massimocallegari@yahoo.it>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
the spec (possibly) provides QMAKE_PKG_CONFIG. PKG_CONFIG is dynamically
determined on use.
Change-Id: I45b7f4eddeff5d28539021472ef9036dd397d61e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>