- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer).
- Replace Q[TRY]_VERIFY(smartPointer == 0) by
Q[TRY]_VERIFY(smartPointer.isNull()).
- Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and
add casts where necessary. The values will then be logged
should a test fail.
Tests from corelib/tools were omitted in this change.
Change-Id: I4c8786d33fcf429d11b2b624c7cd89c28cadb518
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The function declaration has to be in the same ifdefs as the
implementation.
Change-Id: I78c5795baef4adba7439f66252819963db164759
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
We keep two symbols from QPluginLoader defined, even if QT_NO_LIBRARY
is set in order to be able to locate static plugins. This doesn't
constitute any loading of shared libraries or plugins from external
files at runtime.
Using these symbols we can enable most of QFactoryLoader even if
QT_NO_LIBRARY is set. Only update(), refreshAll(), library() and
the dtor make no sense then. This way QGenericPlugin also becomes
useful with QT_NO_LIBRARY.
Task-number: QTBUG-3045
Change-Id: Ib7842ce5799e8e2caa46431d95fddd1adda0fc41
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This allows us to introduce loading of static plugins with
QT_NO_LIBRARY set, using a minimal number of #ifdefs.
Also, drop the unused unloadPath() declaration.
Change-Id: Ifb1c096e5d349f17cfa51d44bfd917e1d4d2d27e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Overwriting the original device pointer would unref an incorrect
instance during cleanup, resulting to a memory leak.
Change-Id: Ieac4a2de98eec329aa42dedce9601c44348ba4d9
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Change-Id: Ie160643f428a845456dbc1dcac9c25d0aef89c28
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
This adds "const" to a few \fn commands for new operators
in QHash and QMap.
Change-Id: I93cf7aaf88fcb4db17de5810b555b978e8119e20
Task-number: QTBUG-47669
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
There was a bug in bool CppCodeParser::splitQmlMethodArg(),
which has now been fixed. The bug occurred when there was a
"::" in the return type.
Change-Id: Id31ed0d4a03d84e76fb69403441a3491ec884ddc
Task-number: QTBUG-47438
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
This update allows qdoc to handle \l commands for linking
to functions, where the formal parameters are included in
the link target.
For example, \l {QWidget::find(QString name)} will only match
a member function of QWidget that has a single parameter of type
QString. The parameter name is not used in the search.
Change-Id: I8a31c9a7ed632f12a0e6d8a33cbb5cd361098317
Task-number: QTBUG-47286
Reviewed-by: Martin Smith <martin.smith@digia.com>
Drop process output to nullDevice(), if an application does not request
forwarding, redirecting or reading from the device channel. This
prevents from accumulation of unnecessary data which can not be read.
Change-Id: Ia311a8c658a46cf580ffa9484c5369f3fc5f98a7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Preparation for also using it from QCoreTextFontDatabase.
Change-Id: I9cbef59c21f343a88a5cb3fdbee1ed4791d7a36e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Calling it directly is less confusing than calling
it indirectly via the "else" branch in
flushWindowSystemEvents.
Change-Id: I085deff09162137606922a5af7ead23e21497b11
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Set the accepted bit on the QWindowsystemInterface
keyboard event after processing the key event.
Change-Id: I2d8c9382f14840e464153870dff909000e64ddcd
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Add en "eventAccepted" field to WindowSystemEvent,
where the event subclasses can record the event
acceptance status. Make handleWindowSystemEvent()
return the accepted status.
This works for synchronous event processing only. If
the event is placed on the QPA event queue then there
is no way to return the accepted state immediately.
In the latter case handleWindowSystemEvent() always
returns "true".
Change-Id: I081aecc54f43588d42d3aaeec7f8458f06937601
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Convenience accessor for use by the Wayland
platform plugin.
Change-Id: I420209138cfc285f8396913548b9e158a35ee9c1
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Propagate the line stride when creating the high-dpi
backing store image.
Change-Id: I15f41965d8eaf1d01ddac0a1a012b71148f757e3
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
The native OS X color dialog wrapper is now implemented
in qcocoadialoghelper.mm in the Cocoa platform plugin.
Change-Id: Idc4088df93960dd68507d11a9895277e34a18b96
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
This way we can remove some life cycle management code.
Change-Id: I8e0c9db0a8c5f0941bbd834380d3e3b3a9d2f306
Reviewed-by: Adam Majer <adamm@zombino.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Contents of the QIODevice's buffer is handled in the base
implementation.
Change-Id: I5a3d68e4e8dcb16d7f5ad695ac43127b8047a061
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Instead, we use the binary MySQL encoding and copy the data directly
into the QVariant of the desired type. This gets rid of the temporary
string allocations and greatly improves the performance of the added
benchmark. On my machine, the results are:
Before:
0.562 msecs per iteration (total: 563, iterations: 1000)
1,922,479.330 instructions per iteration (total: 1,922,479,330, iterations: 1000)
After:
0.381 msecs per iteration (total: 381, iterations: 1000)
774,132.957 instructions per iteration (total: 774,132,958, iterations: 1000)
Note that the same could be applied to floating point data types in
the future. Additionally, special support for MYSQL_TIME structure
coult be added to get rid of the string conversions there.
To ensure everything keeps working, a new auto test is added as well
that verifies the select statements and insertions of integral data
into a MySql table works as intended.
[ChangeLog][QtSql] Improve performance when reading integer values
from MySQL databases via prepared statements.
Change-Id: I21dd9277661971ded934546f09535014b63f8eb8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
By using XAML as the platform compositor, many benefits are possible:
- Better input context handling for tablets
- Better multiple window support (including non-fullscreen windows)
- Support for transparent windows and window opacity
- Integration with native platform controls
- Simpler orientation handling on Windows Phone with built-in transitions
This patch applies only the minimal parts to make XAML mode work just as
the raw D3D mode. It does this by:
- Moving all OpenGL parts into QWinRTEGLContext. This will allow us to
have non-OpenGL windows later (e.g. Direct2D raster surfaces).
- Moving more window-specific parts into QWinRTWindow. Each window creates
a SwapChainPanel which can then be used for ANGLE (or Direct2D) content.
- Moving non screen-specific parts into QWinRTIntegration.
- Having QWinRTScreen create the base XAML element Canvas.
- Running certain calls on the UI thread where necessary.
The following code parts were removed:
- The UIAutomationCore code in QWinRTInputContext, as this is incompatible
with XAML automation.
- The D3D Trim and device blacklist, as these have been fixed in ANGLE.
- Core dispatcher processing in QEventDispatcherWinRT. Now there is only
one native event dispatcher; it is always running and never needs to be
pumped.
Future commits should address:
- Maintaining the window stack list and visibility using the XAML Canvas.
- Allowing for windows (e.g. popups) to be sized and positioned instead
of fullscreen.
- Using the XAML automation API to improve the platform input context.
[ChangeLog][QPA][winrt] Windows Store apps are now composited inside a
XAML container, allowing for tighter integration with the native UI layer.
Change-Id: I285c6dea657c5dab2fda2b1bd8e8e5dd15882c72
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
This allows the platform plugin to start using XAML interfaces in the
windowing system.
Change-Id: Ifcd29b8b8d83b138af69786dfc6a1adec21be37e
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
This is necessary for Qt applications, as they render to GL in physical
pixels. This is consistent with the CoreWindow swap chain behavior.
This includes a partial revert of "ANGLE: Improve Windows Phone Support"
as the modifications to SwapChain11 are incompatible with the XAML swap
chain.
This change only affects Windows Runtime targets.
Change-Id: I401ae81028a9dfdb9da37f51c60844467c476f76
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
This allows the XAML swap chain to work properly, as otherwise it never
got a resize after it was passed into ANGLE with an empty size. This is
fixed by upstream commit 3799c3014a9e4ba4a3853c014a7127254ec19d50, so no
patch is necessary for Qt's local copy.
Change-Id: I43b030fa74f6b30c2aa42a36db2031a84eedf60b
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
This allows multiple applications installed into the same directory,
to share data files without polluting a more global directory
like C:/ProgramData.
Change-Id: Id5f4f9bc9d2ccb7ec677babcc08c1c5a641178f6
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
pdfork(2) has semantics very close to what we want in forkfd, but not
quite. Differences:
- we still get SIGCHLD and need to do a wait4
- no support for atomic FD_CLOEXEC and O_NONBLOCK
On the SIGCHLD case: this commit is an improvement over the generic Unix
case, since we no longer need to install a SIGCHLD handler and do not
need to keep the arrays for matching PIDs and file descriptors. That
matching is done entirely inside the kernel.
However, since SIGCHLD is still sent to the process, an uncooperative
SIGCHLD handler can still "steal" our response. At least Glib is
documented not to reap children it wasn't explicitly asked to watch for
(source code matches), but other libraries are known to do waitpid(-1)
(e.g., EFL's Ecore). At least now the behavior is consistent: we will
never install a handler, so the behavior won't depend on the order in
which the handlers are installed.
Change-Id: Iee8cbc07c4434ce9b560ffff13cb4c63306e43ef
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Some platforms, such as QNX, do not implement QT_CLIPBOARD.
Change-Id: I3a8b484b4c00c28a91d3727054672c3788f98381
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
QAndroidInputContext now sends along the EnterKey type provided by the
EnterKey input method query enabling the QtActivityDelegate to set the
imeOptions for the TextView accordingly.
Change-Id: Ic96077ab4b11cf6dec52283ecf66b2cabe7af665
Reviewed-by: BogDan Vatra <bogdan@kde.org>
In C++, type punning with a union is not allowed. It will result in
compiler defined behavior at best, and undefined behavior at worst.
Specifically, if QRgba64 is passed to a function by value, the different
members of a struct might be passed in separate registers. This means
that any write to the quint64 might not blank out the values of the
struct whenever the compiler looses track with TBAA.
Change-Id: I991b5492fe4bb13a14bb670fef5bf13dacbe6c0a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
This permits text rendering consistent with other FreeType enabled platforms,
like Windows and Linux.
Task-number: QTBUG-42839
Change-Id: I8c99bcaa3fb07c16e935a0c3705af467bc3da584
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Just like from RGB32 to RGB30 we must also repremultiply when converting
from RGB64 because the alpha channel loses more precision than the other
color channels.
Since this is not approximated accurately in the simple blending
functions and the functions are no longer needed now the main render
engine supports higher accuracy, the simple blending routines for RGB30
have been removed.
Change-Id: I2b7b8eb015e330a487848fc4370ad3a1e966be91
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Have an autotest to prevent introducing JSON syntax errors
that become apparent only at runtime.
Change-Id: If2bcbf4d227fddcbeb9c095b7986bada078131d7
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
The type is known (usually) right after createNewSocket, so let's just
set it. They may get overwritten later (in fetchConnectionParameters),
but this allows early use of setOption when we need to know the socket
type.
Change-Id: Iee8cbc07c4434ce9b560ffff13ca09fccb8e1662
Reviewed-by: Richard J. Moore <rich@kde.org>
And declare Qt::Uninitialized to be the same value because we're not
interested in the scoping rules of C++11 class enums. We're only
interested in avoiding the cast from Qt::Uninitialized to an integer.
That is to avoid the mistaken:
QVector<Custom> vector(5, Qt::Uninitialized);
which is actually implicitly:
QVector<Custom> vector(5, Custom(Qt::Uninitialized));
and likely not what the developer wanted.
Change-Id: I27eaacb532114dd188c4ffff13d374eb698bfbab
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This hides the call to ::grow to now two places in the source code, so
it will be easier to fix the inefficient call to qAllocMore.
Change-Id: I5d1e6f7607404caa96e4ffff13e80a3e4cb0ee93
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
It's the same as movable (i.e., the opposite of QTypeInfo::isStatic),
except that it won't trigger the QList change in memory layout.
For Qt 6, we should merge the two.
Change-Id: Ib306f8f647014b399b87ffff13f1ece29e4b6e5c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The dynamic property variants are stored as QList<QVariant>, which unfortunately
results in QList to behave as array-list because of the size of QVariant. By storing
the variants in a vector directly we can eliminate the array-list element pointers.
Change-Id: I8736e1cf48b9fc97df3007df4a439b793933f346
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
SecureTransport is now the default SSL backend on OS X.
Users can still choose the OpenSSL backend by passing the -openssl,
-openssl-linked or -no-securetransport option to configure script.
[ChangeLog][Important Behavior Change] Make SecureTransport the default SSL backend on OS X
Change-Id: I7a4edfdb72e63975d6b31435969702f8e86a10f2
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
[ChangeLog][QtCore][Logging] Systems with syslog may now pass -syslog to
configure to send logging output to syslog.
Change-Id: I80d58ee6e70d8deb2409fc666e7e7f2d7f52b8e1
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
After seeing multiple apps falling into the trap of setting
AA_ShareOpenGLContexts after constructing the q(gui)app, it
is time to add some more docs regarding this.
Task-number: QTBUG-47637
Change-Id: I01b5be0980d038efc56fd649d4a1fee26c33aef8
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>