There's no 64-bit ADD instruction, so we make do with ADD+ADC. This is
what Clang generates. ICC uses the two as well, but then performs some
subtractions to find out if it overflowed. GCC for some inexplicable
reason attempts to use SSE2 if that's enabled, otherwise it performs the
subtractions like ICC.
Alternative implementation which generates better code, but violates
strict aliasing:
uint *low = reinterpret_cast<uint *>(r);
uint *high = low + 1;
return _addcarry_u32(_addcarry_u32(0, unsigned(v1), unsigned(v2), low),
v1 >> 32, v2 >> 32, high);
Manual testing shows this works. tst_qnumeric passes in debug mode. MSVC
2017 15.9 still miscompiles in release mode (reported to MS as [1]).
[1] https://developercommunity.visualstudio.com/content/problem/409039/-addcarry-u32-wrong-results-with-constant-inputs.html
Change-Id: I61ce366d57bc46c89db5fffd15704d53ebd4af3c
Reviewed-by: Thomas Miller <thomaslmiller91@gmail.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This fixes qtdoc failing to build on i586 because of an assertion in
libclang since Q_QDOC is defined and thus the declaration of the
qfloat16(float) constructor and operator float() are removed, thus
their definitions should be removed too, which is what this patch
does.
Fixes: QTBUG-72725
Done-with: Michal Srb <msrb@suse.com>
Change-Id: I6424873425d46345e09f411f9ce88f2520825da4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
When the text is elided, it needs to account for the mnenomic if
there is one so it does not end up eliding the text unnecessarily.
Change-Id: I77c15067f3e8d57d8deca83090bcb80554c3733f
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This also updates the used API to use ClipData and not the deprecated
ClipboardManager API.
[ChangeLog][Platform Specific Changes][Android] QClipboard now supports
HTML and URI data.
Fixes: QTBUG-47835
Fixes: QTBUG-71503
Change-Id: I43f82bfc63b3d159087c0fb6c840c186a370e20c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
When glyphs are converted to monochrome from an alpha map,
it does not make sense to apply high quality dithering, because
the result will be that some the subpixels along the edges
that cover only part of a pixel are filled. This causes the
glyphs to look jagged and ugly.
Instead, we use ThresholdDither to fill all pixels that are
>= 50% opacity.
[ChangeLog][QtGui][Text] Improved appearance of monochrome
text on some platforms.
Fixes: QTBUG-69702
Change-Id: I0f44a8d73f6b9f1eb59f297d66438575f1e9db10
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
When eliding text we would check for the existence of the ellipsis
character and fall back to using the dot if it was not available.
However, when font merging was in use, we would also use ellipsis
from a fallback font if available. This could cause the metrics
of the text to increase if the fallback font had larger metrics,
and the result was that text could shift when elided.
It is better to prefer the dot from the current font than to use
the ellipsis from a fallback, so we only use the ellipsis if
it is in the main font.
[ChangeLog][QtGui][Text] Fixed a bug where eliding text could
change the height of its bounding rectangle for certain fonts.
Fixes: QTBUG-72553
Change-Id: Ib27fc65302465ddce661801bcc5ae32e55f1aeb9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
since we'll refuse to continue with a handshake, failing in initSslContext()
on a disabled protocol versions. Then, functions like waitForEncrypted,
connectToHostEncrypted, startServerEncryption and startClientEncryption
should either bail out early (who needs a TCP connection which we'll
abort anyway?) or bail out whenever we can, as soon as a disabled protocol
was found in a configuration. This change also makes the behavior
of different back-ends consistent, since it's a general code-path
that reports the same SslInvalidUserData error. Update auto-test to
... actually test what it claims it tests.
Task-number: QTBUG-72196
Task-number: QTBUG-72179
Change-Id: I548468993410f10c07ce5773b78f38132be8e3e0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Add environmental variable QT_QPA_QNX_DISPLAY_CONFIG for pointing
to a file containing display order. Configuration file format is:
{
"displayOrder": [ 3, 1 ]
}
Task-number: QTBUG-66394
Change-Id: I8c20eb2b5cf35617d5a030213f5d4d68e62ace85
Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
Add support for PostgreSQL 11 by adding QPSQLDriver::Version11 and use
it in qMakePSQLVersion().
[ChangeLog][QSQL][PostgreSQL] Added support for PostgreSQL 11
Fixes: QTBUG-71642
Change-Id: Ie3cd3a81fd00084b587457b91b4e92c2e7001172
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Robert Szefner <robertsz27@interia.pl>
... so we don't get into situations where a target has a relative path,
while another target depends on it with an absolute path.
Task-number: QTBUG-36768
Change-Id: Icc5b249914bb3f095f4a6542c30bacf5ea6f9ec9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Since some files are still executable (such as bash scripts) then they
should not get strip called on them when installing in those cases.
So by adding .CONFIG = nostrip, it indicates that strip should not be
called on this.
Fixes: QTBUG-60751
Change-Id: I19d502c07644daf9d487a8817c8e57d96eedab60
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The value is returned, so it would be converted to QString anyway.
This saves the allocation.
Change-Id: I1a4ec4e16bccdd23e662be9b3dd7f8f09b4197ee
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
This reverts commit 28fd625873.
We still need to have this intermedia stage to have all need
things(qtwayland and qtwebengine) landed in dev.
This revert will be reverted later.
Change-Id: I0522d5b0efb2345e5b4879424d98531f7c1b44a2
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
If empty paths is passed to the unix filesystem engine, we get a warning
about empty filename passed to function, before returning false. Fix
this by testing for empty string first, and don't send empty string to
file engine.
The current warning leads to code like
if (!filename.isEmpty() && QFile::exists(filename))
{
//
}
rather than the slightly cleaner
if (QFile::exists(filename))
{
//
}
Change-Id: I0207324889ec22e5a072c28d58337d117b0153b1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
use library objects for all variants, and inline the tests.
Change-Id: I029f9a6655a783dab4a22abf601aadbb484c03af
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
... and use that to inline the xlocalescanprint test.
Change-Id: I0973133d7f9ecc9a38b70dc4b83df174a35b2b1f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
this is implemented by means of (multiple) inheritance, which applies
specifically only to the inlined source and header list, but not to
library sources or dependencies.
Change-Id: I8f1d5b34d1d2d12e39225dc50357ad6ec648c6b6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
it works without it, but technically speaking it's undefined behavior.
Change-Id: Icdcdd5b923ce4cecd9dc9e75f9d5d66d0fa8a032
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
while the command line doesn't actually permit it (that can be
re-evaluated separately), derivatives of the inline source type may want
to inject additional paths, as is the case with opcua.
the incdir field supports multiple entries without additional action.
Change-Id: I3860ca1fc8fab25c04eb63bdb2f855b77ff3b9a4
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
this makes no difference whatsoever, because qmake isn't actually built
in a namespace, but it makes the new qtc code model happy.
Change-Id: I70ad8e16cceff73276a821219fc80bab365954b5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The new loop does 32 bytes (16 code units) at a time
Change-Id: I8f261579aad648fdb4f0fffd155412a4d77428e9
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
In some cases the DEVMODE structure is not updated with the selected
paper size, whereas the ptPaperSize structure is always set to the right
paper size. Therefore we set the page size on the printer to this after
the page dialog is shown.
Change-Id: Ieafd486232aca6e930f73a8131b7196ddecea305
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
In order to get a correctly not truncated size we need the hint to
be calculated based on the screen it is about to be shown on.
This patch places some code in QWidgetPrivate that is used by
QMenu and QToolTip + can be used to solve similar problems in the
future.
Task-number: QTBUG-72306
Change-Id: I58c058761f71b4a7675b6a078be62aa813ead752
Reviewed-by: Morten Kristensen <msk@nullpointer.dk>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The keyboard navigation with MovePageUp/Down and MoveEnd did not honor
disabled cells in all cases which lead to inconsistencies in the
navigation (esp. since MoveHome does honor them correctly).
Therefore make sure that all four move operations work consistent by
refactoring the code to use common functions.
Fixes: QTBUG-72400
Change-Id: I63fa3b626510d21c66f4f9b2b1bfb3261728ecaf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
these were new on dev while the original migration happened on 5.9, or
came from new changes which hadn't adapted yet.
Change-Id: I5e48437061a97e6df6e93881c98471455e177631
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
there is no particular reason to exclude static builds from the default.
misses are cheap now, so it's fine if nothing is found.
this affects only the legacy pre-1.1 library names under windows.
Change-Id: I998b9f7bfcce42ec990a236bb44372c4d6b3f631
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
both the mingw and msvc build have a "lib" prefix on the libraries. this
makes the msvc build unconventional, so it needs an extra source. for
the mingw build, otoh, this is the expected setup, so the source used
for unix will work just fine.
this doesn't fix any actual bug, because mingw will apparently resolve
-llibfoo to libfoo.a even though only liblibfoo.a and libfoo.lib are
documented (on mingw.org). however, this mix of conventions is ugly and
should be avoided.
Change-Id: I32b1621e4ac15db1f071c08ced738bfdafdcc11b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
don't run the openssl_headers test pointlessly when openssl-linked is
selected but its test fails. implementing this cleanly required creating
a separate openssl-runtime feature, including 'redirecting' the -openssl
option (which is just an alias for -openssl-runtime) to it.
simplify the openssl-linked conditions: while "anything but the value
that enables it" in the 'disable' field effectively means "don't
auto-detect it", it's better to be explicit about that.
Change-Id: I6b117cc50711bb64d090fcfdb89ff009c60ed86c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
this allows compile-testing the specified headers with no further tests.
Change-Id: I268ff328deee221d9b92386fe2bd133b19a6f8e2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
as it is now cheap to test for individual libraries and headers, split
the xcb_syslibs monster-library into its parts.
the compile test remains a single blob, though, as that didn't get any
cheaper. whether it's worth keeping it in the first place is debatable.
Change-Id: Id7cae7925bb4d77069437512abecf14feea749f2
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
When building ANGLE, we need the shader compiler (fxc.exe), which is not
shipped with MinGW. Previously, we required an installed DirectX SDK.
For Windows versions >= 8, the DX SDK is also part of the Windows Kit,
so we also allow the user to specify the location of the Windows Kit.
We also detect fxc on 64-bit hosts now, and in newer SDK versions which
version the binary directory.
The detected binary is now exported by configure, so the ANGLE project
file does not need to duplicate the logic anymore.
Task-number: QTBUG-52487
Change-Id: I41a17992909041dd84291b69498195cc8b8fab8a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
properly atomize the libraries and express their dependencies, and
adjust the project files accordingly.
note that we don't try to use any additional paths, as all SDKs we
currently support have built-in directx 11 support:
- msvc2013 comes with win sdk 8.1; that is also used for win7 targets
- mingw-64 5.3 (though this one is missing fxc, which is why the code
path for using an external sdk for that remains)
Change-Id: Ib44e389ef46567308293c2bbcad20a96e8ef70c7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
like all qt_*.prf files (exceptions prove the rule), the configure
system counts as private api.
Change-Id: Iea3057445e430029ecd8449e604e2d5c499ae10a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Cleanup the Itemviews examples
- use nullptr instead 0
- use for loop instead foreach
- include own header first
- remove uselss includes
Change-Id: I32e9f64356e42038707d063dcad977239ce1fe9e
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Cleanup the widgets examples - move the ValidatorWidget class into its
own source/header file instead of implementing it in main.cpp
Change-Id: I2b74ca4f2491168453dc31e0631f31e3ac83123c
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
QList::swap(int, int) was deprecated. Replace it with swapItemsAt()
Change-Id: I077c5b7222e40b928ee9035b8cbf4ebcc91aa15e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
QPalette::foreground()/background()/ColorRole::Foreground/Background
are deprecated since Qt4 times. Therefore mark them as deprecated so
they can be removed in Qt6.
Change-Id: I24a47e080241b7f16b8adde1f9f16e29133462a7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
QPalette::foreground()/background() are deprecated since 5.13 - replace
those functions with their successors.
Change-Id: I158b6403437d3d48c0859360823133ca4ced2c23
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>