Rather than tweaking the parser to cover every eventuality with corner
case lines that could cause incorrect header files to be created then
the means to suspend/resume the processing of a file is added.
This enables us to have it skip over the template line that is causing
a QList header to be created as part of the QtGui headers. This patch
includes the fix to solve this in addition.
Fixes: QTBUG-68129
Change-Id: I751646c4b20a4434347c149ae5e6dcb6e7618853
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Having a platform with Texas Instruments's ADS7846 touch screen controller (NXP
i.MX6 DualLite SoC) and a LOGIC Technologies Inc. LTTD800x480 L2RT 7" (800x480
pixels) TFT LCD panel attached to it (resistive touch) using Linux v5.2.17 and
libinput-1.12.6 a single one finger touch starts with a LIBINPUT_EVENT_TOUCH_
DOWN directly followed by a LIBINPUT_EVENT_TOUCH_MOTION both having the same
touch position.
Now Qt's code for touch input processing compressed both into one touch point
with state Qt::TouchPointStationary which resulted in QGuiApplicationPrivate::
processTouchEvent() seeing no touch points with state Qt::TouchPointPressed
anymore. As a consequence processTouchEvent()'s local container windowsNeeding-
Events stayed empty and the whole touch frame was skipped.
Fix this by still compressing into one touch point, but keeping its state as
Qt::TouchPointPressed.
Fixes: QTBUG-79212
Change-Id: Ia571d79ec5c1d6143e923ed69b378503b53e5992
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Change-Id: Ia5d208ace5086e8e92f95f859383773894a18768
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit dcbe25bbbb)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Introduce resources_functions.prf with the test function
qtFlattenResources which ensures that RESOURCES has a flat structure,
e.g. only contains *.qrc entries.
This can be called by other .prf files like qtquickcompiler.prf
without disturbing the ability to extend RESOURCES in other .prf files.
Task-number: QTBUG-79672
Change-Id: I43246e40f5ea52a9d9c917a1bd781aeeb1304acc
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
If a font with only a family set is resolved with one that has been setup
with setFamilies() then the family needs to be prepended to the families
list after resolving. This is so that the font still prefers the one set
as just a family with no famillies set.
This also amends the QFontDialog test to account for this too.
[ChangeLog][QtGui][Text] Resolving a font that just has a family set
with families set will prepend the family to the families so that it
is still the first preference for the font.
Task-number: QTBUG-46322
Change-Id: Icc4005732f95b2b4c684e592b06b31e133270e44
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Change a1ea498789 did replace different pkg-config calls for
-L, -l arguments to one. Anyhow, it also removed the eval() call that
ensured that the return string was split by whitespace, meaning that
paths couldn't resolve anymore properly if multiple arguments were
returned.
Fixes: QTBUG-79668
Change-Id: I4091fea6891ef79836e05f8e87ffa9d69863a8f5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The CROSS_COMPILE variable wasn't picked up by the linux-g++ mkspec.
Now it's possible to cross-build Qt on FreeBSD to Linux, for example.
Fixes: QTBUG-79255
Change-Id: Ib1cd8ed3d5ef0af42f2d47af8f6d2c2ff5356adc
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
It makes -DQT_DISABLE_DEPRECATED_BEFORE=0x050d00 (in an application)
trigger a binary incompatible change and crash.
Change-Id: I9b9783d134821697180dc3fd8f2f69a51ddb7ac6
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Based on https://wiki.qt.io/Writing_Unit_Tests. Some of the
guidelines will be added to the documentation of a particular
class, function, or macro.
Task-number: QTBUG-18368
Task-number: QTBUG-63987
Change-Id: Ied267edc71e370a07f5124ba05432799f595dda6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
From https://wiki.qt.io/Writing_Unit_Tests
Task-number: QTBUG-63987
Change-Id: I7229ac0712d1207c0c9ebdac868c33bb35dcb0f0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Make it clear that the functions will return false if the socket was already
disconnected.
Fix the QLocalSocket example snippet to handle that case correctly by checking
state() before attempting to wait.
Fixes: QTBUG-50711
Change-Id: I4ab4062446a0041a35a3a1d65a19202ffa103298
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This fixes issue with dialogs when the canvas is not at 0,0 in the
browser window
Change-Id: I14f6754746e064921635d6b3af3353bf3620ac44
Fixes: QTBUG-79160
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Add a section about using QEXPECT_FAIL() to skip known bugs.
Change-Id: Icf258b6e20add3b68d62e404fd9ac0db70420bf2
From: https://wiki.qt.io/Writing_Unit_Tests
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This amends cc873ec23a which worked around
a problem that was showing up on earlier versions of Windows. This
extends the workaround up to Windows 10 1703 as the problem was still
occurring up to that version.
Fixes: QTBUG-79143
Change-Id: Ib7eace17fb8e3817c556e2bcd462e37834b1cbcf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Due to work group size configured for desktop GL.
Change-Id: Id62cf297e280e04aecba748cf41b62c64ed9a0b2
Done-with: Andrey Yaromenok <ayaromenok@gmail.com>
Fixes: QTBUG-79374
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
When a window is closed, then it will cause the child windows to be
closed as well as a result. Therefore in order to ensure that they are
shown again as a result, we need to remove the WA_WState_ExplicitShowHide
attribute if the widget was not already hidden before. This enables us to
test for this attribute when calling showChildren(), so that if the
window has a windowHandle then we can make sure that this widget is shown
again.
Fixes: QTBUG-73021
Change-Id: I1186242b889899dfcd38d782a67567348e2055ee
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Log the style name, add more descriptions of what's being logged.
Before:
Adding font "Lucida Grande" 50 QFont::StyleNormal 0 aa true fixed false
After:
Adding font family "Lucida Grande" stylename "Regular" weight 50 style QFont::StyleNormal pixelSize 0 antialiased true fixed false
Change-Id: I138f1b9f41dc41c528c830d81f8018fc16561631
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The attached Drag object's owner, i.e. its parent, is also the dragged
item. So the attached Drag object will also be destroyed as the dragged
item is deleted.
Fixes: QTBUG-65701
Change-Id: I39b0a3180f205c427deed5c70cd1912524f9324e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
When one specified a prefix "/usr/qt5" on Windows for a non-Windows
target (e.g. QNX) that prefix was translated to "C:/usr/qt5" and
passed on to the Makefiles, for example as
"-Wl,-rpath,C:/usr/qt5/lib".
The reason was that we called $$absolute_path on the user-specified
prefix. However, absolute_path operates according to the rules of the
host operating system.
When cross-building, the prefix is an on-device path. Therefore we
must not attempt to make it absolute to the build directory.
The check whether we're cross-compiling looks a bit arcane, but we
cannot use $$qtConfEvaluate(features.cross_compile) at this stage of
configure. Instead, we use XSPEC (set up by qtConfOutput_prepareSpec)
and $$[QMAKE_SPEC] which is the right host mkspec.
Fixes: QTBUG-79214
Change-Id: Id8664f8512cf1d9e178054a38e72323d7929547d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
While I was looking into a bug related to problems building the test
without GUI, I noticed a lot of spurious #include lines so tidied up a
bit. Split some long lines, while I was about it.
Change-Id: Id87eb6f612c6b174f8240dfe9c00e0929244fb6c
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Thanks to Dmitriy Purgin for pointing out the serialization one.
Task-number: QTBUG-79353
Change-Id: Ia3d750b17ddd8fbb7a83a55df7e4546ca78c358b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
See the comment in the test for details.
Change-Id: Ie3d356e476ba0419d304bccd396fc18a831a30cd
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This reverts commit 631efee293.
Reason for revert: This causes a problem when running on iOS 11 devices.
Change-Id: If5194989b8d7a9f4cf2d72e770fdaad754d7e236
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
qtbase/src/corelib/serialization/qjson_p.h:230:38: error: ‘void* memcpy(void*, const void*, size_t)’ copying an object of type ‘QJsonPrivate::qle_ushort’ {aka ‘class QSpecialInteger<QLittleEndianStorageType<short unsigned int> >’} with ‘private’ member ‘QSpecialInteger<QLittleEndianStorageType<short unsigned int> >::val’ from an array of ‘const class QChar’; use assignment or copy-initialization instead [-Werror=class-memaccess]
230 | str.length()*sizeof(ushort));
| ^
Change-Id: Ie58e7fe4bae3003227364012ad56ab23bd560d8c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Building examples inside a Qt source tree is considered unsupported.
Instead of checking, whether the build is done "in source" inside the
source directory, we also have to check for "shadowed example builds" as
they are done by Creator. An example would be:
qtbase/examples/widgets/widgets/build-wiggly as a shadow build for
qtbase/examples/widgets/widgets/wiggly.
Fixes: QTBUG-76237
Change-Id: Iceb88af006fad249a4c13fa0b0345cf3f7086252
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Pass the dialog as parent to the event filter class
in QColorDialogPrivate::_q_pickScreenColor().
Fixes: QTBUG-53469
Change-Id: I9110c19a8f49a545a0fbf7cfdb3ded70fea4dcce
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
The Windows API MemoryBarrier function is actually a macro when
_M_ARM64 is defined and it conflicts with the MemoryBarrier method when
it's declared and used.
Task-number: QTBUG-77388
Change-Id: I762edfc4ca1a44cbe095724de708c7cdad34ae65
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This partially reverts commit 5e8b16f0e4.
Releasing the mouse button synthetically made it impossible
to use tap and hold gestures. When investigating, it seems
that other changes have fixed the original issue that
5e8b16f0e4 was meant to address,
so this is no longer needed.
[ChangeLog][Android] Fixed regression that made it impossible for an
application to use the tap-and-hold gesture.
Fixes: QTBUG-72408
Change-Id: I53f687d047a4ad0fdf3c8c96a00ed1b11d09f047
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Leaving it empty resulted in errors from Xcode when compiling the app.
Task-number: QTBUG-25309
Task-number: QTBUG-74872
Change-Id: I61b0f47d754c5f5b181a6f918283d990458cc78d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 1d1ed01711)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Since the pre-built versions of Qt at this point are still built against
the iOS 12.x SDKs, then we need to account for this in order to have the
workaround implemented in e00d888dae still
working when deployed to an iOS 13 based device.
Change-Id: I649a453c549ee272de64624d68f9382276fcba64
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
.Noto Sans Univeral is a system-generated font, but for some
undiscovered reason, it has different content when the app
has a valid Info.plist versus when it does not.
When there is no valid Info.plist, the font will act as a
last-resort font and return a question mark glyph (index 4)
for all characters it does not support. This was discovered
with emojis, but I also verified that the font returns index
4 for a random character in the Cherokee range, in order to
check if this was specific for emojis or not.
This causes the font to take precedence over anything that
follows it in the fallback list in apps that do not have
a valid Info.plist, so it has to be at the end of the list.
Note that in these apps, it will act as a last-resort font,
so the glyphs returned for missing characters will be
different from in a regular app bundle. But this seems
safer than to exclude the font entirely, given that
Noto Sans cover a large range of characters and might be
needed.
This font also refactors the look up of fonts to push to
the end to avoid doing lots of unnecessary looping over
the list.
Fixes: QTBUG-78833
Change-Id: I38bec5d5941681c4b4586072f7811d31561e1051
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
In d5abda313d, we started populating
meta-fallback-fonts in the font database because some that are
returned as fallbacks are not in the main list of fonts on the
system, so we would exclude them, thinking they were non-existent.
But populating these fonts by name does not always work, as
the system explicitly forbids requesting meta-fonts by name
for some cases. One of these was the emoji font, which would
resolve to a incompatible font descriptor and support for
emojis would be broken.
The fix is to retain the font descriptors we get from the
system instead, since these are guaranteed to be refer to the
correct font. This also saves us an unnecessary round-trip.
Task-number: QTBUG-78821
Task-number: QTBUG-77467
Change-Id: Icb17ccc75811eebf03919437828ba71f3ef08938
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
When a prepared statement is still alive after the database was removed
with QSqlDatabase::removeDatabase(), the cleanup routine is trying to
access the driver which is no longer alive which results in a crash.
Fixes: QTBUG-79019
Change-Id: I4630e3b947a12b23ed062f015abc373fc0e246c1
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
When a QPrinterInfo is passed in to the QPrinter then it needs to ensure
that the underlying session is set up to use the specified printer,
otherwise it uses the default one as it has not been changed.
Change-Id: I90012223e9831303d02fd3ffc68223dc492ece0c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We must check whether outputs or inputVars are non-empty before
accessing them.
This amends commit 68866b1a.
Task-number: QTBUG-79178
Change-Id: Iecf6dc705bac9bef5133ae2e5ceeace5f859f175
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Use the Qt's macros instead, since constexpr support may be revoked
on certain compilers.
Amends d26289ffb4.
Change-Id: I62354b14b57ae5fcbf3f1186ddb48bcf26535e90
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
When an empty text block precedes a table in QTextEdit, the cursor in
the said text block is drawn twice (in order to make sure that the
cursor is drawn on top of the table) with inverted colors, resulting in
nothing showing up. This commit checks for an empty block before the table
and skips the first drawing of the cursor if that's what it finds.
Fixes: QTBUG-62919
Change-Id: I828d06e0645007ac42e3f308a35868b4f0db1380
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Integrity has a hack, to let us link to the library mmap is in, that
depends on two extern "C" symbols of type char *; but assigning a
string literal to a char * variable as initializer is a const-ness
violation (as the Integrity compiler does point out), so change the
two variables to be char[] instead of char *, so that the literals
populate (and determine the size of) the arrays, instead.
Change-Id: Iab34fb378bc0522e14539592ead066f068751ad0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This reverts the x86 F16 part of commit
9649c41ed9. Unfortunately, it is perfectly
valid to compile coe without F16C an link to a QtCore that was compiled
with it. That's the case in Clear Linux where there's
/usr/lib64/libQt5Core.so.5 and /usr/lib4/haswell/libQt5Core.so.5.
Change-Id: I907a43cd9a714da288a2fffd15baacace8331403
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>