Commit Graph

37889 Commits

Author SHA1 Message Date
Thiago Macieira
ea9f11b038 Add a note about virtual_hook
Change-Id: I1ff3b344ec5a4499bb25fffd156b2bf6a7d88625
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-12-07 18:52:18 +00:00
Thiago Macieira
ec31953007 Fix build using Windows SDK 10.0.17763
c:\qt\qt5\qtbase\src\3rdparty\libjpeg\src\jmorecfg.h(242): error C2371: 'boolean': redefinition; different basic types
c:\program files (x86)\windows kits\10\include\10.0.17763.0\shared\rpcndr.h(193): note: see declaration of 'boolean'

Instead of trying to guess if a certain header has been #included and
whether that header does typedef something to boolean, let's just use
the preprocessor to hide, like some people do for X11/Xlib.h's Bool (see
qmetatype.h where we refused).

Change-Id: I05b8d7ba19004af99f3cfffd15693a87e175f05d
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-12-07 18:52:16 +00:00
Gatis Paeglis
28fd625873 configure: remove xkbcommon_evdev transition hack
It was added in c3a963da1f.
wayland was updated in a8fed20181729cae70de43079c4a34ad1780cfd7.

Change-Id: Ibf458815c3b61c5f936f147086db3d2b5782c175
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-12-07 18:20:56 +00:00
Gatis Paeglis
326658cfcd libinput: use QT_CONFIG(xkbcommon) macro
This patch amends c3a963da1f

Change-Id: I9e66aac4f0f45714343c585c79f37bd76683e103
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-12-07 18:20:49 +00:00
Vitaly Fanaskov
0088f76043 Fix inability to edit lines in QGraphicsTextItem when pageSize is set
Previous implementation relies on the fact that the only text document
with height -1 can grow or shrink vertically, and, hence, a bounding
rect should be updated under this circumstances. But method
QTextDocument::setPageSize might set a height different from -1, and
QGraphicsTextItem will be growing/shrinking vertically as well.
So, we have to relax condition to cover all use cases. Bounding rect
will be updated if new size is different from current size. This also
doesn't affect performance.

Fixes: QTBUG-55527
Change-Id: Id2c8e15d859aff9dde62c8ee14a6859c0c03f0d4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-12-07 16:31:19 +00:00
Edward Welbourne
4ee59cf96d Remove one out-of-date comment, refine another that was imprecise
The former is a follow-up to c17563eca8.

Change-Id: I3cd41e6e38f740de67605f785a804ffd879b9e67
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-07 15:59:38 +00:00
Edward Welbourne
b60c642ec0 Revise filtering of Content-Length in HTTP cache control
We filter out Content-Length from the cache metadata due to IIS
sending it bogusly on 304 responses; however, we were only doing this
if the cached response had a Content-Length header, which doesn't
happen when the original request was delivered chunked.  Furthermore,
the filtering wasn't limited to the case of 304 responses.  So skip
the "had it previously" requirement and only do this for 304s.

Fixes: QTBUG-72035
Change-Id: Ie5d858e0f0205bf68f0a13a9c9d4a6e844cb3568
Reviewed-by: Joni Poikelin <joni.poikelin@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-12-07 15:59:23 +00:00
Andre de la Rocha
f184f1a481 Windows QPA: Fix QDockWindow Drag & Drop
Pointer messages should not be handled when we are inside a move/resize
modal loop. DefWindowProc() should handle this case instead.

Fixes: QTBUG-72078
Change-Id: I5ad7283bcf0cfe0ff7d21cf5640270c361b8ad8d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-12-07 15:49:56 +00:00
Ivan Čukić
b91e6befeb Preallocate buffer for QLineEdit when used for password input
While the user is entering the password, the string variable that
stores the value might have to reallocate its content from time
to time (when the string needs to grow beyond its current capacity).

When the reallocation happens, the old buffer is freed, but its
data is not zeroed-out. This means that a QLineEdit that serves as
a password input field might leak chunks of the password during
its lifetime, and the leaks will persist after its destruction.

