Commit Graph

39455 Commits

Author SHA1 Message Date
Liang Qi
9967a011ea Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	qmake/generators/makefile.cpp
	src/plugins/platforms/cocoa/qcocoaintegration.h
	src/plugins/platforms/cocoa/qcocoaintegration.mm

Done-With: Jörg Bornemann <joerg.bornemann@qt.io>
Change-Id: I5a61e161784cc6f947abe370aab8f2971a9cbe78
2019-06-07 13:19:27 +02:00
Timur Pocheptsov
91ab70d17f tst_qnetworkreply - QSKIP/disable tests that deadlock on Windows
We use global object to store errors found by q_X509Callback.
Thus, we also use a lock/mutex. It would appear all tests
involving in-process server and QNAM are prone to intermittent
failures on our Windows VMs - it's always about timeouts due
to the client socket (QNAM) locking and the server socket blocking
main thread while trying to acquire the same lock.

The real fix is to get rid of global variable/locking, we'll
have it later (quite a change and requires a lot of accuracy).

Task-number: QTBUG-76247
Change-Id: Iffc90d9e16783f17f62e836e01c35f22681bdd39
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-06-07 06:39:16 +02:00
Joerg Bornemann
99636127d1 Fix prefix_build check for top-level builds
The checks whether we have a Qt prefix build were broken for
top-level builds. Non-prefix top-level builds were incorrectly
detected as prefix builds.

For top-level non-prefix builds QT_HOST_DATA/QT_INSTALL_PREFIX becomes
something like "~/my/build/dir/qtbase" but .qmake.cache (and
.qmake.super) is/are created in "~/my/build/dir".

This patch extends the prefix_build check by probing for the existence
of .qmake.super, which only exists for top-level builds. Also, we add
qt_prefix_build_check.prf as central place for determining whether we
have a prefix build to make sure that qt_configure.prf and
qt_build_config.prf use the same logic.

Fixes: QTBUG-76185
Change-Id: I2b76fe26013496aaf2dac96ea711b06a69550a29
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-06-05 13:02:22 +02:00
Friedemann Kleint
65cfac73bd Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" 2019-05-27 09:17:14 +02:00
Friedemann Kleint
761b71bd20 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Iaf6bd52972b562b9c91d9e93a988d26b0eb9d3b4
2019-05-27 09:17:14 +02:00
Edward Welbourne
14aa1f7d6f Use appropriate encoding rather than UTF-8 when reading from a pipe
The qmake code to read output from dependency-generation was adding
QByteArray values to a QString, thereby tacitly converting from UTF-8;
this is misguided. Hopefully, the command emits its output in the same
local 8-bit encoding that QString knows to convert from.

Simplified needlessly verbose loops (that violated Qt coding style) in
the process.

Fixes: QTBUG-75904
Change-Id: I27cf81ffcb63ebc999b8e4fc57abdb9a68c4d2b3
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-05-24 16:58:04 +02:00
Kai Koehne
0c9b449aa4 Doc: Clarify state of Qt Xml
The state of the module is done, not deprecated, so we shouldn't
recommend users to move away from it in all cases. There's also
no direct replacement for the DOM API.

Fixes: QTBUG-70629
Change-Id: Ifaff9757234bd68a411a3da1403c57bbbcb94693
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2019-05-24 11:54:55 +02:00
Allan Sandfeld Jensen
d212c179db Change default of optimize-debug to off for developer-builds
Backtraces with optimize-debug are less useful due to scoped variables
no longer alive, and some gcc bugs with inlining.

Fixes: QTBUG-75514
Change-Id: I6d62441047daee8f7079d1538dfc92015dd7ea63
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-05-23 12:44:07 +02:00
Volker Hilsheimer
804a18ef0e Document that QHeaderView rendered with themed style might ignore roles
While this is generally true for widgets, QHeaderView's documentation
about how appearance related data roles are respected can be misleading.

Fixes: QTBUG-31804
Change-Id: I93c6562e59ecf771d938d282723169202ac15bc2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-06-05 15:31:42 +02:00
Damien Caliste
4ebac33644 Detect system time zone from linked symlinks
[ChangeLog][QtCore][QTimeZone] The IANA timezone database backend
now properly follows symlinks even when they point to variable
locations like /run or /var (useful when /etc is mounted read-only).

Fixes: QTBUG-75936
Fixes: QTBUG-75527
Change-Id: If0dc2bfa20659e76c3bd062c75597a9ad01ad954
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-06-04 13:27:02 +02:00
Kai Koehne
5f30fd6426 qmake: Cleanup
Fix clang warnings that are disabled in the default build.

