This can be enabled with QT_MAC_DONT_OVERRIDE_CTRL_LMB=1
environment variable. The goal is to provide consistent
cross-platform input when it's more desirable than full
platform comformance.
Change-Id: I3b96733077bd1c0367edeef21a98a44b15425807
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
In 5.7 the Gbm prefix was added but the .pro file was not updated.
This breaks static builds.
Task-number: QTBUG-53136
Change-Id: I37af46ff768bf8c1dc9269892db25d61b76c0376
Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
QPluginLoader hasn't unloaded in its destructor since Qt 5.0, but we
missed the equivalent code in QFactoryLoader (which bypasses
QPluginLoader). Besides, QPluginLoader::unload() was still doing
unloading, which it won't anymore.
Not unloading plugins is Qt's policy, as decided during the 5.0
development process and reaffirmed now in 5.6. This is due to static
data in plugins leaking out and remaining in use past the unloading of
the plugin, causing crashes.
This does not affect QLibrary and QLibrary::unload(). Those are meant
for non-Qt loadable modules, so unloading them may be safe.
Task-number: QTBUG-49061
Discussed-on: http://lists.qt-project.org/pipermail/development/2015-November/023681.html
Change-Id: I461e9fc7199748faa187ffff1416070f138df8db
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
It's easier to maintain the function and the docs when they live together.
Change-Id: I1e047b4ac1eb61a36849188da560dd899e05509f
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
We don't need to include Q_QDOC in the forward-declarations of the native
types, and Q_FORWARD_DECLARE_OBJC_CLASS works in non-Objective-C mode as
well, which means we can declare the Objective-C versions of the functions
without guards.
Change-Id: I32089c496b4f7ce47f0388ba3f65e0b091d1e9ee
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
EGL headers including X headers has traditionally been problematic due
to getting macros for Status, None, etc.
In most cases this is not an issue anymore because on embedded one will
almost always use a driver targeting the framebuffer or DRM/KMS and
therefore the EGL headers do not pull in X dependencies.
Furthermore, Mesa supports MESA_EGL_NO_X11_HEADERS which we set, avoiding
the problem altogether with Mesa regardless of targeting X11 or KMS.
However, other drivers do not have this option. On i.MX6 for instance,
targeting X11 is problematic due to not having EGL_API_FB defined, which
in turn means the EGL headers pulls in X headers in order to be able to
define the native display and window types as Display and Window.
Try to play nice with this use case by reshuffling the includes and
undefining the problematic names.
Task-number: QTBUG-52928
Change-Id: I059f26b340b6e442e7296055915d18f5a1ce7a7f
Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
Prompted by Coverity CID 11720 (allegedly recently new in dev but
long-standing in 5.6). Even assuming the class is used correctly -
test initialize() and only use if that succeeded - the destructor
would have passed uninitialized arguments to munmap() and ioctl().
Noticed a double close along the way: it's been fixed on dev but
should have been fixed in 5.6, too. Documented why ioctl() failure in
switchToGraphicsMode() should at least do no harm.
Change-Id: Ie26a9eefa435b5ff5b1a02e03e29469b8db72d3c
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
while they are not built, their sources should be installed as long we
don't delete them completely.
Change-Id: I5e628e96cc9715520cb6e5aadb2cae61d1d03a4f
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
it was not built at all (and didn't build with qt in a namespace), and
consequently was not installed as well.
Change-Id: I24d8ac4dd5d70927c262ad6336e5ee32a0fd003a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
as in other examples which come with plugins, use an additional
hierarchy level which contains the app and plugin subdirs.
Change-Id: I2487755967aa3474c337c8c8af10be49627b63d0
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
When using QML, it quite often happens that only the QML engine is
connected to a signal, and no C++ handlers. By splitting up the
fast-exit case and handling QML separately, we can prevent a call to
QThread::currentThreadId, and locking+unlocking the mutex.
On x86 this saves ~130 instructions according to valgrind.
Change-Id: I947fe42afe351922339ac982a6d498bc2f7b5192
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The printf-style version of QDebug expands to a lot less code than the
std::ostream-style version. Of course, you pay in type safety (but
compilers warn about it these days), you cannot stream complex Qt
types and streaming QStrings is awkward, but in many cases you
actually improve on readability.
But the main reason is that something that's not supposed to be
executed under normal operation has no business bloating executable
code size.
This is not an attempt at converting all qWarnings() to printf-style,
only the low-hanging fruit.
In this second part, replace
qWarning() << "" << non-QString
with
qWarning("..%.", non-QString).
QString (and QUrl etc) have special escaping handling when streamed
into QDebug, so leave those alone. They also seem to expand to less
code than the qPrintable() alternative, so there's no reason to
replace them.
Saves 2KiB, 3.4KiB, ~750b and ~450b in text size in QtCore, Gui,
Network and Widgets, resp., on optimized GCC 5.3 AMD64 builds.
Change-Id: Iae6823e543544347e628ca1060d6d51e3b04d3f4
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Make REDUCE_EXPORTS the default for QNX. This is what the Linux builds
use. The Windows builds should too.
Turn on ICU detection for QNX. QNX has ICU.
Task-number: QTBUG-52578
Change-Id: Ie65c6ff03c4eecf361727b3b6026338f686d9749
Reviewed-by: Dan Cape <dcape@qnx.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
[ChangeLog][QtNetwork][QSslSocket] TLS PSK ciphers are possible in server sockets.
Task-number: QTBUG-39077
Change-Id: Iaa854a6f50242deae5492f2e4759c727488995f5
Reviewed-by: Richard J. Moore <rich@kde.org>
We don't know why it happens, so let's apply a workaround. See the
comment for more details.
Task-number: QTBUG-53031
Change-Id: Ifea6e497f11a461db432ffff144972e892fbbda5
Reviewed-by: Roland Winklmeier <Roland.M.Winklmeier@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add more error messages on failures.
Task-number: QTBUG-25367
Task-number: QTBUG-25368
Change-Id: I064143a058b7b98d9d5eecab8b5da49f5307e1eb
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
this makes it fully consistent with INSTALLS.
note that this also removes the file name from the target path when
copying files, also for consistency.
Change-Id: I69042c9aa1e2cc81f8ff982343ba25688a04abfd
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
- QMAKE_FILE_IN_EXT as an alias for QMAKE_FILE_EXT, for consistency with
QMAKE_FILE_IN_BASE
- QMAKE_FILE_IN_NAME to make pairing _EXT/_BASE to get a full name
unnecessary (finally ...), and make use of it
- QMAKE_FILE_OUT_PATH, because i'll need it
Change-Id: I3d91ddb84f9cce52a665d562da11d165c92550c8
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
it's beyond me why they shouldn't be.
Change-Id: I2493469636e4f196bfeb2eb00a691aeae0f1881d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
newer versions of qt creator understand QMAKE_EXTRA_COMPILERS and
INSTALLS, so there is no need to list the files twice.
Change-Id: Iccf3cc3248daf3422b8c366c2eb2d2f46c5f08d1
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
On iPhone 6(s) Plus devices, or when display zoom is enabled in an iPhone 6,
the render buffer is scaled before being output on the physical display.
We have to take this into account when computing the physical size.
Task-number: QTBUG-50941
Change-Id: I318f3a866d039fccf0ba08f381fc9d8bcd676acd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Ensure we don't round a underline position beyond the descent in our
eagerness to avoid underlines too close to baseline.
Task-number: QTCREATORBUG-15851
Change-Id: I9a29447bbcb938b7e9fb29d52fd392a1340d07c5
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
ALPN and NPN should not be mutually exclusive, it's possible that our
peer does not support ALPN but does support a protocol we can negotiate
via NPN. So use them both.
Change-Id: Ib3c8066d89117efab55ac8435cc2c806c7a1ece0
Reviewed-by: Richard J. Moore <rich@kde.org>
D3D11_QUERY_DATA_SO_STATISTICS is no part of d3d11sdklayers.h and thus
not covered by the ANGLE_MINGW32_COMPAT define. The struct is defined
in d3d11.h and will be available in an upcoming version of MinGW (see
a0cd5afeb6/
).
As soon as the MinGW version that includes the change is known, the
__MINGW32__ check should be replaced by a proper version check.
Change-Id: I774f24432b375fdf9c559449f266cc04a4905275
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Implementation of QFileSystemEngine::copyFile() uses CopyFile2() as if
it is CopyFile() function, but CopyFile2() returns HRESULT, not BOOL.
So the success should be checked by "SUCCEEDED()" instead of "!= 0".
Current implementation does exactly the opposite because S_OK == 0.
Change-Id: I0677d54447d22366fb2031e0b928a3d10e24c0ed
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
The problem of the check is that it makes Qt non compliant with OpenGL
thread affinity semantics. One is allowed to make a GL context
current on any thread, without the Qt-specific idea of moving
the QOpenGLContext to that thread first. Moreover, the move is
plain impossible if the user needs to handle the context
to 3rd party code which assumes the context to have GL semantics.
Add an application flag to disable that.
Change-Id: I55ca02ee62f8cc171a9a1bddef5331ad0949c061
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Let widgets respond to ImInputItemClipRectangle inputMethodQuery and
notify about potential changes with QInputMethod::update()
Change-Id: I01b2c53273df207d26107b237a7096fe53d1b0a5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
This property allows a convenient way of getting notified about changes in
the input item clipped rectangle, similar to QIM::cursorRectangle().
Change-Id: I26bf97eeb1f5ef1b7d3aafb03565023091d6df3d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
This rectangle represents the "effective" visual rectangle of the input
item, excluding any areas obscured due to clipping.
Note: The effective visual rectangle will not be influenced by overlapping
items.
Change-Id: I234176161dcfb9c236124e33ae510a0b01fe6dc3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Unfortunately, the improved patch for QTBUG-45812 fixed things for
Chromium, but did no longer work for Emacs. This fixes commit [269fdb]
to make it work for both Emacs and Chromium.
Task-number: QTBUG-45812
Change-Id: I2fca708503f27679681bc6959de1ad94943a063e
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
The store to guard in the inner function's critical
section was not synchronized-with the load at the
start of the function:
T1 T2
guard.load()
mutex.lock()
guard.load()
d = new Type
guard.store()
guard.load()
// use d
mutex.unlock()
The use of d in T2 does not synchronize with
the write to d in T1 -> data race -> UB.
Fix by storing with release memory ordering,
so that the guard.load() in T2 synchronizes
with the guard.store() in T1.
Change-Id: I5c1cd1fa097c6397cb0b48b0d8e8012f95978558
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
On platforms where it makes sense, add the implementation that makes
returning a QImage possible. This makes it possible to grab raster
windows.
Change-Id: I89241728aa6f7811c56bb66cd86a64aa961d71f8
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
There are cases where you would want to grab the contents of a QWidget
with a QSurfaceType of Raster, and in the case of a -no-opengl build
there is no way to get the contents of a QBackingStore. The toImage()
function was unnecessarily lumped into the QT_NO_OPENGL ifdef, so this
commit removes this truncation of the API.
Change-Id: I2644e3dc85339eecd8bae8b91f23ef2f29a7eee4
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Change-Id: I3d9f84d03519b2b8fb37c7d2e773e68bc4b9a1d3
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
QWindowsPipeWriter uses asynchronous API to perform writing. Once a cycle
has been started, the write buffer must remain valid until the write
operation is completed.
To avoid data corruption and possibly undefined behavior, this patch
makes QWindowsPipeWriter::write() take a QByteArray, which it keeps alive
for the duration of the write cycle.
Autotest-by: Thomas Hartmann
Task-number: QTBUG-52401
Change-Id: Ia35faee735c4e684267daa1f6bd689512b670cd2
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>