Since the QLineEdit can not control the behavior of the QString
it uses to store the entered value, the only thing it can do is try
to make the reallocations rare.

This patch reserves the space for 30 characters for the string which
stores the QLineEdit value when said QLineEdit is used for password
input. This is enough to make sure no reallocation happens in
majority of cases as barely anyone uses passwords longer than 30
characters.

[ChangeLog][QtWidgets][QWidgetLineControl/security] Preallocate a buffer
for the string that contains the entered value when the QLineEdit serves
as a password input field to minimize reallocations.

Change-Id: I3e695db93e34c93335c3bf9dbcbac832fc18b62d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-12-07 15:47:39 +00:00
Oswald Buddenhagen
90507f53c0 configure: query pkg-config for deps of static libs
note that pkg-config is a tad stupid: it won't tell us if the package is
built statically, but one needs to explicitly ask it to output
transitive deps for static packages. we can do that, as we resolve the
pkg-config output to actual libraries, so we know if they are static.
always asking it would print the transitive deps also if we found a
dynamically linked library, which would inappropriately extend the link
interface. the latter actually happens on windows (because we can't
easily tell apart real static libs from import libs), but that doesn't
matter, as under windows, the linker transitively resolves dlls anyway.

Change-Id: If1be3b3df476374d5c8e62f4b185477c988223b3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-12-07 15:20:30 +00:00
Oliver Wolff
f7019fa43b ANGLE: Set ANGLE_COMMIT_HASH and ANGLE_COMMIT_DATE
Fixes: QTBUG-72371
Change-Id: Ia03447b77d4f88eefc760e9bee14dbf3dd79d5a5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-12-07 09:03:19 +00:00
Tor Arne Vestbø
b82559244e macOS: Account for LC_BUILD_VERSION when checking SDK version and deployment target
The more modern LC_BUILD_VERSION load command was introduced in the 10.13
SDK to unify the various versions of the LC_*_VERSION_MIN command. When
building with a deployment target of 10.14, the linker will use this
load command instead.

Change-Id: Ic3571fdbfdf4dfb9346128c6f6e75d1e06f86cd2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-12-03 22:44:45 +00:00
Tor Arne Vestbø
1314d2688c macOS: Fix Objective-C namespaceing with Xcode 10
Xcode 10 ships version 921.0.1 of cctools, which otool is part of. The
defaults have changed in that version to no longer print verbosely
(symbolically), which we relied on. We now request it explicitly.

Change-Id: Ifbe0c97462b9f78cf128c820847eff9c72f17065
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tim Blechmann <tim@klingt.org>
2018-12-03 20:13:13 +00:00
Oswald Buddenhagen
521a85395d configure: actually resolve libraries into full filepaths
this considerably speeds up failures, as no doomed build is attempted,
and produces more reliable results, as no second lookup (which would be
subject to environment changes) is done any more during the build.

in principle, this also opens up possibilities like selecting specific
variants of dependencies, automatically extracting rpaths, etc.

qt_helper_lib.prf also needs to create fully resolved library names now.

Change-Id: I65f13564b635433030e40fa017427bbc72d1c130
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-12-03 11:25:56 +00:00
Oswald Buddenhagen
46a2b44b2b qmake: fix QMAKE_DEFAULT_LIBDIRS detection on android
amazingly enough, android has different sysroots for the compiler
(shared includes full of #ifdefs) and the linker (per-platform
libraries).

this patch supports only clang for non-darwin, which notably covers all
supported android ndks.

with this fixed, we also remove the hard-coded setting of
QMAKE_DEFAULT_*DIRS from the specs.

amends 353fb118c.

Change-Id: Ie0513de0f7123d7f5b8ca1ffcc72c017cddd126c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-12-03 11:25:47 +00:00
Eirik Aavitsland
49319734c1 ico image handler: check for out of range image size
Make the decoder fail early to avoid spending time and memory on
attempting to decode a corrupt image file.