Change-Id: I4e773a24884db94acdc6c295d3f66da07cd8a5bd
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-06-05 10:59:43 +02:00
Friedemann Kleint
761f88f8ba Diaglib: Improve formatting of DebugProxyStyle
The class used the default debug operator for QObject, which outputs
the object's address. This makes it hard to compare the log output.

Make the existing QObject formatting helper from the EventFilter
publicly usable by providing a helper with a stream operator.

Change-Id: Ifab83e23cc792a5efe231fd9ae84e0439ab0d609
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-06-04 08:02:12 +02:00
Joerg Bornemann
224a60989e Fix determination of source and build roots
QMake searches a .qmake.conf file to determine the source root of the
project, and a .qmake.cache to determine the build root.

If a .qmake.conf exists but no .qmake.cache in the build directory is
found, a build root would be set that is only valid if the build
directory is at the same depth as the source directory.

The invalid build root resulted in the creation of .qmake.cache files
at "interesting" locations (e.g. high up in the directory tree), a
potential cause for even more interesting build failures in the
future.

Fix this by splitting up the loop that determined build and source
root. Both are now determined independently of each other.

Fixes: QTBUG-76140
Change-Id: Ib5c922b87879fcf2f076298a69abcdbc4e8587b3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-06-04 21:19:37 +02:00
Edward Welbourne
ff4ef79e0d Overhaul Q(Date|Time)+ documentation
Various things were out of date, misdescribed or just plain wrong.

Change-Id: I11b7bd419604067fce2577a42882ebf126629016
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-05-29 15:54:01 +02:00
Jan Arve Sæther
8c7589d992 Do not strip off the fragment and query in the qfileselector
This is needed for cases where we use e.g. "file:///test.html?query#Fragment".
The fragment and query were already preserved for the qrc scheme. This
fixes it for the file scheme.

Change-Id: I5713e4a25372fdd55ac255b1c6228b4dea419244
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-06-03 12:29:49 +00:00
Mikhail Svetkin
6f40331058 macOS: Fix QMouseEvent::button
cocoaButton2QtButton(NSEvent *event) did not handle NSEventTypeLeftMouseDragged,
NSEventTypeRightMouseDragged, NSEventTypeOtherMouseDragged.


Task-number: QTBUG-74763
Change-Id: I9f48230599f16400b49edbff392f712eb1fff782
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-05-28 07:57:22 +00:00
Tasuku Suzuki
9d9b944b44 Fix configure comment in/for -device linux-rasp-pi3-vc4-g++
The name was renamed in 8e445f8434

Change-Id: I5a74b65309cf5dc64621db281fad3a62a2f026b1
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-06-04 17:22:35 +09:00
Tor Arne Vestbø
b53994de5f macOS: Use QMacNotificationObserver over manual notification handling
This also fixes a bug where we were implicitly capturing this inside
the block, which meant that we would crash if the theme was recreated.
The capture is now tied to the lifetime of QCocoaTheme.

Change-Id: I37df8e6c0b33bf41e76d66be3cf29576041a7546
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-05-29 17:11:40 +02:00
Friedemann Kleint
15d73a9f47 Qt Widgets: Make tests pass on High DPI screens and scaling
Use the comparison helpers to do fuzzy checking of geometries.

Change-Id: I00f4403f3bca2e8a3996e938a85ba799e083058c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-05-29 12:52:51 +02:00
Mikhail Svetkin
9a47768b46 macOS: Fix reported mouse event buttons
Use m_buttons instead of currentlyPressedMouseButtons. The latter returns
the state of devices combined with synthesized events at the moment,
independent of which events have been delivered via the event stream,
so this method is not suitable for tracking.

Task-number: QTBUG-74057
Task-number: QTBUG-74121
Change-Id: Iabf99ada6c3d25a995c9ddf895059b70833a9051
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-06-03 05:08:44 +00:00
Joerg Bornemann
4da47d0fba Make sure .pc, .prl and .la files are created for header_only modules
Those modules are TEMPLATE=aux, so they weren't triggering the file creation
here.

To make this work properly we have to:
  - check for TEMPLATE aux in the right places
  - add a dummy target to INSTALLS to actually trigger the creation
  - initialize PRL_TARGET for aux templates

Fixes: QTBUG-75901
Started-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: Idce141629dd34287808bfffd159f92ac28c6c8b1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-06-03 15:06:29 +02:00
Joerg Bornemann
c64f8ca232 Do not write 'Libs:' into .pc files if TEMPLATE is not 'lib'
Especially for header modules we don't want a 'Libs:' entry in their
.pc file.

