This is used to set the default QPA platform and without it
all Gui applications trigger an assert in QString:-/
This is way simpler than going through configure.json.
Change-Id: I2c053e95c0f7e99e97a0b2918d8e4ac13d3494fd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
If the result is unassigned then resulting QScopeGuard is destroyed
immediately, we can warn about it, as it is definitely a bug.
Change-Id: I627b05cecb3d0e62dbc24373e621f2be36d9b324
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The test was never used or compiled, it has to be fine to add it :-)
Change-Id: If210c19515a545a6dbaef18a16dc018c0348070d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
when using qt5_add_big_resources.
The previous approach of just setting SKIP_AUTOMOC and SKIP_AUTOUIC
on the generated source files is not enough because if AUTOMOC is
globally enabled, AUTOMOC will still run for the
rcc_object_{outfilename} target, which ends up creating a
mos_compilation.cpp.o file and adding it as a target object to the
target.
Thus later when $<TARGET_OBJECTS:rcc_object_${outfilename}> is passed
to the rcc invocation, the expression evaluates to a list of two
files: the rcc-related .o file and the mocs_compilation.o file.
Obviously that breaks the rcc invocation.
The fix is to disable AUTOMOC and AUTOUIC on the whole target, instead
of just the source files. This prevents the creation of the
mocs_compilation.cpp file.
Fixes: QTBUG-74270
Change-Id: I51f757b110e940fe224010acb25b88c52ef612b1
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Add a helper routine to look up the dom classes by attribute name and
change Driver::widgetByName() and Driver::actionByName() to use that
as does Driver::actionGroupByName() (all these functions are called
with names from the XML files).
Remove the name normalization in
WriteInitialization::findDeclaration() and refactor
WriteInitialization::acceptActionRef() to call findOrInsert() to
correctly use the unique name.
Task-number: PYSIDE-797
Change-Id: I34058361964719c442182faf798f055f11b40412
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
This enables overriding the macro so that it translates
to 'None' in the Qt for Python context.
Change-Id: Ib3cecf57eeb0405a1929309b71e9f012a07f11cf
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
The function name QTextCursor::positionInBlock() may give users the
idea that it can be displayed to the user as the visual position of
the cursor in the current block. This becomes confusing with some
writing systems, since e.g. a surrogate pair will count as two
characters while only representing a single visual grapheme.
Since it is an side effect of the encoding that will be unexpected to
many, and since it also touches on some linguistic complexities, we
add a note to the documentation to make users aware of the
consideration needed.
Task-number: QTBUG-74725
Change-Id: Iba28ba8a6ad07ee38dbb7e6a5a4b68c93d4da76a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: René J.V. Bertin <rjvbertin@gmail.com>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
(fullscreen as in use the entire canvas area, without
showing window decorations)
This is a better default for Qt on the web where window
decorations are not common. We also avoid the “window
close” trap, where there is no way to re-open a closed
main window.
Change-Id: Ie0fbf6ada3f49244bee765ea882acb473809e715
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
More specifically, for masks and rotated images.
Add tests for it, also add tests that image metadata is
forwarded for converted and copied images.
Fixes: QTBUG-49259
Change-Id: I05d4a468b17f53a2625500b871c01b2c53b981a1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Also add a test checking that devicePixelRatio is forwarded to
derivatives of QPixmap.
Change-Id: Idb2b3f033ccc0fd49bf54b11f5dffbce5a19b006
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
A string can parse as a non-zero double that's smaller than the
smallest float yet be a faithful representation of the smallest float.
So rather than testing for non-zero doubles less than the smallest
float, test for non-zero doubles that cast to float zero; these
underflow. This means small values close below the smallest float
shall round up to it, rather than down to zero, requiring a tweak to
an existing test. Added a test for the boundary case (and tidied the
test data).
Fixes: QTBUG-74833
Change-Id: I4cb30b3c0e54683574b98253505607caaf88fbfb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Convert an example to use QRandomGenerator::global().
This saves the need for seeding.
At the same time, use continuum random values rather than discrete
ones, to better fit what the example using it is doing.
Change-Id: I0adebaadb2e35832c629e314fda37e60b51f760d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Various patterns seem to have been copied, notably counting time from
QTime(0, 0) rather than using QTime::msecsSinceStartOfDay() and its
setter. Unsuitable value types also put in an appearance, and
QTime()'s parameters after the first two default to 0 anyway.
Corrected a lie in QTime()'s default constructor doc; it does not work
the same as QTime(0, 0) at all.
Change-Id: Icf1a10052a049e68fd0f665958f36dbe75ac46d5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We should get the correct stylus position from the valuators,
not from the X11-provided global position. Global position is rounded
to the nearest FP16 values, which is not enough for smooth painting.
[ChangeLog][Platform Specific Changes][X11 / XCB] QTabletEvent
coordinates now come from AbsX/AbsY valuators in the X11 event, in
more precise 32.32 fixed-point format, scaled to fit the virtual
desktop. It's possible to revert to using the legacy 16.16-format
event_x/event_y coordinates as in previous releases by setting the
QT_XCB_TABLET_LEGACY_COORDINATES environment variable.
Task-number: QTBUG-45375
Fixes: QTBUG-48151
Change-Id: Ie701446b3586296bcb8fb09158f387ba6a7cbf07
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
for the case a custom style sheet is in use and QStyleSheetStyle
replaces the widget (close button) with its parent (QTabBar).
We still need this button though to compare against tabButton
on a hovered tab. This allows us to have, indeed, native-looking
tabs as documented (aka similar to Safari or the "Terminal" application).
Change-Id: I53ff78699e705db6d7c7b84774b8e188a1277535
Fixes: QTBUG-61092
Fixes: QTBUG-74689
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This reverts commit 300940a6c9.
The fixes for leaf modules landed already.
Task-number: QTBUG-74816
Change-Id: I1c7f0705c20d030419ceedca485106af73946b3c
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
This is done by adding a QWindowPrivate::allowsClickThrough() function,
so this could easily be adapted later on if desired for other
platforms.
Fixes: QTBUG-41126
Change-Id: I1157e5e7e7667ff11d1a5d21b3ce8c4b13202272
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The QBrush constructor taking a QGradient would assert or crash if
passed a null (NoGradient) gradient. But it is not necessary for the
API to be as brittle as that: instead the result can simply be a null
QBrush object, i.e. the same as the default QBrush() constructor
creates (style == NoBrush).
This issue comes up now since with the recent introduction of
QGradient presets, the API opens for using QGradient directly, whereas
earlier, only the subclasses QLinearGradient etc. were to be used.
Fixes: QTBUG-74648
Change-Id: I1a9b1c4654e4375aa6684700a262cc0946851448
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
HTMl does not have per-element resize events, which
means Qt has not way of knowing that a canvas has been
resized and that the canvas buffer size should be updated.
Depending on the use case, the hosting JavaScript code
that caused the canvas resize could also inform Qt
that the canvas has been resized. Add API to do this,
which calls the existing canvas/screen resize implementation.
Other solutions taken/not taken:
- browser window resize events: these are available,
and we install an event handler in qwasmeventtranslator.cpp.
- DOM mutation events: would detect changes to the
the size attributes themselves, but not if the size
indirectly changed, e.g. “width: 100%” depends on the
parent width. Not implemented.
Change-Id: Ib324bb30f523e9fceea68000b95bf857a1d36b6c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
For applications that set VERSION the installation targets of pdb
files were wrong in qmake's nmake Makefile generator.
Replace code that tries to reconstruct that target's versioned
extension with TARGET_EXT which already contains the fully resolved
target extension.
Fixes: QTBUG-74265
Change-Id: I9553a5f70170e077a59c866079ae51647ae80bef
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
...like the install commands before Qt 5.9 did.
This ensures consistent permissions. Also, we can throw away the code
that took care of removing and re-adding the read-only flag on Windows.
Change-Id: I06bc3af8817f18c016119fbcb7360800d6c129bd
Fixes: QTBUG-74733
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
qVariantFromValue/qVariantSetValue() was marked as obsolete since Qt4.
Therefore mark them as deprecated with Qt5.14.
Since QVariant::setValue/fromValue() were using the now deprecated
functions move the implementation to them and let
qVariantFromValue/qVariantSetValue() call
QVariant::setValue/fromValue().
Fixes: QTBUG-74043
Change-Id: I46617cc4d5c1e8c162d0f1f7ae32e4cfe9ce915c
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
QListWidget::setBackgroundColor() is a virtual function. Hiding this
function when compiling/linking against QtWidgets when
QT_DISABLE_DEPRECATED_SINCE is set will therefore screw up the vtable
and it will crash on runtime.
Therefore don't surround them with QT_DEPRECATED_SINCE macro.
Fixes: QTBUG-74665
Change-Id: Icb0f253117a1e55a338d2d6969ec2d59fbd0679d
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: David Faure <david.faure@kdab.com>
0bc4288689 in Qt 5.6 introduced support for premultiplied alpha in the
raster-rendered QWidget content. Unfortunately this introduced a
regression for OpenGL content from QOpenGLWidgets with WA_StacksOnTop
set: these used standard alpha blending in 5.5 and earlier, and
switching them to premultiplied (in case the - unrelated - raster
content has a _Premultiplied QImage format) breaks all content that
was done with non-premultiplied alpha in mind, for example the qopenglwidget
example's "Transparent background" checkbox.
Restore the pre-5.6 behavior.
Fixes: QTBUG-74285
Change-Id: I76fcadd53cd436efa2b619b8d6739270995d044f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
When cross compiling on Ubuntu with LTO enabled, the linker will complain about the "-fno-fat-objects" parameter even if the "-fuse-linker-plugin" is passed it.
But if the "-fno-fat-objects" parameter is removed, the linker will complain about "don't support linker plugin in this mode".
Remove both parameters can fix this.
Change-Id: I2d792ca70737f2e82a360bfc597f2b110513b954
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This reverts commit 7a64ffb773.
This change landed in 5.13 too early, so there is no baseline with both APIs in
dev. This will be reverted later when the fixes for leaf modules landed.
Task-number: QTBUG-74816
Change-Id: Ie5ee41fbf6be53b8fcb4289ac1ec3974e5bf6e42
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>