Change-Id: I598db817c387867a449040f5be5427c8b8746483
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-12-03 11:25:30 +00:00
Lars Knoll
416b4cf685 Set correct vertical position for text following a very large image
If the document is paged and contains an image spanning more than one
page, correctly set the y position for everything following that
image.

Change-Id: I1c584c7a907c1728c2965f1dc3fdc56069ab3172
Fixes: QTBUG-59886
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-12-03 10:42:00 +00:00
Ivan Čukić
5dde7bd922 Erase password data on QLineEdit destruction
The contents of a deleted QString can still remain in memory
and can be accessible by tools that read the raw process memory.
This means that a QLineEdit that serves as a password input field
can leak the password after it is destroyed.

With this patch, the contents of the m_text string member variable
will be zeroed-out before the m_text is destructed. This is done
only in the cases when the QLineEdit serves as a password field.

[ChangeLog][QtWidgets][QWidgetLineControl/security] Zero-out the string
that contains a password entered into the QLineEdit

Change-Id: I8f88f952244bf8a0399c14acf0869439ca0a60ca
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-12-03 10:05:33 +00:00
Eskil Abrahamsen Blomfeldt
79e4fe54bf WebAssembly: Fix compilation of application on Windows host
When running configure on a Windows host, it would fail with the
error that the copy statement was invalid, due to the forward
slashes. This makes configure finish without errors.

Task-number: QTBUG-72000
Change-Id: Id315d7436bbbfd2cd5c5f2dfcfe0c3dc3b9e34c2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-12-03 08:48:28 +00:00
Lars Knoll
c4daa2b527 Fix compilation
::link() is defined in unistd.h, so include it.

Change-Id: I58e99dbcdd64da6388f85d98e73e7d1bd56f4e37
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-12-03 07:53:00 +00:00
Lars Knoll
86aabb500c Add lancelot tests to verify vertical alignment of inline images
Adds a test case for 199f9c5448.

Task-number: QTBUG-59310
Change-Id: Iee26f8bc21884da36471935f64524b62c3f79ff4
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-12-03 07:52:55 +00:00
Samuel Gaist
5d276d6a1d QNetworkConfiguration: add missing timeout unit to setConnectTimeout doc
Change-Id: I3738e989a41607244b55245222ec3c83dda68198
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2018-12-01 20:37:20 +00:00
Mårten Nordheim
17ced070fd Read font selection flags and use them when querying for metrics
Certain fonts with multiple styles have the same family name. When
loading these as application fonts we were not specific enough when
querying for the text metrics. This meant that e.g. the bold version in
a font family would get the metrics of the regular one.

Fixes: QTBUG-67273
Change-Id: Ic988d62cddde0a1f77ddcaf2891cadc21c9b31e6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-11-30 16:15:03 +00:00
Allan Sandfeld Jensen
d23d146175 Fix alignment of temporary QRgba64 buffers on win32
The alignment of long long on 32-bit windows is only 32-bits, but we
should be safe to assume it is aligned at 64-bit.

Since QRgba64 is a public type, we can't fix the alignment there without
breaking ABI, so instead fix it where temporary buffers are allocated.

At the same time be consistent about using QRgba64 so we can switch to it
enforcing alignment in Qt6.

Change-Id: Ie15c305bc867c62a13df8eb2b1678e92174e1f97
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-11-30 15:14:26 +00:00
Timur Pocheptsov
096d87c8b0 OpenSSL context (1.1) - make the if-fery/switch less ugly
no need in duplicating DTLS-specific cases.

Change-Id: I475c6fb53daa44d60a5054bf3acc8474355b2186
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-11-30 15:10:07 +00:00
Ville Voutilainen
c0dd445564 Fix a nullptr compile error with gcc 4.8
template argument deduction/substitution failed:
qtbase/tests/auto/corelib/kernel/qobject/tst_qobject.cpp:6756:71: note:   mismatched types ‘const typename QtPrivate::FunctionPointer<Func2>::Object*’ and ‘std::nullptr_t’