Task-number: QTBUG-75901
Change-Id: I39037d3132e39dd360532e1425f794ebec28e0bd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-06-03 14:58:39 +02:00
Joerg Bornemann
60136b1a84 Fix meta file replacements if matches are empty
QMake code like
    rplc.match =
    QMAKE_PRL_INSTALL_REPLACE += rplc
led to the generation of invalid sed calls in the Makefile.

It is already actively checked for empty matches, but if *all* matches
are empty, the sed call looks like
    sed foo > bar
which is invalid.

Task-number: QTBUG-75901
Change-Id: I173ed99826414dcf06253a15a247f7d067ee3977
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-06-03 14:58:39 +02:00
Thorbjørn Lund Martsum
48f7f65dc3 QMenu size fix - Mark items dirty on screen change
It seems like an optimization on the itemsDirty flag
caused a bug to be re-introduced. When a popup is shown
on a new screen, the itemsDirty must however be set to
ensure that new correct sizes are calculated.

Task-number: QTBUG-59794
Change-Id: Ifb5c233b1f9d4d38bd0cd7a9a71cc32ad3212f8c
Reviewed-by: Morten Kristensen <msk@nullpointer.dk>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-05-22 11:22:26 +02:00
Lorn Potter
800941df89 wasm: fix empty body on POST
this also optimizes network post method handling

Task-number: QTBUG-75660
Change-Id: Ibb0d01f2cc2b2bc7802598c4f6f04b04882c12ca
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-05-22 16:58:34 +10:00
Lorn Potter
9fc17c14fa wasm: fix QSGContext warning message
When runing the scenegraph example sgengine, gets rid if this error:
 QSGContext::initialize: stencil buffer support missing, expect
 rendering errors

Change-Id: I7f3a82409bc2cf81cf8217876e527f9c45be3bf4
Fixes: QTBUG-74694
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-05-21 06:21:21 +10:00
Liang Qi
7029ecade9 cmake: correct version dependency for qt5_add_big_resources
qt5_add_big_resources is only available if using CMake 3.9 and later.

This amends cdccd0222b.

Task-number: QTBUG-55680
Task-number: QTBUG-75806
Change-Id: Ibba7af6ee7edfb226368937d543b7ec5cc93eb16
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-05-20 12:49:37 +02:00
Joerg Bornemann
68866b1a7b Fix QMAKE_EXTRA_COMPILER names in VS projects
Use the whole value of 'name', not just the first element, and also
replace variables like ${QMAKE_FILE_IN}.

This fixes the file_copies feature (COPIES) for Visual Studio
projects, because for every entry in COPIES an extra compiler is
created with a name 'COPY ${QMAKE_FILE_IN}'. Before this patch the
name and the generated file filter would be just 'COPY'. However,
duplicate filters are being skipped by the VS project generator. All
but the first COPIES entry was ignored.

Fixes: QTBUG-76010
Change-Id: Icaa5d2cb8d88ae3ef8ce86220198bca1b9e673f5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-05-31 10:48:35 +02:00
Friedemann Kleint
67c569add0 Make tst_qwidget pass on High-DPI screens (Windows)
- Move the fuzz check introduced by
  6309062722 to a shared header for
  reuse. Use it in in more places to account for rounding errors
  introduced by odd window frame sizes when scaling is active.

- Use the test widget size to ensure windows do not violate the
  minimum decorated window size on Windows when scaling is inactive
  on large monitors.

Task-number: QTBUG-46615
Change-Id: Icf803a4bc2c275eadb8f98e60b08e39b2ebebedd
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-06-03 10:41:08 +02:00
Joerg Bornemann
085d1335d1 Warn about invalid SUBDIRS content
Invalid SUBDIRS values like

SUBDIRS += foo \
           bar \ \
           baz

would produce a Makefile with a sub-- target that will call the make
on the same Makefile again recursively, letting make run forever.

Ignore values like this and print a warning message.

Fixes: QTBUG-76068
Change-Id: I6ca0f8c8238249f1be02d8c311b4c148fd80e707
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-05-28 13:40:42 +02:00
Friedemann Kleint
90c683e41c Q(Plain)TextEdit: Observe color hints from style sheet depending on focus state
Ask the style sheet style to adapt the palette in
WidgetTextControl::getPaintContext() as is done for QLineEdit.
Use the palette color in QPlainTextEdit.

Change-Id: I67758716b66feaeac8c2433c2a4d3744cd0d5327
Fixes: QTBUG-72100
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-05-24 13:06:20 +02:00
Andy Shaw
81b33a8252 Fusion: Fill the rect with base brush when drawing the combobox frame
Instead of doing this directly inside the PE_FrameLineEdit as this can
be used directly when a stylesheet is set the rect of the lineedit used
in the combobox in fusion style is filled directly with the base brush.
This ensures it still renders the background correctly when using fusion
style, but enables stylesheets to work as it will not override that if
the background is set in a stylesheet for a combobox.

