...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.
This reverts commit a0b5d6e60f with the
addition of preserving permissions when copying directories to properly
install app bundles (QTBUG-74912).
Fixes: QTBUG-74733
Task-number: QTBUG-74912
Change-Id: Iee6d7c5e86787dd3ada5e5e9441209d418100b1f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
QNetworkDatagram was introduced together with
these methods in Qt 5.8 (commit 4da2dda2aa)
Change-Id: I454c26ebf6f94988cada8ac9315db1d43a31a595
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The current code only tries to load the required functions from
LIBRESOLV_SO (if defined) and resolv, but on FreeBSD they are in libc:
https://www.freebsd.org/cgi/man.cgi?query=res_query&sektion=3&apropos=0&manpath=freebsd
This commit changes the code so that, after failing to load the
non-existent libraries, it attempts to load the functions with dlsym()
using the special handle RTLD_DEFAULT, which searches for the specified
symbol in the loaded libraries.
This is a follow-up to 8eeb5150ed.
Change-Id: I19d90b0ca8703398bf4f5f4edd5ae31e346ef251
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The current code only tries to load the required functions from
LIBRESOLV_SO (if defined) and resolv, but on FreeBSD they are in libc:
https://www.freebsd.org/cgi/man.cgi?query=res_query&sektion=3&apropos=0&manpath=freebsd
This commit changes the code so that, after failing to load the
non-existent libraries, it attempts to load the functions with dlsym()
using the special handle RTLD_DEFAULT, which searches for the specified
symbol in the loaded libraries.
Task-number: QTBUG-74844
Change-Id: If97aaae233cabbfa01c30d26d9a7fb01ec3ff5c2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Includes a fixup for 03fadc26e7, which
removed the check on empty transition list, needed when no data are
available. Ensured that such a data-free zone would in fact be
noticed as invalid during init().
Fixed handling of times before the epoch (we still want to consult a
POSIX rule, if that's all that's available) while ensuring we (as
documented) ignore DST for such times.
Fixed handling of large times (milliseconds since epoch outside int
range) when looking up POSIX rules. Gave QTimeZonePrivate a YearRange
enum (to be moved to QTimeZone once this merges up to dev) so as to
eliminate a magic number (and avoid adding another). Moved
year-munging in POSIX rules after the one early return, which doesn't
need the year range.
Added test-cases for the distant past/future (just checking UTC's
offsets; SLES has a minimal version of the UTC data-file that triggers
the bugs fixed here for them).
Fixes: QTBUG-74666
Fixes: QTBUG-74550
Change-Id: Ief7b7e55c62cf11064700934f404b2fc283614e1
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This allows tools that look for matching `foo_entry/exit` pairs in the
trace data to work properly. An unmatched `_entry` would otherwise
confuse them, making them think that the call stack is continuously
increasing.
Change-Id: Idff7f587ea25c46ec86ad623cc82d503db34a194
Reviewed-by: Christoph Sterz <christoph.sterz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Additionally, we also add a Q_TRACE_EXIT which runs a trace point when
the scope is exited, leveraging qScopeGuard behind the scenes.
Q_TRACE_SCOPE uses Q_TRACE_EXIT internally - the difference is that
the _SCOPE version enforces the naming scheme of _entry / _exit for the
tracepoints, whereas Q_TRACE_EXIT can be used generically.
Change-Id: I4a2f5ea09f451fcf664d07fd493b679f7527ac06
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This allows us to deduce a lot about what a Qt application is doing,
since the debug output usually contains a lot of information.
Change-Id: I28a18afd151a1640a44ba8c7c9cd87d5d66c99b0
Reviewed-by: Christoph Sterz <christoph.sterz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This patch fixes compilation with `-trace lttng` or `-trace etw`. We
need to forward declare QEvent, QImageReader etc., otherwise the types
will be unknown while compiling the trace points.
In order to handle this generically, the tracegen utility is extended
to support a 'prefix text' in the `*.tracepoints` input files. Any
text within curly braces will be embedded as-is in the generated file.
This can then be used to add forward declarations for the types we
need, including potential namespaces and such.
Change-Id: I5cb16763ce0fcb48ce3ea4577578d468ff3a4f4b
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Remove the canCopy() check which is not required and pass up the error
message. Remove special characters and use the base name of the display name
which can be an URL.
Task-number: QTBUG-71785
Change-Id: I22966cb8d1f5bca0bbca71cf3ebe66e4ede1a747
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
oss-fuzz found at least width is sometimes not initialized, and we're
initializing almost all of them in most cases so be complete.
the oss-fuzz instance was
==1==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x667c43 in operator!= /src/qtbase/src/corelib/tools/qsize.h:173:25
#1 0x667c43 in setup_qt /src/qtbase/src/gui/image/qpnghandler.cpp:403
Change-Id: Idb9aaf5ab85509d9c893beaf8d9118339ba46be7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The only use of this method got removed already in commit bebae37376.
Change-Id: I9757cbe34710efd9a9d31c74f81e01da40453ff9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This runtime warning was recently introduced in the fix for an
assert/crash when creating a brush with an invalid Preset
value. However, that overlooked the usage where an unknown value is
passed to QGradient constructor, and the code afterwards checks if
the result is a NoGradient or not. It turns out that such usage is
already established as legitimate, including in the Qt Quick Rectangle
code, so this warning would be spit out continuously for perfectly
legal qml code.
Change-Id: Id60aed0817da0214b6cf17edd245f67e26470413
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Hardcoding IP addresses and their respective DNS records is fragile.
We care about Qt producing the same result as other DNS querying tools,
so testing that instead.
Running a python script for this is easiest, and assumed to be quite
reliable.
In case where python fails/is not present, fall back to nslookup.
That tool is available on Linux, macOS, and Windows, although the
output it produces varies. This change implements very basic
line-parsing that can interpret the various results encountered
during testing on those platforms.
This also reverts commit bbaceff253fae13d8e56691bc9de7e1981db5118,
which blacklisted the tests that failed due to changes in DNS
records.
Use the opportunity to replace usage of gitorious.org.
Change-Id: I967de226bd603c805df7fe3ed4e871d92d2d0750
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
qatomic.h included qbasicatomic.h which included qatomic.h.
Due to a define in qbasicatomic.h, the definitions from QAtomic would
change depending on which was included first. Fortunately qbasicatomic
does not need qatomic.h so the include can be removed.
Change-Id: I086009f2e16a6e20b2b76fc6b3bf66a343414206
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This reverts commit 3cdf46059a.
It seems change is causing regression & is reverted now to be able to
proceed with releases
Task-number: QTBUG-74912
Change-Id: Ib2365b96ee98fbbcc8853cc7f8726c157c1913a7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Typing in invalid URLs results in empty result lists.
Emit rejected() in this case.
Task-number: QTBUG-71785
Change-Id: Ia257b85a5c4370227f753752f6a473bbb3a054be
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
...starting with Qt 5.0.0.
The text is manually inserted there, because \since does not work
within sections.
Task-number: QTBUG-74737
Change-Id: I0fe2d0a113d48be0266030c8466b062c6f743aab
Reviewed-by: Robert Szefner <robertsz27@interia.pl>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
- Remove unused dummyWidget and thus empty slots initTestCase(),
cleanupTestCase().
- Add slot cleanup() checking for an empty top level widgets list
and introduce QScopedPointer to ensure it passes.
- Use QTRY_VERIFY in hideAndShowOnWindowStateChange().
Flakyness has been observed on openSUSE:
FAIL! : tst_QSizeGrip::hideAndShowOnWindowStateChange(Qt::Window) '!sizeGrip->isVisible()' returned FALSE. ()
Loc: [tst_qsizegrip.cpp(126)]
Change-Id: I340fc1892dc00bcff1985e5a8a1e535975736484
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
It was needed to allow lazy resize of the backingstore IOSurfaces, but
that feature hasn't been enabled yet, and explicitly setting the layer's
contents placement to NSViewLayerContentsPlacementTopLeft resulted in
the layer animating when the window was moved from screens of different
scale factors.
We need to investigate this further, but in the meantime fix the
visual regression by disabling the explicit layer contents placement.
Change-Id: I63ea1eab9cf3fa6480e88844918ed98e6aa72620
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
GetFileInformationByHandleEx() which is used to to obtain the ID, has been
found to fail on FAT32 (USB removable drives). Fall back to
GetFileInformationByHandle() for these.
Fixes: QTBUG-74759
Change-Id: Ib3ef60a6bf9e9edaf41af86bf71666001cb0aa58
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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>
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>
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>
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>
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>
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>
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>
After 'h2c' mode was implemented with the proper protocol
upgrade, the previously working 'direct connection' mode
was lost for clear text connections due to the erroneous
logic in the constructor: having !channel->ssl does not
necessary mean we started with HTTP/1.1 request, including
protocol upgrade header; it can also mean we connected a
plain socket and immediately sending h2 frames, without
any H2 negotiation at all.
Fixes: QTBUG-74765
Change-Id: Ice466d6bffb40048b7ab46fb064f2d3d795a12aa
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The DNS entry for the host has changed, dig answers with dns.google,
not with google-public-dns-a.google.com. While developing a proper
fix to the test, blacklisting this particular lookup allows
integrations to pass in the meantime.
Change-Id: Id37da6b24554803bf4e2c84be5b949ded40566e8
Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Avoid using inline assembler
Task-number: QTBUG-72716
Change-Id: I696efb5a787416eb4fc5ba3a250461aaa9a4afc2
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Do not categorize the license anymore as 'Public Domain', because the
actual text is not explicit on whether it allows modifications. Instead
show the original license text.
Also remove the Homepage link, which now just displays (arguably
outdated) information about patents.
Finally, do not misuse the "Version" field for metadata information,
use the newly introduced "PackageComment" field instead.
[ChangeLog][Third-Party Code] Changed classification of the wintab
license from Public Domain to Custom.
Fixes: QTBUG-74453
Change-Id: Ibae36be1deee3b9c498c45d03ed741c3d5ff630c
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Otherwise it can happen that we pick up the tool for the host system,
which will break compilation.
Users can still pass
-psql_config /path/to/pg_config
or
-mysql_config /path/to/mysql_config
manually.
[ChangeLog][QtSql] When cross-compiling pg_config, mysql_config
are not looked up in PATH anymore. Pass -psql_config path/to/pg_config
or -mysql_config path/to/mysql_config to explicitly enable PSQL or
MySQL in this setup.
Fixes: QTBUG-73565
Change-Id: I35ff32322bac69f1575ce6c846a56ac2ae3b8d55
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>