Change-Id: I8e7872457d1fc30c4b29e96c16091915264f9bce
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-30 14:50:00 +00:00
Tor Arne Vestbø
58e66a2573 CoreText: Define font smoothing gamma along with rest of relevant code
Change-Id: I57909603732de6c1a91c744a358968941e64acdf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-11-30 14:47:50 +00:00
Ulf Hermann
5ed471a80a qmake: Escape '=' in dependency paths for unix make
'=' cannot be handled in the same manner as other "critical" characters
as no amount of backslashes will escape it. Use a variable instead.

The documentation for nmake suggests that '=' in file names is not among
the "Special Characters in a Makefile". Therefore, we assume nmake can
handle it and don't escape it.

Fixes: QTBUG-67262
Change-Id: Ib60f808d7d4e981c98f7d8bf2075d55b2b7f3b7d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
2018-11-30 14:47:42 +00:00
Andy Shaw
2afe4a1a07 Android: Don't use blocking queued when suspending the application
If the application gets suspended when a blocking queued connection is
made then it will cause the application to hang when being resumed.
Therefore a check is needed to still post the event to the other thread
but in a non blocking manner so that it does not cause a hang on return.

Fixes: QTBUG-72101
Change-Id: I6d53c97ed6d9d500559da2a9fd195226d1fc9905
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-11-30 14:47:36 +00:00
Ulf Hermann
042707a633 Avoid invalid qmake code in macOS-specific pluginloader test
You cannot manipulate variables in custom target dependencies, so the
following code was invalid:

i386_d.depends = EXPORT_VALID_ARCHS=i386

In order to still build the fat binary, we split the project in four,
one for each architecture, plus one to create the final package.

Change-Id: If08cf54e2e4098a7e10df41b7ea8d2bf699f58be
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-11-30 14:47:29 +00:00
Gatis Paeglis
f2b4462f84 xcb: remove old work-around for building with util-wm
Commits that added this code:

7ce8491280 and
f005dee1b3

I guess this was a work-around, before we started bundling
XCB libs a year later in 21bd66e1ea

0.3.8 was released in 2011-04-26 and we are bundling 0.3.9, so
it is safe to remove the include work-around as well.

Change-Id: I5794f40d86e10ebdad984aa4b61311979aaadcf3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-11-30 14:05:13 +00:00
Gatis Paeglis
0de4b326d8 xcb: fix issue with dialogs hidden by other windows
This was a regression from Qt4, due to not setting the window
group leader in WM_HINTS property. Qt4 did set this property.

It was not obvious that something was missing because of the
similarly named WM_CLIENT_LEADER property, which we do set.
Testing revealed that setting WM_CLIENT_LEADER is sufficient
on some DEs, e.g. KDE, Unity, but did not have the desired
effect on e.g Gnome and XFCE.

EWMH/ICCCM specs are known to be ambiguous, WM_CLIENT_LEADER
is only mentioned in the section on the session management, so
it is not surprising that there is this inconsistency between
various WMs.

This patch merely restores a lost WM hint. This solves the
reported issues on major desktops. If we support calling show()
on a dialog before its parent has been shown is still an open
question, which should be handled in QTBUG-72040.

Task-number: QTBUG-56829
Fixes: QTBUG-46626
Fixes: QTBUG-70756
Task-number: QTBUG-72040
Change-Id: Id2c575850e5f4f5af3e57963c577d33572e30b6e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-11-30 14:05:04 +00:00
Tor Arne Vestbø
e11a3b3f3e CoreText: Base glyph fill color logic on font smoothing algorithm
Change-Id: I22be1efb1f91048745008ea1b49186b39367d122
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-11-30 14:03:49 +00:00
Oliver Wolff
10f9bd82ea ctest: Make cmake test pass if it has been run before
We have to check if the directory exists before calling mkdir or the test
will fail on every run but the first one.