Fixes: QTBUG-75816
Change-Id: I50a0600b500088ebcf1d70a02f9c74c6040d34d9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-05-27 14:35:18 +02:00
Laszlo Agocs
364240ed11 macOS: Enable VK_MVK_macos_surface on the instance
Reports say some systems get "Failed to find vkCreateMacOSSurfaceMVK"
even though MoltenVK and the corresponding extensionare there. While not
reproducable on single GPU Intel systems, it could be that not enabling
the extension on the Vulkan instance is causing this. Not opting in to
the extension is incorrect in theory anyway. So fix it in cocoa as well,
similarly to how other platform plugins do this already.

Task-number: QTBUG-76117
Change-Id: I75220f3582a700ce0037003086123d3d38524648
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Mike Krus <mike.krus@kdab.com>
2019-05-30 19:11:01 +02:00
Morten Johan Sørvig
1eac947ce2 Work around crash where a destroyed window becomes focus_window
Clear QGuiApplication::focus_window (again) in the
QWindow destructor.

Task-number: QTBUG-75326
Change-Id: Ief00b6adfb267fcc7e3881fd728e12df07fc1094
Reviewed-by: Christian Andersen <csandersen3@gmail.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-05-22 12:08:55 +00:00
Tor Arne Vestbø
a67b25067e Rename QMacScopedObserver to the more fittingly QMacNotificationObserver
Change-Id: I1d8280fe88871572a3a27e612de49717b3b9ef77
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-05-29 17:11:40 +02:00
Edward Welbourne
c3571d2922 Correct qfloat16's 1/inf == 0 test
It should have been qfloat16(1)/qfloat16(infinity) in any case.
Sadly, that behaves no better than qfloat16(1.f/qfloat16(infinity)),
which was promoting the infinity back to float.  So retain the check
for over-optimization (but make the comment more accurate).

This is a follow-up to d441f6bba7.

Change-Id: Iec4afe4b04081b0ebfbf98058da606dc3ade07f4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-27 11:52:22 +02:00
Friedemann Kleint
4df554c652 Windows QPA: Fix clang warnings about narrowing conversions
Change-Id: Iba173b45fb77918694fc2c7506885fdeef9f6064
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2019-05-29 12:55:21 +02:00
Andre de la Rocha
c150c7a566 Windows QPA: Optimize code that gets window under pointer
It's not necessary to call QWindowsScreen::windowAt() for every mouse
message received, but only when the mouse is captured, like it's done
in the legacy mouse handler.

Change-Id: Ib1035921291d22a32dfa3a619815a3f4ff9b3622
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-05-28 18:26:51 +02:00
Friedemann Kleint
0f417efe0f Windows QPA: Fix QGuiApplication::topLevelAt() with screen recorder applications
Special applications like screen recorders can create special, invisible
windows which are detected by the ChildWindowFromPointEx() as used in
QWindowsContext::findPlatformWindowAt(). Fall back to WindowFromPoint()
which skips those in case nothing is found.

Fixes: QTBUG-40815
Change-Id: Idb5253c412fb4522c844edf5eadedc6e0fad3979
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2019-05-28 14:32:01 +02:00
Joerg Bornemann
978987981a Automatically sysrootify $$[FOO/get] properties
If automatic sysrootification is in effect (SysrootifyPrefix=true in
qt.conf) then the qmake property variants $$[FOO] and $$[FOO/get] must
be sysrootified. The latter was never sysrootified.

All other variants (src, dev, raw) are supposed to be without sysroot.

Flesh out a sysrootify function and readabilitify the code a bit while
we're at it.

Fixes: QTBUG-71673
Change-Id: Ifcbce8c035b9da447da9d6937edd5a4aa84573ba
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-05-28 12:33:22 +02:00
Giuseppe D'Angelo
b9f96cacc9 QRegExp: remove an out of bounds access into QString
... spotted with the brand-new checks for that in QCharRef.

The rx[i] == ~~~ check is clearly wrong, as rx is the regexp
we're building and `i` was not supposed to index into it.

The intended meaning was wc[i] == ~~~, testing if we were seeing
the closing bracket of a character set. We need to check for
that immediately for dealing with the special syntax of []...] where
the ] belongs to the character set (it can't be the closing one
as character sets cannot be empty).

Fix and add a regression test. Bonus: this code was almost
unchanged since 2009.

