When a deleteLater event is queued, a check if done if the same event
for the same receiver is queued before by scanning all pending events.
This leads to quadratic behavior, which is quite noticeable. By using
an unused bit in QObjectData, this can be prevented. Now the duplicate
event scanning in QCoreApplication is only done for the quit event.
Task-number: QTBUG-65712
Change-Id: Ie505acbbec802f91ebd0b94ac067e362c2476113
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
If the stylesheet does not have a rule that manipulates the font at all
for the menu item, then it should use the one passed into the style
option instead.
Task-number: QTBUG-65034
Change-Id: I6cae3fad3cc22d5ab2b984e4a58b14303bcd6d03
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
The protocol may be namespaced, in which case the string lookup would
fail, so we iterate the protocols of QNSWindow instead (of which there
is only one, QNSWindowProtocol).
Change-Id: Ic45752c9e3a40f5d42ec82c4287402a3d7a47b09
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
The documentation of the QImage file loader methods contained a
simplified and somewhat misleading description of the format auto
detection algorithm. Fix up the language and link to the detailed
explanation.
Task-number: QTBUG-51596
Task-number: QTBUG-65438
Change-Id: I33ebc81c78e685c7ec4803fa56efd4e9cbc4eda5
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
QMetaCallEvent references up, so we need to drop by one. In all other
cases, we need to drop the reference to zero and delete.
[ChangeLog][QtCore][QMetaObject] Fixed a memory leak that happened when
the new-style call to invokeMethod() was used.
Task-number: QTBUG-65462
Change-Id: I39332e0a867442d58082fffd15034b99e31c92a1
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Task-number: QTBUG-65687
Change-Id: Ie795c8ac715e36656dabcbcdf8976d303ebaf0d1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
otherwise the project would need to clear QT despite using
qtHaveModule() in requires() (or REQUIRES=).
Task-number: QTBUG-65106
Change-Id: I568202214c8eafcdbe2d0e253b18f0e171293aff
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
These are no longer part of Qt 5 and produce documentation warnings.
Change-Id: I82242b7b03d7ece1b82e2ff75dc6673f471e2df2
Reviewed-by: Martin Smith <martin.smith@qt.io>
The operator_eqeq(data13) test expected the local-time epoch and UTC
epoch to agree precisely if the localTimeType set by the test's
constructor says local time is UTC; however, when the local zone is
*sometimes* ahead of (or behind) UTC, due to DST, localTimeType is
duly set to indicate that, which doesn't preclude the zone agreeing
with UTC at the epoch. This indeed happens for Europe/London, which
agrees on the epoch but was ahead a few months later. So we can't
determine what outcome to expect based solely on localTimeType,
although we can be sure of a match when local time is UTC. So skip
this test when local time isn't UTC (and document what's going on a
bit better).
Task-number: QTBUG-65435
Change-Id: Id9b8aa0402f2a2b410e0234f6eca4ab0d1010bc4
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
There's no way for the backingstore to end painting on the device by itself,
so we warn the user about what's going on. Failing to end painting on
the device will e.g. in the case of QRasterBackingStore result in having to
make a copy of the QImage data during flush.
Change-Id: I3fbac2d7a8a440fdb23197ac2d57d95bfaf9e125
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Compiling the default examples should be possible without compile errors.
Task-number: QTBUG-53141
Change-Id: I73d8787241291ae6230861a89b38e91d900fede0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Compiling the default examples should be possible without compile errors.
Task-number: QTBUG-46857
Change-Id: Ie323798df09cdbebc67eb617a7e0ec4c66cb2357
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Remove usage of outdated header.LGPL21 and replace those with proper
one (header.LGPL in src, header.GPL-EXCEPT in tests)
Change-Id: Ia4d1c0d84b77f09787fe7c30670747a1fe2aff29
Reviewed-by: Liang Qi <liang.qi@qt.io>
Original documentation commit included unresolved link target names.
This fix replaces them with the actual OpenGL function names.
Change-Id: I36a24eb237ef35d7207f3bae0771dc96476d7b19
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Otherwise the protocol name might clash with existing protocols when
using Qt as a plugin, and those existing protocols may have lived in
images that since have been unloaded, causing crashes.
Change-Id: I68fbe290bcbf2fabf463647c960f686971e066dd
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Objective-C category methods prohibit safe unloading of dynamic
libraries / plugins statically linked to Qt. Although they can be called in
convenient way they can be replaced with standalone functions without
noticeable drawback.
Remove unused qt_validModesForFontPanel category method.
Remove empty NSStatusItem (Qt) category.
Task-number: QTBUG-59884
Change-Id: I69503a115b1177623da91c67b62d72e56f43ffcf
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Factor out translation from the matrix applied on bitmap glyphs,
as that gets applied as position when painted.
Task-number: QTBUG-64313
Change-Id: Iab8d995c00ee02eda0896242903312d837b6d790
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 07fcfb793d)
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
The function is declared as STDCALL, so we can't add a direct function
pointer to it (calling convention doesn't match what QtCore will try to
use). Instead, add a lambda as a trampoline.
Task-number: QTBUG-65471
Change-Id: I39332e0a867442d58082fffd1504002206e5cfaf
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
We have the ability to blacklist tests for CI runs now.
Task-number: QTBUG-35109
Change-Id: I8590e83faba764dce2d52e8c62e2e2c63f7bf219
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The referenced static meta object for the superclass might be in a
different DLL. In this case, the whole QMetaObject can't be initialized
all via preinitialized data in the data section of the binary, but must
run code at runtime to fill in the value of the dllimported pointer.
In these cases, both GCC and MSVC initialize as much as possible statically,
while only filling in the dllimported values (QMetaObject::d::superdata)
at runtime. Clang, on the other side, initializes the whole struct
at runtime if some part of it needs runtime initialization, leaving
the struct completely uninitialized before constructors are run.
In C++, there are no guarantees for in what order constructors in
different translation units are executed. This in particular means
that there are no guarantees as to whether qRegisterWidgetsVariant()
in qwidgetsvariants.cpp runs before or after the runtime initialization
of QWidget::staticMetaObject.
With GCC and MSVC, this doesn't seem to have mattered since only the
superdata pointer of the staticMetaObject was uninitialized - everything
else was initialized, and the superdata pointer doesn't seem to be
accessed during qRegisterWidgetsVariant.
With clang, the whole staticMetaObject is uninitialized, unless the
staticMetaObject has been initialized before (and the initialization
order is undefined).
By setting a manual priority (which is a GCC extension that also
clang supports) for the staticMetaObjects, we can be sure that
these are initialized before the actual explicit constructor
invocations (without any explicit initialization priority) that
can access the staticMetaObjects.
Change-Id: I64a82f12d690528567509791bae088b6304e189b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
As the HANA ODBC driver does not provide scrollable
results per default, the connection has to be established
with a specific option.
Change-Id: I14751a94f61d6fffd6d56c39076c24ec4d1f88ef
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Joachim Puhr <jpuhr@gmx.de>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
The code used to fall back to anonymous login independently for username
and password; however, it should only use a fall-back password if the
username is missing or (case-insensitive) "anonymous". When a
non-anonymous username is given without password, we should simply skip
he PASS message to FTP.
If the FTP server requests a password, in the latter case, QFtp will
signal authenticationRequired; in all cases, if the server rejects the
given credentials, QFtp signals authenticationFailed. Either way, the
client code can then query the user for credentials as usual.
Task-number: QTBUG-25033
Change-Id: I2a4a3b2725819ab19c8a7e4baa431af539edcd8d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
setData()'s default implementation for QListWidget, QTableWidget, and
QTreeWidget treats Qt::EditRole and Qt::DisplayRole as referring to the
same data. Used the same sentence from QStandardItem::setData for
consistency.
Task-number: QTBUG-11549
Change-Id: I41d06bdaaa8e7d4a86e24147b3d8222ad7823a6c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
qt5_add_binary_resources() macro did not recompile for CMake generated
input before this patch.
Adding the input files to the DEPENDS option corrects this issue:
Task-number: QTBUG-60714
Change-Id: I0f46918c6f1079fed7ee1b21305b18ff38f863f8
Reviewed-by: David Faure <david.faure@kdab.com>
When applying fallback fonts to characters that are joined by
ZWJ or ZWNJ, we also have to set the same font for the control
characters, otherwise we will split the text and the necessary
shaping will not take place. This was reported for emojis, but
will probably also happen for Indic scripts where joiners are
used predominately.
[ChangeLog][QtGui][Text] Fixed ZWJ and ZWNJ control characters
when fallback fonts are in use.
Task-number: QTBUG-65519
Change-Id: Ia37233f3319b95af68ae6053c29997eac65448e0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
After we stopped sanitizing the fallback font list (with change
6ca48a847a), we now need to make
sure it is ordered so that the fonts that support the writing
system in question are always tested first, otherwise we can end up
loading a lot of fonts that will never be used.
Task-number: QTBUG-65605
Change-Id: Id2a65bbff3e64e6d6e6b4f72500778ee3e811e84
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Introduce a special hash modeled on the one used for QFileSystemWatcher
on Windows.
Task-number: QTBUG-31103
Task-number: QTBUG-64147
Change-Id: I69ebabe841716e4957ae3fb04fa5c43d233a3552
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
With libinput we now get a hardcoded resolution that is unrelated to
the hardware. So avoid using that as a real pixel delta and document
pixel deltas as being driver specific and unreliable on X11.
Task-number: QTBUG-59261
Change-Id: I9fe86d80e7ccd290ed2e4091d7eafa52cb537d34
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Marco Martin <mart@kde.org>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Old header.LGPL21 header was used at some files. Replase those with
new header.LGPL one
Remove old header.LGPL21
Task-number: QTBUG-57147
Change-Id: I650e39024ed4876bba27e954c7d61fdb025b46ef
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
MSVC requires that the C PCH file is compiled (as an object) and linked if
any C file is found, and the same for C++.
Most qmake projects are C++.
If a C++ project has a precompiled header, it is typically of C++ type, and
cannot be compiled as C (for example, it contains or includes classes).
Since there is no easy way to conditionally build the C PCH file only if C
files are found in the project (as done for g++), we need a setting that is
disabled by default.
This amends 30331afda1.
[ChangeLog][Tools][qmake] Introduced precompile_header_c CONFIG option for
MSVC to enable precompiled header for C sources.
Task-number: QTBUG-65103
Change-Id: Id9688a35ee7d9b5e4f5a846b81986cb674bc5f4e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
When we request fallback fonts, we cannot discriminate the fonts
based on the writing system support. This is especially important
since common script is now merged with other scripts, meaning that
a common script character will always go through the fallback
mechanism when not supported by the main font. When drawing
for instance a string of Devanagari characters on macOS, we would
get a list of 33 fallback fonts, but almost all of them would be
the default Devanagari font, since none of the other fallbacks
would support that script. Meaning that we would just check the
same font over and over, which makes no sense. The fallback list
has been retrieved specifically for the given script, so we do
not need to consider that when fetching the fonts.
For most of the common set, we will not have noticed the bug,
because at least one of the writing system-specific fallbacks will
have had support for latin characters as well. But when trying to
mix emojis and some non-common script, we would get a box in
place of the emoji, which had been adopted to the main script and
would only be looked for in the fonts supporting this.
Note that this exposed an issue with the QRawFont test on some
systems. When the sample text contained a space, it would
be possible to get a fallback font for this character, since
we now effectively support fallbacks. This is not the correct
behavior, but it is unrelated to this fix, and it was not what
the QRawFont::unsupportedWritingSystem() test was written to
check. I have therefore removed the space from the sample text
to make the test pass, and will make a separate task of fixing
the issue of merging fonts for whitespace characters.
[ChangeLog][QtGui][Text] Fixed a bug where mixing different
writing systems with emojis could lead to missing glyphs.
Task-number: QTBUG-61882
Change-Id: I00f6043bb01af1f2277723ccf643034aebf3e18f
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
sqlite will reuse the index for bound parameters when the named
placeholder is duplicated so we only need to call bind one time for each
placeholder. Therefore we need to have just one instance of each value
when doing the bind.
Task-number: QTBUG-65150
Change-Id: I75c4bcc4563e43c180a59a7a4cbb770dbe994642
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Remove black-listing of test; the problem was due to misconfigured
time-zone on the CI system - it was on some zone that presently
coincides with UTC, not actually on UTC as supposed.
This reverts commit 597b96b8fa.
Change-Id: I72ad1dfa38532362c05aef33cd874f7f79879a41
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
This ensures that the same set of variables can be successfully replaced
in both the Makefile and Xcode generators. It also switches the default
templates to use the Xcode-style ${var} syntax instead of the @var@
syntax for better Info.plist compatibility across generators.
Change-Id: Iff330bafd152773aafac9143c4a34e34f92f0ce6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>