Change-Id: I36f10cfc18b3cb99990dc96190349ee00a0c1c4e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-11-30 11:30:13 +00:00
Tor Arne Vestbø
64037f18d3 CoreText: Respect QFont::NoSubpixelAntialias when deciding glyph format
Change-Id: I846758bce2fd7536f9941b11f23fc0e5d5bc6f1b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-11-30 11:19:23 +00:00
Timur Pocheptsov
dae2e6be93 Fusion style - avoid a warning
... printed by QPainter when it gets a pixmap with one or both of
dimensions equal to 0 (and a nullptr as a paintEngine).

Task-number: QTBUG-71806
Change-Id: I978f56c843daab307042e34390fc33f338ce8cf5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-11-30 10:44:41 +00:00
Tor Arne Vestbø
b926d5f919 CoreText: Remove handling of QFontEngineMulti's highByte
It's a leftover from when the Cocoa plugin used QFontEngineMulti
exclusively. Nowadays QFontEngineMulti will strip out the highByte
before calling into the real engine. Left an assert just in case..

Change-Id: I6cb26d20a908d7c3aaf096297fca160805fdb85b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-11-30 10:35:52 +00:00
Morten Johan Sørvig
eab84914f1 macOS: make QScreen::grabWindow() fast again
Commit 17b73b0d2b regressed performance by grabbing
the entire screen and then copying the grab region.

Move back to grabbing a minimal rectangle instead.
Also handle multi-screen grabs at different device
pixel ratios.

Multi-screen grabbing is handled by grabbing each screen
individually, and then stitching together the result.
The returned pixmap is created using the highest DPR
available, upscaling lower resolution parts as needed.

Change-Id: I9d45c5f7ec7b342360b745f49ef2939dc588f40b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-11-30 10:28:42 +00:00
Friedemann Kleint
7aaf54f572 Codecs example: Add a dialog for showing common C++ encodings
Add a dialog where the user can enter a line of text, which is then
displayed in several encodings with special characters converted
suitable for C++/Python string literals.

Task-number: QTBUG-60635
Change-Id: Ibd436f9f76e128c93cbb581235c730d636641d8a
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-11-30 10:00:04 +00:00
Gatis Paeglis
c3a963da1f src/3rdparty: remove xkbcommon
The only reason why we bundled this library ~6 years ago was because
it was not available on distributions that we supported at the time,
but library was a hard dependency for XCB plugin. See:
2122e731ab

Later more and more projects started to depend on it (compose input
context plugin, libinput, mir, wayland). The configuration had become
too complex, because some projects used bundled and some used the
version from the system.

Having libxkbcommon in 3rdparty sources is not necessary anymore, after
RHEL 6.6 was removed from the list of supported platforms for Qt 5.12.

Ubuntu 16.04  - 0.5.0
Ubuntu 18.04  - 0.8.0
openSUSE 42.3 - 0.6.1
RHEL-7.4      - 0.7.1

This will also simplify further development, e.g. QTBUG-42181

Bumped the minimal required version 0.4.1 -> 0.5.0.

The patch also contains a code marked with "TRANSITION HACK", which
is temporary needed so we can update the dependent wayland module.

[ChangeLog][Third-Party Code] Removed xkbcommon from bundled sources.
This library is present on all supported platforms. The minimal required
version now is 0.5.0.

Task-number: QTBUG-65503
Change-Id: Iec50829bb6f8fbb19f3c4e4ad62e332beb837de5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-11-30 09:47:03 +00:00
Allan Sandfeld Jensen
1f1dc3fc4c Fix gamma-correction in QCoreTextFontEngine with Mojave
The code was previously assuming font-smoothing was only used with
A32 font antialiasing, so the corresponding gamma-correction was not
performed.

Task-number: QTBUG-71075
Task-number: QTBUG-71946
Change-Id: I68d8304cf18638239d8bfac32c67333f16ccc7bd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-11-30 00:18:59 +00:00
Mitch Curtis
247baedb25 Doc: specifically list the QToolButton properties that actions affect
Also, add a note that explains that autoRepeat does not affect
QToolButton's autoRepeat property.