Change-Id: I958cd87fc25558e9d202d18b3dd4a35d0db16d8d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: hjk <hjk@qt.io>
2019-05-27 17:33:30 +00:00
Eirik Aavitsland
c04bd30de0 Guard against numerical overflow when processing QPainterPaths
Many operations on and with QPainterPaths do calculations on the path
coordinates, e.g. computing the distance between points, which may cause
numerical overflow for extreme coordinate values. This patch
introduces a limit on the coordinate values and extends the previous
check against nan/inf coordinates to also check against out of range
coordinates.

Fixes: QTBUG-75574
Change-Id: I3a2fa88bfc6a9f19934c43d3dbbfb41855c78107
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-05-15 13:50:55 +02:00
Timur Pocheptsov
ebddd02896 QMacStyle - fix the separator's color in the Dark theme
It's too dark as it is now. Since there is no similar UI element
in AppKit, we take the same color as the toolbar's handle has (looks
OK-eysh with 'Dark' and there is no reason to have the separator with
a color different from the bar handle, both elements essentialy are
lines of dots).

Fixes: QTBUG-72759
Change-Id: I28277f80174a1c4c0af17961aba8ed6135aa3189
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-05-24 14:42:17 +02:00
Ryan Chu
cc4c0b43a5 QDataStream: Fix inconsistent results of iostream with QPalette objects
The value of NColorRoles got changed since 5.11. It introduced one more
role called "PlaceholderText" in the ColorRole enumeration.

When using QDataStream (5.12) to read QPalette objects from a file
written by 5.9 (<5.11), the processing results are inconsistent.

Fixes: QTBUG-74885
Change-Id: I14d57f9603a26e5890b4fd57c7e464c5b38eb3f2
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-05-20 22:33:33 +02:00
Andrew den Exter
d661a22ae2 Write an anchor-type attribute when embedding images in an ODF document
Without this some readers will fail to display the image or position
the image at the start of a paragraph rather than inline.

Change-Id: I2b9257e3193e5e68eb20112017a0c23be1d06cb0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-05-13 13:03:07 +10:00
Andrew den Exter
345f86a2d8 Avoid re-encoding embedded images when writing an ODF file
If an embedded image is already encodeded as an png or jpg write the
data as is instead of decoding to a QImage and re-encoding as a new
image.

Change-Id: I479ae1fddbf59900a500497dd1bdf7449c21f273
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-05-13 13:03:01 +10:00
Christian Ehrlicher
aa8d3f90a4 QAbstractSpinBox: fix some ui glitches
Fix some ui glitches for QAbstractSpinBox:
 - update geometry when buttons are toggled on/off
 - calc button size with subControlRect instead hardcoded 20px
 - when buttons are not shown, don't add the button size in
   sizeFromContents for common and macOS style

Fixes: QTBUG-39713
Fixes: QTBUG-75303
Task-number: QTBUG-67126
Change-Id: Ibf330c76deb16358a481bba6bd429fff6a5d57ae
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-05-10 19:52:11 +02:00
Allan Sandfeld Jensen
12ebdf0281 Fix new[] delete mismatch in test
QScopedPointer uses normal delete, but we need delete[].

Change-Id: Id62a2c55f75ef4aa60580f5e04c4bf306a6dd3c9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-15 11:17:57 +02:00
Dongmei Wang
ad1d616033 wasm: add Qt Virtual Keyboard support
Change-Id: I454ab677cad25b50ba7b03ef2c4b6046e1227ce8
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2019-05-16 13:30:52 -07:00
Fredrik Orderud
2a2f04205c WASM: Make wasm_shell.html compatible with CMake configure_file
The CMake configure_file command is commonly used copy & modify template files
during the build process. One limitation, thought, is that configure_file
expect the variables to be replaced to be encoded using either a @APPNAME@ or
${APPNAME} convention.

This commit therefore changes "APPNAME" to "@APPNAME@" in wasm_shell.html to
make the HTML template file compatible with CMake configure_file.

With this commit, it becomes possible to write the following CMake function
that mimics what QMake is already doing:
function(copy_html_js_launch_files target)
  set(APPNAME ${target})
  configure_file("${_qt5Core_install_prefix}/plugins/platforms/wasm_shell.html"
                 "${target}.html")
  configure_file("${_qt5Core_install_prefix}/plugins/platforms/qtloader.js"
                 qtloader.js COPYONLY)
endfunction()

Change-Id: Ic38abdc498ba03b8d21f1b9b70aa1d480ae7f362
Reference: https://cmake.org/cmake/help/latest/command/configure_file.html
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-05-21 09:12:07 +02:00