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>
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>
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>
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>
Always try to create the runtime directory and never change
the permissions of an existing directory. Conform to the
XDG Base Directory Specification:
"If, when attempting to write a file, the destination directory
is non-existent an attempt should be made to create it with
permission 0700. If the destination directory exists already
the permissions should not be changed."
Fixes: QTBUG-68338
Change-Id: Iaf854d69225fc46e43abae86232d749e5c247df0
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
A previous fix has caused a performance degradation while adding a
check for avoiding adding duplicated rectangles to the update list.
This patch fixes it by using a std::set instead of a QList, avoiding
duplication while using an O(log N) operation, instead of the O(N)
used before.
Fixes: QTBUG-77952
Change-Id: Ifa9fbf110e0bad60ee02a42d91281981fd98ceab
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Only allow implicit conversions when the types involved are compatible.
That means, only allow construction and copy assignment when the type
X* is convertible to type T*. This is done using SFINAE and the
std::is_convertible type trait, which makes the previous
QSHAREDPOINTER_VERIFY_AUTO_CAST obsolete.
This patch fixes compilation when a function is overloaded with
Q{Shared,Weak}Pointer of different, incompatible types. Previously, this
resulted in a compilation error due to an ambiguous overload.
Change-Id: I069d22f3582e69842f14284d4f27827326597ca2
Fixes: QTBUG-75222
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The snippet uses the Unix touch command, not qmake's touch function.
Change-Id: I71d1460447249b8941ce4bdbb494bb419e13b119
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Widgets might be destroyed when handling a dragMoveEvent, in which case
the following code will operate on dangling pointers or null pointers.
Use a QPointer to watch for the original event receiver to disappear,
and add the necessary checks for the objects we deliver events to being
null.
Change-Id: I4ca2f182540ae21113f4bea4e5c569e983cc58bf
Fixes: QTBUG-78907
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
A certain geometry adjustment was (practically) introduced in Qt 5.11,
and caused very surprising behavior, where item widgets will often
overwrite neighbouring cells. This has resulted in a number of bug
reports. Since the adjustment has such serious side effects, and does
not seem to be relevant any longer for the issue for which it was
intended, remove it here.
More details: From early Qt 4 times, QStyledItemDelegate would do some
automatic expansion of the geometry of editor widgets - but only if
the layout was RightToLeft. Hence, the effect of it was rarely
seen. QTBUG-37433 did, for Qt 5.10, and complained about it. However,
the resulting code change did not remove the adjustment, but instead
extended it to apply to the normal LeftToRight layout also. Hence,
more users experienced it, and reported it as a regression.
Also, now in Qt 5.13, it seems Qt has changed in other ways, and the
geometry adjustment no longer seems to help (or indeed make any
difference to) the original case in QTBUG-37433.
Fixes: QTBUG-78495
Fixes: QTBUG-76011
Fixes: QTBUG-68476
Change-Id: I4a4e873969eb1d89843f98fc63d90371207515d1
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
CONFIG(cross_compile) implies CONFIG(force_bootstrap). The latter is
errorneously used within qt_tracepoints.prf and to decide when
tracegen is to be build.
For the tracepoints, we just need to check if etw/lttng trace points
are enabled.
For tracegen, we don't need to check anything - it doesn't depend
on etw or lttng, it is just a code generator similar to moc or rcc
and should be handled like these tools.
Change-Id: I3784b37db10680efd0ed7ee7860059bdf62b4118
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Properly return an invalid frame when calling jumpToFrame()
with a non existent frame number.
Fixes: QTBUG-79029
Change-Id: Ic40f4a6de3106fab42c0bb6c961194be47b04e31
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Fixes runtime warnings that got triggered by change
c2d2757bcc.
Change-Id: I50620b179de8608f45d6f2ef053eeb8b1e10ae43
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This ensures that also linker commands like -pthread are returned.
Fixes: QTBUG-77159
Change-Id: If9ab3797ccfb52c6b96a4ab120c59fd8896d5466
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 4ddc50c0cd16ddd146ea9ea21d6565c8f4a5e2bc)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This variable was ignored for iOS projects, because the generated
Makefile includes xcodebuild.mk that defines its own default target.
Export PRE_TARGETDEPS to the Makefile before including xcodebuild.mk
and use it there for the dependencies of the generic build targets.
Fixes: QTBUG-41325
Change-Id: I5faa82e05570974b5a844ae95b0a012c3badc64a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Sometimes when setAlignment is called, the text stops rendering
correctly at some point. Adding relayoutDocument call to setAlignment
fixes the problem.
Fixes: QTBUG-78728
Change-Id: Iab1cf161f0c8d700804448733338c813b5bf9762
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Using desktop GL with this graphics card causes crashes e.g.
when using Qt WebEngine.
Fixes: QTBUG-58772
Change-Id: I90e12aab4475c17be262e391ff0989cebf0b3ec4
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Screen refresh rate might not be just integer but with decimal part
like, for example, 59.97 Hz. Fix calculation from raw xcb data and its
store type as it is qreal already for QScreen::refreshRate API.
Task-number: QTBUG-73911
Change-Id: Ia0494e953176c2854f0ed42c4498a29cfef16106
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
When our ELF entry point function is started by the kernel, the stack is
aligned at 16 bytes. However, the stack is expected to be off by 8, due
to a preceding CALL instruction which didn't exist. This cauases a crash
further down as the compiler may generate aligned stack access.
Change-Id: I1496b069cc534f1a838dfffd15c9dc4ef9e3869e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
If the first column is hidden in a QTreeWidget then when doing a drag
then the selected indexes will not include any that have a column of 0.
Therefore it has to account for this use std::unique to ensure that
there is only one instance of the selected items represented by the
selected indexes.
Fixes: QTBUG-35511
Change-Id: I39dff596959f30db7378ff946735ee2866778524
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This amends 1320b2f644 to keep the
behavior of removing from the main list but without re-introducing the
memory leak.
Fixes: QTBUG-77770
Change-Id: I91fa6cb71fab8d60baa35417fdb34322af11dbbb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
If there is an item already selected then the pressed position needs to
be updated regardless when selecting a new one even if it is not made
current as this will be used to determine the drag distance.
Otherwise it will start a drag within one pixel of moving due to the
fact it is doing it relative to the first item to be pressed rather than
the last.
Fixes: QTBUG-78797
Change-Id: I853041b278b2e92ccf20660f7ced945fef72527a
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Specify the type of the enum value SendPostedEventsWindowsTimerId
to be UINT_PTR to work with the g++ interpretation of enumeration
signedness and use the correct type for the returned timer id.
Fixes: QTBUG-78491
Change-Id: I7b3f306d3f60da7a21500ece5243ac90854ccf1a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The test was found crashing with software rendering in Qt 5.7.
Removing the insignification revealed that there are failures
on WinRT as well, blacklist them for the moment.
Task-number: QTBUG-78802
Fixes: QTBUG-49630
Change-Id: Ib1a3efe69d7b63cdd98c6da364ab09e0e2dbdf62
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
...instead of the qt_ meta catalogs. The qt_ catalogs
are needed for backwards compatibility and depend on
translations for now deprecated modules, such as qtscript,
that might not be installed in the system. This causes
loading the translation to fail.
Instead of the qt_ catalogs, the examples should use the
translation files for the Qt modules used, here qtbase_.
Task-number: QTBUG-69203
Change-Id: I13f5a3d6653cef8379a712fbc02ec320eea4e51a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Some AMD CPUs (e.g. AMD A4-6250J and AMD Ryzen 3000-series) have a
failing random generation instruction, which always returns
0xffffffff, even when generation was "successful".
This code checks if hardware random generator generates four consecutive
equal numbers. If it does, then we probably have a failing one and
should disable it completely.
Change-Id: I38c87920ca2e8cce4143afbff5e453ce3845d11a
Fixes: QTBUG-69423
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Since iOS 13, the cascade list for the default UI font contains
meta-families for several writing systems, such as CJK. Since
these font families were never populated to the database, we ignored
them in Qt, and thus got missing glyphs for the characters in question.
The fix is to make sure these fonts are populated in the database.
It contains a partial backport of 922d195020,
which adds the qt_isFamilyPopulated() accessor to allow us to check
if the family has been populated in the font database. In Qt 5.14,
there is public API for this in QPlatformFontDatabase, so this is
a temporary resolution until then.
Fixes: QTBUG-77467
Change-Id: Ia9ebb8a19ad2367eb764ae1496a52966b465336b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
My commit 3e7463411e adjusted the focus widget by setting
QApplicationPrivate::focus_widget directly, while there is a method for
doing this properly, including setFocus_sys() and emitting signals.
Fixes: QTBUG-77364
Change-Id: I218acf7a9de39173d282ced46def4f65594f80b4
Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The fix for QTBUG-35203 set the Alt+Right shortcut on the next
button, clobbering the Alt+N shortcut from parsing the text (similar
for other languages). Add a separate shortcut for Alt+Right since a
button may not have several shortcuts.
Amends 6714196f45.
Fixes: QTBUG-78604
Change-Id: I1367da739c35fbd011d11f850c9bc3915113c644
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>