Change-Id: I9e95cef9e9d1b5ee6cb1114d0b9a9fad562db601
Fixes: QTBUG-48204
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-11-29 21:56:29 +00:00
Ville Voutilainen
1eeebae7e3 Fix compilation of qendian's qswap specializations on gcc 4.8
Task-number: QTBUG-71945
Change-Id: Icf2b75c72946f57ebffc880c9238531dea13ab5b
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-29 20:42:33 +00:00
Thomas Miller
6b875f0625 Implement mul_overflow for MSVC arm64
Change-Id: Ia7c79614e6ef21222fb9683b540ac51b45a77c49
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-11-29 18:09:47 +00:00
Albert Astals Cid
6d58a1cecb Fix QPpdPrintDevice::isDefault
How to test:
 * Have two printers
 * Use lpoptions -d to set the default printer to be one and then the
other
 * Use lpstat -d to check setting the default printer worked
 * Use this simple test program and check the resulting values make
sense
    qDebug() << "DefaultPrinter" << QPrinterInfo::defaultPrinter().printerName();
    const QList<QPrinterInfo> list = QPrinterInfo::availablePrinters();
    for(const QPrinterInfo &pi : list) {
        qDebug() << pi.printerName() << pi.isDefault();
    }

Fixes: QTBUG-70317
Change-Id: I535d11451c568630a374f5c37d8cac32cbb6d3ab
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-11-29 18:07:30 +00:00
Tor Arne Vestbø
0cf5648ce6 CoreText: Store glyphs in linear RGB when needed by blending algorithm
Instead of tying the linear-conversion to a specific function, we move it
to imageForGlyph and base it on the premise for needing it.

Change-Id: Ib8fc79ad419ef703abcb82785ac15d4c75fb98e6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-11-29 18:03:18 +00:00
Tor Arne Vestbø
ec254d2555 CoreText: Add font antialiasing and smoothing helper functions
The font smoothing helper in particular now takes into account whether
or not we're dealing with color glyphs, in which case we shouldn't (or
don't need to) smooth, and also makes sure the QFont::NoSubpixelAntialias
style strategy doesn't affect font smoothing when we're dealing with
non-subpixel-antialiased font smoothing, as on macOS 10.14.

Change-Id: Ibd477158629402c55cafec31576b6d9901d184cf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-11-29 18:03:06 +00:00
Tor Arne Vestbø
3944f45c4d CoreText: Remove handling of the AppleAntiAliasingThreshold user default
The setting is not relevant for modern macOS applications, and none of
the applications shipped with macOS today are affected by it.

The only code path in macOS that picks it up is +[NSFont initialize] in
the UIFoundation framework, storing it for later so that -[NSFont screenFont]
and -[NSFont screenFontWithRenderingMode:] can use it, but these APIs are
deprecated and we don't use them in Qt.

Other NSFont code paths will not hit these APIs unless screen font
substitution is enabled, something it hasn't been since OSX 10.7.

 https://preview.tinyurl.com/yctpfnqp

Removing handling of this setting allows us to simplify the reasoning
for whether or not antialiasing and font smoothing is enabled for a given
engine.

Change-Id: Ie2809052a1a0815d9bddedd4a6236eb6c898f993
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-11-29 18:02:58 +00:00
Val Doroshchuk
2e86b652b7 Fix crash in QSimpleDrag when no platform window
No need to return top level window if it was not created.
It means no platform resources have been allocated.

Events might not be delivered if the wrong window is returned.

Fixes: QTBUG-70544
Change-Id: I43462974f70871470f7b7490dc2b3c08846f77b1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-11-29 13:14:14 +00:00
Mikhail Svetkin
2a1c368c87 xcb: Use std::move and pass argument by rvalue reference
It will avoid a creation of temporary object and avoid copying.

Change-Id: Ifae5f6f9e36bcb07f4bacc31f151f8adcfa621a3
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-11-29 13:13:33 +00:00