The test erroneously succeeds on macOS with an XCode generator.
Explicitly set the test result to be turned off.
Change-Id: Id6fcb96f420f611517e81cc3697f1c88b508bd7c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
They are not needed per se for a host build, but they are still
needed for a cross build (because we don't build tools in that
case).
Task-number: QTBUG-74133
Change-Id: I891e3852c6846119956982a7bdbf449ad7c4836c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Remove the constructors, destructors in favor of member initialization.
Change-Id: I323826328fb783ea2cd931c0e6aad45a98a2ebeb
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Can be used to make smaller binaries, and possibly speed up ARGB32
rendering on some platforms.
Change-Id: I7647b197ba7a6582187cc9736b7e0d752bd5bee5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Extend the history by a persistent model index list
reflecting the selection.
[ChangeLog][QtWidgets][QFileDialog] The widgets-based dialog now
remembers the selected files when navigating the history
Fixes: QTBUG-71415
Change-Id: I86774439be070c1b922acd0e9a27d029f02f68d3
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The central loop starts by reading five bytes; but
the loop condition only checked that four were available.
Change-Id: I244cecacabeffbac10ad94081f32847f912d95d9
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: hjk <hjk@qt.io>
The find_package() call for WrapOpenGL was moved to the beginning of
the src/gui project file. This was incorrect, because the features
were not yet computed at that time, and the find module was incorrectly
always choosing the Desktop GL implementation.
Move the find_package() after the add_qt_module() call.
Amends 4f736db08c.
Task-number: QTBUG-74133
Change-Id: Ice1da8f23275843c7285ec748e6d673edbffffac
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
When installing directories, QINSTALL must not ignore contained hidden
files to be consistent with the old INSTALL_DIR.
Fixes: QTBUG-66835
Change-Id: I3a7c952dcac9732d5b17c5a258f87ca277b388d2
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Some of the Qt names were wrong. Fix them and remove the work-arounds
in the library mappings.
Change-Id: I9b9afa3fb35c578e5c8d9cdef77224eb072ec8da
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This patch makes sure to store unchanged filenames as taken from qmake
into the scopes it creates.
The scopes are then kept longer: Merging/including scopes is handled by
adding the scope to a private _included_children member of the parent scope.
The methods to access data from scopes are then changed to take the
_included_children into account and a new "get_files" method is added,
that does all the necessary mapping to handle scope-dependent things like
$$PWD, etc.
This makes sure src/network is converted correctly incl. all the .pri-files it
includes as well as src/platformsupport/themes.pro. Both have been troublesome
before.
Change-Id: I28e92b7bcee1b91b248c17201c2729a54a3ce4a1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Include the current directory in the scope __repr__ output to make
it easier to understand where things wrt. include or file names go
wrong.
Change-Id: I09a6c17c6d8d547f1f64801bcde3c2e10c925ee1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
/GM at one point apparently was set by default for debug builds. However,
nowaways it's officially deprecated and even generates a warning in
Visual Studio 2019; so we don't have to 'unset' it specifically anymore.
Change-Id: I5b9b93c058c2ee8a5e025da43251d3859acbe061
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The comment hints that it's fixing an issue in Visual Studio 2013, which
we don't support anymore.
In all supported Visual Studio Versions -Gm is actually deprecated
anyhow, and not set anymore by default. So I guess it's safe
to remove the special handling here.
Change-Id: I2e8ff85350ba651d9a763aabba7b6494ba88d82e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
qprintengine_win.cpp(1117,14): warning: comparison of two values with different enumeration types in switch statement ('QPrint::DuplexMode' and 'QPrinter::DuplexMode') [-Wenum-compare-switch]
case QPrinter::DuplexShortSide:
Change-Id: Ib5028d80ecf7f6bb9eb0562e5c137acfeb709a14
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This patch updates the code from the deprecated QRegExp class to
QRegularExpression.
Task-number: QTBUG-25485
Change-Id: I946790f50c6b14787bca31771de5e3a0d5fefe4c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This reverts commit bcd2fa484a.
There was a report that this caused infinite recursion on some
systems, so we revert it for now and re-add it later when the
issue has been resolved.
Task-number: QTBUG-74983
Change-Id: I747e0437232d72d7a87eb602b10fa09c7130ce8f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Leads to a huge loss of context for people trying to understand
and maintain that code. Replacing with proper types to ensure
better readability and maintenance.
Change-Id: I9900b743e8b7fe11bcc7db9ce3191c89f8718afc
Reviewed-by: Mike Krus <mike.krus@kdab.com>
to test different h2 modes: "h2c" (clear text with protocol upgrade),
"h2" (encrypted, negotiating via ALPN extension), "h2-direct" (encrypted,
no ALPN), "h2c-direct" (plain text, no protocol upgrade). This patch-set
is an amendment to the recent fix in the protocol handler where we were
crashing in "h2c-direct" mode.
Change-Id: I3ff5ed1396a59b72b59a95f927d404ccd202d0b8
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
We were using low precision dx/dy for calculating the starting point which
meant we could be off when clipping at high scale factors.
Fixes: QTBUG-60782
Change-Id: I883f9aed1346fdffae070b6316ea808b83519701
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Updated to https://github.com/thiagomacieira/tinycbor commit
ac9369d8ec8511bc7516266ae6b07f7da860c954.
Fabrice Fontaine (1):
fix undefined encode_half in json2cbor
Pedro Oliveira (1):
Fixed minor error in the example code.
Svyatoslav Phirsov (2):
Typo fixed in stdlib fread(...) usage
typo in dumprecursive return type
Thiago Macieira (9):
Install the tinycbor-version.h header.
Update version number for a possible but unlikely 0.5.3 release
Fix#137: off-by-one error in UTF-8 decoding
Update Travis CI to Ubuntu Xenial
Pretty: fix use of uninitialised variable
Validation: fix out-of-bounds access when content ends in a string
Parser: apply the same memory-check update
Tests: remove useless comment
Tests: Catch an earlier QCOMPARE failure in compare()
phirsov (6):
Fix off-by-one causing buffer overflow in open_memstream
Protect macro argument expansion using parentheses
eliminating misleading messages in case .config file not yet created
Run check silently in Travis
Make AppVeyor test suit run silent as in Travis
enhancement #149 implemented: access half-precision floating point data as single float
Change-Id: I9e3d261ad9bf41cfb2b6fffd159088f1cc9b3b02
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The test changes the current directory to the test directory
in fromUserInputWithCwd(), but did not restore it, causing:
Totals 898 passed, 0 failed, 1 skipped, 0 blacklisted, 368ms
********* Finished testing of tst_QUrl *********
QTemporaryDir Unable to remove "C:\\TEMP\\tst_qurl-ryVxqu" most likely due to the presence of read-only files.
Restore the old directory at the end to fix this.
Change-Id: I62669868f3c6d97dd38ebac76515428c14b7e1e7
Reviewed-by: David Faure <david.faure@kdab.com>
Move the code returning whether a popup should use the full
screen to QStylePrivate and use for QMenu and QComboBox.
Task-number: QTBUG-73231
Change-Id: I1901ecedfa90edf16329ce3b13ef4abea5ab44e8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The native Windows allows for typing in http[s] URLs directly (without
checking existence). Pass these up.
Fixes: QTBUG-71785
Change-Id: I60237bab596ca3f52e6f513f17544ff94e9080da
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Add a helper for replacing "::" by "." for Python.
Task-number: PYSIDE-797
Change-Id: I017d430b0b8b2ffbbd3300d583603924fee4d479
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Use the language helper for dereferencing pointers and end of line.
Task-number: PYSIDE-797
Change-Id: Icbca9015f2a3e8800ad4a56edf8fef9ee43f4528
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Store the result of QStyleHelper::dpiScaled() or functions dependent on it
in a variable, preparing the addition of a DPI parameter.
Task-number: QTBUG-45055
Change-Id: Ic70d65b590793c29a4b1f7a7a5312dd169517fc5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@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.
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>
Tests and their helpers should only be used in the build directory.
Change-Id: I5aa9fcf734b6b3667f91df7c84d083f944c452c9
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Apparently calling set_package_properties with TYPE REQUIRED and
then calling feature_summary with FATAL_ON_MISSING_REQUIRED_PACKAGES
and PACKAGES_NOT_FOUND is not enough to make CMake fail when not
finding a required package.
You have to explicitly set REQUIRED_PACKAGES_NOT_FOUND to force
feature_summary to fail when a package is not found.
Do this, and also explicitly add the rest of the NOT FOUND cases,
to get a slightly clearer overview what kind of packages were not
found.
Task-number: QTBUG-74133
Change-Id: Id21af13dafafe0a458cff479e8abbc6aa7e6a3f7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
When cross-compiling Qt using a Yocto sysroot, if the sysroot
already contains an installed Qt version, and a project (library
or executable) does not explicitly link against all of its
Qt dependencies, the cross linker will try to find a suitable library
in the sysroot ./lib folder.
This mighy lead to issues, because the linker will pick up an
installed Qt library which might have different symbol versioning,
and thus cause linker errors.
This happened with the print support module.
Make sure the print support module explicitly links against the newly
built Qt modules.
Task-number: QTBUG-74133
Change-Id: I876b1507c655673831e78dcfe737a5ede2a8c087
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
QTimer::singleShot is optimized for zero timeouts when using the API
taking a string method name. This optimization was not used for the API
taking a PMF or functor. This patch adds it, making the various API
calls behave similarly from a performance point of view.
The approach taken here requires a QObject context object. If none is
available, e.g. a nullptr was passed explicitly, or the
QTimer::singleShot(O, Functor) API was used, the optimization could
not easily be applied. This is not only bad from a performance POV,
but also poses as a potential source for heisenbugs: Using the
different API versions of QTimer::singleShot would use different code
paths internally, which then would not ensure the expected slot call
order. This problem actually existed already when mixing the
string-based slot syntax with PMF/functors in the QTimer::singleShot
API.
This patch overcomes this hurdle and fixes all of the above: When we
encounter a 0ms single shot timer, and no QObject context object is
available, we fall back to the main thread, or create a temporary
QObject for any other thread. The updated and extended benchmark
shows that this is still a significant performance improvement
over using a timer:
********* Start testing of qtimer_vs_qmetaobject *********
Config: Using QtTest library 5.14.0, Qt 5.14.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 8.2.1 20181127)
PASS : qtimer_vs_qmetaobject::initTestCase()
PASS : qtimer_vs_qmetaobject::bench(singleShot_slot)
RESULT : qtimer_vs_qmetaobject::bench():"singleShot_slot":
7.48 msecs per iteration (total: 748, iterations: 100)
PASS : qtimer_vs_qmetaobject::bench(singleShot_pmf)
RESULT : qtimer_vs_qmetaobject::bench():"singleShot_pmf":
7.20 msecs per iteration (total: 720, iterations: 100)
PASS : qtimer_vs_qmetaobject::bench(singleShot_functor)
RESULT : qtimer_vs_qmetaobject::bench():"singleShot_functor":
6.79 msecs per iteration (total: 679, iterations: 100)
PASS : qtimer_vs_qmetaobject::bench(singleShot_functor_noctx)
RESULT : qtimer_vs_qmetaobject::bench():"singleShot_functor_noctx":
6.92 msecs per iteration (total: 693, iterations: 100)
PASS : qtimer_vs_qmetaobject::bench(invokeMethod_string)
RESULT : qtimer_vs_qmetaobject::bench():"invokeMethod_string":
7.34 msecs per iteration (total: 735, iterations: 100)
PASS : qtimer_vs_qmetaobject::bench(invokeMethod_pmf)
RESULT : qtimer_vs_qmetaobject::bench():"invokeMethod_pmf":
6.90 msecs per iteration (total: 690, iterations: 100)
PASS : qtimer_vs_qmetaobject::bench(invokeMethod_functor)
RESULT : qtimer_vs_qmetaobject::bench():"invokeMethod_functor":
6.62 msecs per iteration (total: 662, iterations: 100)
PASS : qtimer_vs_qmetaobject::benchBackgroundThread(singleShot_slot)
RESULT : qtimer_vs_qmetaobject::benchBackgroundThread():"singleShot_slot":
7.45 msecs per iteration (total: 745, iterations: 100)
PASS : qtimer_vs_qmetaobject::benchBackgroundThread(singleShot_pmf)
RESULT : qtimer_vs_qmetaobject::benchBackgroundThread():"singleShot_pmf":
7.46 msecs per iteration (total: 747, iterations: 100)
PASS : qtimer_vs_qmetaobject::benchBackgroundThread(singleShot_functor)
RESULT : qtimer_vs_qmetaobject::benchBackgroundThread():"singleShot_functor":
6.70 msecs per iteration (total: 671, iterations: 100)
PASS : qtimer_vs_qmetaobject::benchBackgroundThread(singleShot_functor_noctx)
RESULT : qtimer_vs_qmetaobject::benchBackgroundThread():"singleShot_functor_noctx":
13.75 msecs per iteration (total: 1,376, iterations: 100)
PASS : qtimer_vs_qmetaobject::benchBackgroundThread(invokeMethod_string)
RESULT : qtimer_vs_qmetaobject::benchBackgroundThread():"invokeMethod_string":
7.05 msecs per iteration (total: 706, iterations: 100)
PASS : qtimer_vs_qmetaobject::benchBackgroundThread(invokeMethod_pmf)
RESULT : qtimer_vs_qmetaobject::benchBackgroundThread():"invokeMethod_pmf":
6.70 msecs per iteration (total: 670, iterations: 100)
PASS : qtimer_vs_qmetaobject::benchBackgroundThread(invokeMethod_functor)
RESULT : qtimer_vs_qmetaobject::benchBackgroundThread():"invokeMethod_functor":
6.58 msecs per iteration (total: 658, iterations: 100)
PASS : qtimer_vs_qmetaobject::cleanupTestCase()
Totals: 16 passed, 0 failed, 0 skipped, 0 blacklisted, 20977ms
********* Finished testing of qtimer_vs_qmetaobject *********
Without the change to qtimer.cpp, the results are:
********* Start testing of qtimer_vs_qmetaobject *********
Config: Using QtTest library 5.14.0, Qt 5.14.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 8.2.1 20181127)
PASS : qtimer_vs_qmetaobject::initTestCase()
PASS : qtimer_vs_qmetaobject::bench(singleShot_slot)
RESULT : qtimer_vs_qmetaobject::bench():"singleShot_slot":
7.45 msecs per iteration (total: 745, iterations: 100)
PASS : qtimer_vs_qmetaobject::bench(singleShot_pmf)
RESULT : qtimer_vs_qmetaobject::bench():"singleShot_pmf":
112.84 msecs per iteration (total: 11,285, iterations: 100)
PASS : qtimer_vs_qmetaobject::bench(singleShot_functor)
RESULT : qtimer_vs_qmetaobject::bench():"singleShot_functor":
115.62 msecs per iteration (total: 11,563, iterations: 100)
PASS : qtimer_vs_qmetaobject::bench(singleShot_functor_noctx)
RESULT : qtimer_vs_qmetaobject::bench():"singleShot_functor_noctx":
110.81 msecs per iteration (total: 11,082, iterations: 100)
PASS : qtimer_vs_qmetaobject::bench(invokeMethod_string)
RESULT : qtimer_vs_qmetaobject::bench():"invokeMethod_string":
7.04 msecs per iteration (total: 704, iterations: 100)
PASS : qtimer_vs_qmetaobject::bench(invokeMethod_pmf)
RESULT : qtimer_vs_qmetaobject::bench():"invokeMethod_pmf":
6.62 msecs per iteration (total: 662, iterations: 100)
PASS : qtimer_vs_qmetaobject::bench(invokeMethod_functor)
RESULT : qtimer_vs_qmetaobject::bench():"invokeMethod_functor":
6.62 msecs per iteration (total: 662, iterations: 100)
PASS : qtimer_vs_qmetaobject::benchBackgroundThread(singleShot_slot)
RESULT : qtimer_vs_qmetaobject::benchBackgroundThread():"singleShot_slot":
7.45 msecs per iteration (total: 746, iterations: 100)
PASS : qtimer_vs_qmetaobject::benchBackgroundThread(singleShot_pmf)
RESULT : qtimer_vs_qmetaobject::benchBackgroundThread():"singleShot_pmf":
118.42 msecs per iteration (total: 11,842, iterations: 100)
PASS : qtimer_vs_qmetaobject::benchBackgroundThread(singleShot_functor)
RESULT : qtimer_vs_qmetaobject::benchBackgroundThread():"singleShot_functor":
119.35 msecs per iteration (total: 11,936, iterations: 100)
PASS : qtimer_vs_qmetaobject::benchBackgroundThread(singleShot_functor_noctx)
RESULT : qtimer_vs_qmetaobject::benchBackgroundThread():"singleShot_functor_noctx":
130.96 msecs per iteration (total: 13,096, iterations: 100)
PASS : qtimer_vs_qmetaobject::benchBackgroundThread(invokeMethod_string)
RESULT : qtimer_vs_qmetaobject::benchBackgroundThread():"invokeMethod_string":
8.08 msecs per iteration (total: 808, iterations: 100)
PASS : qtimer_vs_qmetaobject::benchBackgroundThread(invokeMethod_pmf)
RESULT : qtimer_vs_qmetaobject::benchBackgroundThread():"invokeMethod_pmf":
6.79 msecs per iteration (total: 680, iterations: 100)
PASS : qtimer_vs_qmetaobject::benchBackgroundThread(invokeMethod_functor)
RESULT : qtimer_vs_qmetaobject::benchBackgroundThread():"invokeMethod_functor":
7.49 msecs per iteration (total: 749, iterations: 100)
PASS : qtimer_vs_qmetaobject::cleanupTestCase()
Totals: 16 passed, 0 failed, 0 skipped, 0 blacklisted, 153995ms
********* Finished testing of qtimer_vs_qmetaobject *********
Additionally, this patch adds a unit test to verify that the slot call
order for 0ms single shot timers is followed while mixing the various
API versions. It fails without this patch but passes now.
Finally, another test is added to verify that using QTimer::singleShot
before a QCoreApplication was constructed is still working properly.
Change-Id: I0d6211554b6198cb3e527be9ec3adc572b1b54ee
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Until now, QEasingCurve was not streaming all it's internal state.
Therefore, doing store/reload operation through QDataStream would not
yield the same curve as the original. This patch fixes it.
[ChangeLog][QtCore][QEasingCurve] QEasingCurve now properly streams all
the data needed to QDataStream.
Change-Id: I1619501f5b4237983c8c68e148745a5e58863f55
Fixes: QTBUG-68181
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
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>