Sometimes it's needed to show a native dialog for another process,
for example in xdg-desktop-portal-kde. In this case we have WId
of a parent window which can be used for calling
QWindow::setTransientParent(QWindow::fromWinId(...)).
Pass this transient parent to a native dialog so it could use
it as a transient parent for itself. Rename
QDialogPrivate::parentWindow() for clarity.
Change-Id: I68974ddea35f9366a0ddffe602d9d028f45e26fa
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
QStringListModel::setData documentation states that
"The dataChanged() signal is emitted if the item is changed."
This patch actually respects the doc. setData will check that the data
actually changed before sending the dataChanged signal.
[ChangeLog][QtCore][QStringListModel] setData will now emit the
dataChanged() signal only if the string set is different from
the one already contained in the model
Change-Id: I4308a6f3b4851203fb899c5e29a36076e0c32f2f
Reviewed-by: David Faure <david.faure@kdab.com>
The grayscale font-smoothing doesn't expect to be linearly blended,
as first assumed.
Amended nativetext manual test to better diagnose the native Core
Text behavior. Non-linear blending will result in the magenta
text having a dark outline against the green background.
Change-Id: I24a5f04eb1bd66fb98d621078d80ee9b80800827
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
There's no need to check the SDK at the root exclusive-build Makefile,
we can leave it to the individual build passes where the SDK variable
is available.
Fixes: QTBUG-72449
Change-Id: Ic829babf4c76e6d20812de0b94120199ebfb300c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The child imageCell is a NSView and may be retained by Cocoa,
which means it may outlive the parent QNSStatusItem.
Clear its parent pointer to avoid referencing a stale
pointer.
Task-number: QTBUG-47929
Change-Id: I6078070b8c9f512ecd034fee4e54b1d8282dabdf
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Use Objc properties instead of instance variables.
Change-Id: I4bddf2c9c824467d7c42dd5bb0c3b4aacd6b27be
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Change-Id: Id6e61a70e4ebe47896dcbc8680d1d6b06c747871
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The code path that this refers to was removed already for Qt 5.11 in
commit 53fb2c48ef.
Change-Id: I4a7ae1b89b24c0ab7ceaa43f763c7ef422ca4900
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Otherwise it gets linkified, which looks inconsistent. Instead,
use \sa for functions where QT_NO_CAST_FROM_ASCII
or QT_RESTRICTED_CAST_FROM_ASCII is referenced.
Change-Id: Ic3933d8c4c81c963215de7f3aac4d0a11e61cbc2
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Martin Smith <martin.smith@qt.io>
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>
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>
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>