Commit Graph

41597 Commits

Author SHA1 Message Date
Marc Mutz
afb8ba3fd2 QStringView: clean up storage_type
Now that all supported compilers support char16_t, we don't need the
storage_type == wchar_t hack for MSVC anymore.

Remove it. Adapt docs.

Change-Id: I55df6c8a9fa5a9c7e6f53ba89f3850956b369061
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2019-07-29 18:09:16 +00:00
Marc Mutz
353a6946b1 qstringalgorithms.h: add pure, noexcept, constexpr
... where they were missing.

Change-Id: I58c32e57675b5d5ee500722933ef4a356a679e46
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-07-29 21:07:17 +03:00
Marc Mutz
4628351c3f QStandardPaths: don't build a QHash just to look up one key
The code parses a file, looking for XDG_*_DIR entries and stores each
one's key and raw value in a QHash. After parsing, it, however, looked
up exactly once, by a key it could have known all along.

So, move the key computation before the opening of the file, and look
for the correct key directly, consciously striving to continue to
find, as the old code implicitly did, the last entry, since man 5
user-dirs.dirs explains:

> The format of user-dirs.dirs is designed to allow direct sourcing of
> this file in shell scripts.

Which means last one wins.

Port to QStringView API of QRegularExpression, too.

Change-Id: Ie92b689b5b9221df918c67b96f2f6a09827e7b1e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2019-07-29 21:07:08 +03:00
Marc Mutz
1fcd8345ac QPNGImageWriter: fix compilation with libpng 1.4
Amends 83de6d0ce5.

The interface of png_set_iCCP() changed source-incompatibly from 1.4
to 1.5. #ifdef on the version as is done elsewhere in the code. Drop a
no-op C cast.

Also add PNG_iCCP_SUPPORTED around the new code, as that check is used
elsewhere in the code.

Change-Id: Ie203bd9eebea5697f426fa3e95591f86346b2685
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-07-29 21:05:39 +03:00
Samuel Gaist
889b1c4b28 test: migrate QSqlDatabase test to QRegularExpression
This is part of the migration of qtbase from QRexExp to
QRegularExpression.

Task-number: QTBUG-72587
Change-Id: Id82e103d4076fed63c871385b2b0f21c04735d00
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-07-29 20:01:24 +02:00
Samuel Gaist
036e9d66f5 Fix CC_Slider rendering on macOS
QSlider rendering is currently broken as the context used to render it
is not properly translated. This patch fixes that.

Fixes: QTBUG-72970
Change-Id: I30896ceee1f37f6dfcf01a342d10af3bb279ac8a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-07-29 20:01:20 +02:00
Tor Arne Vestbø
c2f041203f qmake: Keep -force_load with library when merging linker flags
Without treating -force_load as an option with an argument, we end up
leaving stray -force_loads in the linker line, resulting in build
failures when the following option is a random library then treated
as a file path.

Task-number: QTBUG-66091
Change-Id: I352c50ab67e32ef6b2b5c6a4f90455b20034e207
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-07-29 17:23:16 +02:00
Tor Arne Vestbø
080fbb55b5 qmake: Don't allow -framework without second argument when merging flags
The linker doesn't support -framworkFoo, so neither should we. The correct
syntax is -framework Foo.

Change-Id: I3f39ffc067871ce058542bf0068274b35f7b51f6
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-07-29 17:20:10 +02:00
David Faure
3e7463411e Fix crash when the focus widget gets a focus proxy after the fact
QApplicationPrivate::focus_widget became a dangling pointer
in the following scenario:

A widget first gets focus and later on gets a focus proxy.
QApplicationPrivate::focus_widget was still pointing to the initial widget.
Upon destruction, QWidget::hasFocus() [which follows to the focus proxy
and then compares with focus_widget] was therefore false for both
widgets. So QWidget::clearFocus() didn't call
QApplicationPrivate::setFocusWidget(0) for either of them. As a
result, focus_widget remained set, and became dangling.

In real life, this happened with a QWebEngineView, which the application
gave focus to upon creation. At that time it doesn't have a focus proxy
yet. That happens later, in QWebEngineViewPrivate::widgetChanged.

https://bugs.kde.org/show_bug.cgi?id=381793

Change-Id: Ifee610bb76a2d4d2797b98ece9bffe5fffe3c6a6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-07-29 17:15:02 +02:00
Qt Forward Merge Bot
f53fc76060 Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" 2019-07-29 15:33:37 +02:00
Tor Arne Vestbø
f4647b40ca macOS: Respect QSurfaceFormat color space when creating NSWindow
Task-number: QTBUG-47660
Change-Id: I90a2956bfaa52c361a3eba32f0ea19c0eca8c277
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-07-29 15:24:05 +02:00
Alexandru Croitor
a285bcba26 Ugly fix for handling QT_SOURCE_TREE
QT_SOURCE_TREE is a variable that is set in qtbase/.qmake.conf.
In qtbase, it's used throughout various
projects to find cpp sources when building standalone tests (among
other things).
Everything works fine with qmake, because even if qmake is invoked
on the tests subfolder, qmake searches up the source directory tree
until it finds a .qmake.conf file, and uses that.

When building qttools with qmake, the qdoc project expects
to have a QT_SOURCE_TREE value, but it's not actually set in the
qttools/.qmake.conf file, so the generated include paths that use
that value are incorrect. Curiously the build still succeeds.

Now in CMake land we replaced QT_SOURCE_TREE with
CMAKE_SOURCE_DIR, but that does not work properly when doing a
standalone tests build, because the project in that case is the
tests one, and not the qtbase one, so configuration fails in a
developer build when trying to configure some private tests.

So far I've found that only qtbase actively uses this value.
A temporary fix is to save the qtbase source directory into a
QT_SOURCE_TREE variable inside the generated
BuildInternalsExtra.cmake file.

The pro2cmake script is changed to handle presence of QT_SOURCE_TREE
in a qrc file path. This is handled by finding the location of a
.qmake.conf file starting from the project file absolute path.
This is needed to stop the script from crashing when handling
the mimedatabase test projects for example.

The change also regenerates the relevant failing test projects, and
thus standalone tests (when doing developer builds aka private_tests
enabled) now configure and build successfully.

Change-Id: I15adc6f4ab6e3056c43ed850196204e2229c4d98
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-07-29 13:16:14 +00:00
Simon Hausmann
c75dcc6875 Permit the use of qml cache file generation even inside qtdeclarative
After re-arranging subdirs, the cmake target level dependencies can
handle building qmlcachegen before running the custom command for
generating cache files.

Change-Id: I8a35b2b5bfd2fdf4b49462ff9c27e5f3075254fc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-07-29 13:15:16 +00:00
Liang Qi
6887ae2ff9 cmake: Enable network test
Task-number: QTBUG-74146
Change-Id: Ib29d1531f89676afb2b4df5032529b731ace029d
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-07-29 13:14:55 +00:00
Alexandru Croitor
1307736c7d Fix testdata handling
Make sure to handle glob expressions in the entire path given, not just
the end of the path. This handles tests like qsslkey and qnetworkreply.

Also copy/install the testdata in the final test directory path under
a "testdata" subdir.
Previously INSTALL_TESTDIR was used, which was never set to anything.

Change-Id: I2408e12f586cadeb524ffa249e851a4179324b23
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2019-07-29 13:14:44 +00:00
Yuya Nishihara
7cf9f4e3d3 kms: Try to preserve existing output routing as weston would do
This is basically a backport from weston:
75487c2560

It states that:

 - preserving the existing CRTC -> encoder -> connector routing will
   make the startup faster
 - the existing routing may be set according to some device limitations

Since the QtWayland implementation appears to be based off an old
version of weston (maybe pre-2.0), this patch might look different from
the latest weston implementation. But the idea stays the same.

FWIW, this works around the issue I've seen on Renesas R-Car E3 (aka
Ebisu) board. Without this patch, VGA1+HDMI1 setup would fail because
the device reported possible_crtcs=1 (meaning {crtcs[0]}) for the second
screen "HDMI1", but the crtcs[0] was already taken by the first screen
"VGA1".

  No usable crtc/encoder pair for connector "HDMI1"

With this patch, the crtcs[1] is paired with "VGA1" (as it is the
existing routing), so the crtcs[0] can be allocated for "HDMI1".

Change-Id: Ibd304a8b5efbe4a8aa94b2c5697fe2b399386280
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-07-29 21:46:58 +09:00
Eirik Aavitsland
ac885a34ec Revert "Fix comparisons of image with different color spaces"
QImage comparison has always ignored differences in
metadata. Introducing colorspace comparison can break backwards
compatibility, as not all image formats or handlers have colorspace
capability.

This partially reverts commit
733ca2230c.

Fixes: QTBUG-77205
Change-Id: I1d525a9727e84502624cd118f503eec7be306c99
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-07-29 12:45:16 +00:00
Marc Mutz
ce99361cc0 QEasingCurve: fix missing copy() override
TCBEase is-a BezierEase, but overrides value(). It only performs additional
checks and then calls the base class' implementation, but it feels wrong,
like a bug waiting to manifest itself, that slicing should occur on cloning
a TCBEase.

Fix by adding the missing reimplmentation.

Change-Id: I2524f51fec1850ff36ed706bc79e9592734d8680
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2019-07-29 12:45:12 +00:00
Marc Mutz
93b845464f QStringView: two fixes for newly-added toWCharArray()
Amends e89fbd8c3a.

- While QString::data() never returns nullptr, QStringView::data()
  may, which makes calling QStringView{}.toWCharArray() UB on Windows
  (since memcpy's 2nd argument must never be nullptr, even if the size
  is zero). Fix by protecting the memcpy call.

- QStringView, by design, does not use out-of-line member functions,
  because calling these forces the QStringView object onto the stack.
  Fix by making inline.

Also use the more efficient qToStringViewIgnoringNull(), as the result
does not depend on QString::isNull() (no characters are written
either way), and add a missing article to the function's docs.

Change-Id: I5d6b31361522812b0db8303b93c43d4b9ed11933
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-07-29 12:45:08 +00:00
Leander Beernaert
e61a7a2c57 Add support for qmlcachegen
This patch adds support for qmake's qmlcache feature. It's enabled
when option EMBED_QML_FILES is not present in add_qml_module.

Change-Id: I9b35f0bda7dfaf777f55c14eaf3d763f9b550fa4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-07-29 11:52:43 +00:00
Andre de la Rocha
c8bb8cb761 Windows QPA: Fix detection of the Surface Pen eraser button
The Surface Pen eraser button generates Meta+F18/19/20 keystrokes, but
when it is not touching the screen the Fn WM_KEYDOWN message is eaten
and only a Fn WM_KEYUP message with the previous state as "not pressed"
is generated, which would be ignored. With this patch we detect this
case and synthesize the expected key events to allow the button to be
used in applications.

Fixes: QTBUG-77153
Change-Id: I075f5cbb903cb36c9ec241ee1bb31d436b725e3a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-07-29 12:38:05 +02:00
Oliver Wolff
56b1cb0b04 Move processOpenModeFlags out of QFSFileEngine
The same logic is needed for QWinRTFileEngine. To be able to reuse the
code, it was moved out of the class.

Task-number: QTBUG-77095
Change-Id: If52b2fc8a0f3056d32fc693775565a1c3803b7d4
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-07-29 12:23:07 +02:00
Oliver Wolff
3fbb6a9572 QWinRTFileEngine: Handle QIODevice::Truncate when opening files
Fixes: QTBUG-77095
Change-Id: I45b38fab779518c49b22077c493d8640572d40d9
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2019-07-29 12:22:55 +02:00
Qt Forward Merge Bot
154155f588 Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/corelib/io/qresource.cpp

Change-Id: I54917f72444a621bd08aeaa15f5d17415993144d
2019-07-29 11:56:00 +02:00
Orgad Shaneh
1061103890 qmake: Use a simple response file for ar on mingw
This change allows using custom flags for ar. For instance, it is
now possible to create a thin archive by setting QMAKE_LIB += -T.

This uses and extends commit d92c25b1b4
which served a similar purpose for the linker.

Change-Id: Ie1d6a0b957dc4809957726de00911c8d91647fab
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-07-29 08:41:27 +00:00
Aapo Keskimolo
7301e44161 Convert dependencies.yaml to dict from list
Change-Id: I8a9df23c5cc66568d17f3c53af40ace97cfe7ab6
Reviewed-by: Toni Saario <toni.saario@qt.io>
Reviewed-by: Aapo Keskimolo <aapo.keskimolo@qt.io>
2019-07-29 11:32:05 +03:00
Marc Mutz
adab531771 Port from QStringViewLiteral to u""
Now that all our supported compilers know char16_t, we no longer need
QStringViewLiteral, whose only purpose in life was to turn u"" into
L"" for MSVC < 2015.

Change-Id: I25a094fe7992d9d5dbeb4a524d9e99e043dcb8ce
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-07-29 11:17:28 +03:00
Marc Mutz
eb39185acb QGraphicsWidget: replace manual memory management with unique_ptr
Change-Id: Ib63812cf1e63e33dff5016d37a37f18bf9aa6ee0
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2019-07-29 10:17:25 +02:00
Volker Hilsheimer
fe8cd567dd Add IPv6 data to the reverseLookup test
Passes locally, and there is no reason why it shoulnd't. Use IPv6
addresses for Google and Cloudflare DNS servers, and as with the IPv4
tests, rely on Python and (as a fallback) nslookup to produce the
reference.

Change-Id: I584f8ae9bc89c66a1f59d7b1e7493d0ed8033e8a
Fixes: QTBUG-22287
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-07-29 09:35:30 +02:00
Oliver Wolff
7138d6fd6b QWinRTFileEngine: Implement setSize
Fixes: QTBUG-77132
Change-Id: Ic0410297a2215f1b7b656966cbe84b925706532f
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2019-07-29 09:13:38 +02:00
Lorn Potter
570fb55a33 wasm: fix wide character data download
Need to pass correct buffer size

Change-Id: I19cb65114f49decc225cd807d59f1f08ad6b70c9
Fixes: QTBUG-76212
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-07-29 09:25:48 +10:00
Marc Mutz
186bdec01a Standardize on unique_ptr to hold QAbstractFileEngine
This will make it possible to return it from functions in an owner,
as exemplified in the QFileInfoPrivate ctor, unlike QScopedPointer,
which lacks move special member functions.

Change-Id: I179ffa4f656e1b83c23e0f67d1542834460ff382
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-07-28 12:16:22 +00:00
Marc Mutz
80d7ba4c49 QGradientCache: fix use of deprecated QHash::iterator::operator+
Use std::next, which will transparently loop over ++it instead of
calling op+, whenever the time has come to do so.

Change-Id: Icee38bd96894488cf53c1596cd611c61cc68ace8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-07-28 12:21:55 +03:00
Friedemann Kleint
82d24b4388 QFileSystemModel: Remove model member variable from test
The test instantiated and deleted a model in each test which is
wasteful since not all tests use it. Remove it and introduce per-test
variables instead.

Task-number: QTBUG-76493
Change-Id: I1684ea5b8eac7b52bb99e830f723693c51e8b9a5
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-07-27 10:54:28 +02:00
Qt Forward Merge Bot
cd35ad8318 Merge "Merge remote-tracking branch 'origin/5.13' into dev" 2019-07-27 01:00:50 +02:00
Qt Forward Merge Bot
f9b8c544e6 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: Ic6cfe08dbda1dc92b969e67063f805df63ba0fcf
2019-07-27 01:00:37 +02:00
Edward Welbourne
15fd596fdd Fix typo: s/QLocal/QLocale/
This amends commit 1d8c9978fa in which I
perpetrated this typo.

Change-Id: Iccfc14aff7c4f3976b92919c8e8dc4b7906642ae
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-07-26 18:34:24 +02:00
Volker Hilsheimer
e24a4976be QHostInfo: Always post results through the event loop to the receiver
Lookups performed via QHostInfoRunnable must not synchronously call
the user-code's receiver objects, as that would execute user-code in
the wrong thread. Instead, post a metacall event through the event
loop of the receiver object, or the thread that initiated the lookup.

This was done correctly for the trivial cases of empty host name or
cached results, so the code generally existed. By moving it from a
global function into a member function of QHostInfoResult, we can
simply access the required data to construct and post the event.

As we process that posted event, we need to check that the context
object (which is already guarded via QPointer) is still alive, if
we had one in the first place. If we had one, and it's deleted, then
abort.

[ChangeLog][QtNetwork][QHostInfo] Functors used in the lookupHost
overloads are now called correctly in the thread of the context object.
When used without context object, the thread that initiates the lookup
will run the functor, and is required to run an event loop.

Change-Id: I9b38d4f9a23cfc4d9e07bc72de2d2cefe5d0d033
Fixes: QTBUG-76276
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-07-26 17:59:47 +02:00
Tor Arne Vestbø
e6498362fd macOS: Respect color space set on NSWindow when flushing backingstore
By default Qt tries to avoid potentially costly color matching by
not assigning an sRGB color space to our backingstore, even if
that's what we in practice fill it with.

We used to do this by assigning the display's color space, which
effectively opts out of color matching, similar to the old behavior
of the device RGB color space (which nowadays implies sRGB).

By picking up the color space from the NSWindow instead, we allow
the user to override the color space to trigger color matching,
for example by explicitly setting it to NSColorSpace.sRGBColorSpace.

NSWindow will fall back to the screen's color space if the window
doesn't have one set.

Task-number: QTBUG-47660
Change-Id: Iac8177e85e86fe9044a41eb2c93fbf26bb83c248
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-07-26 15:33:27 +02:00
Timur Pocheptsov
5b3c09e35f QMacStyle - another slider fix
As a follow-up to fixed resize handling: the trick Gabriel wanted
to use to enforce a specific look on a slider's bar, never actually
worked due to misplaced statement which essentially is cancelling
the 'magic' before the bar is drawn. Now it's fixed: bar is centered
(between the rows of tickmarks above and below) + it's had a nice
blue filling back!

Change-Id: I3021c2b86e4c25981eeee015e32baa24ccebc3bd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-07-26 15:12:17 +02:00
Liang Qi
28af6e97e5 Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" 2019-07-26 13:29:27 +02:00
Friedemann Kleint
84a58e514b QFileSystemModel: Brush up the test
- Use nullptr
- Instantiate test helpers on the stack or use QScopedPointer
- Remove C-style casts of enumerations/flags, use meta types
- Port to Qt 5 connection syntax
- Fix static method invocation
- Use initializer lists for QStringList
- Introduce a logging category for all debug output
- Streamline code
- Refactor cleanup() to operate on QFileInfoList which is faster
  and streamline
- Remove unused variables

Task-number: QTBUG-76493
Change-Id: I3a033af7c9ec4dac3149d2016104daad07797a4f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-07-26 12:01:57 +02:00
Dominik Holland
a2fa624c79 Revert "eglfs: Add vsync support when using NVIDIA eglstreams"
This reverts commit df2b76046d.

The patches causes high cpu load and it looks like vsync is done
by newer NVIDIA drivers out of the box without such a implementation.

Change-Id: I41c9cfcf1bbdf7da9b764394e4442768084e9a35
Fixes: QTBUG-74866
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-07-26 11:33:38 +02:00
BogDan Vatra
698faf7b6d Android: Fix SSL 1.1 support on API-21
OpenSSL 1.1.x libs must be suffixed otherwise it will use the system ones which on API-21 are OpenSSL 1.0 not 1.1

Fixes: QTBUG-76884
Change-Id: I7d4052be68cf7dc65f74a48da8e1e37182056a5e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-07-26 12:20:15 +03:00
Marc Mutz
6bc7309135 QResource: fix nullptr-check gone tautological
Amends 136c5b9338.

Before that change, each of the three members was a separate
Q_GLOBAL_STATIC, so checking resourceList() for nullptr was the
correct thing to do to find out whether the static was already
destroyed.

After the change, the resourceList() function will never return
nullptr. Either resourceGlobalData.isDestroyed(), in which case
dereferencing it asserts, or it isn't, in which case resourceList()
returns a valid pointer.

An explicit isDestroyed() check was added to the unregister function,
but the register one was also checking resourceList() for nullptr,
and this was left unprotected.

Add the check and remove the now-tautological checks for nullptr
resourceList().

Change-Id: I41fe66939ce858a77802b8af04c1de6e4fafe048
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-07-26 12:18:47 +03:00
Edward Welbourne
fc2ed2361c Tidy up some messy code in QLocale
It was using if/else with extraneous braces, where simple ternary operators will do.
It was doing a StringView content check clumsily when mid() and startsWith() suffice.

Change-Id: I693f29ce5b425d53469d2c756fe27459f36470e9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-07-26 11:04:58 +02:00
Liang Qi
bf08e0bbb2 Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/network/access/qhttpthreaddelegate.cpp

Change-Id: Id47b977587e2d713c16ac17e63c5ec80c2f05ee9
2019-07-26 10:13:06 +02:00
Marc Mutz
082f10c9eb QOpenGLWindow example: use std::unique_ptr instead of QScopedPointer
QScopedPointer is scheduled for deprecation, and can't decide whether
it wants to be a scoped, or a unique pointer.

The use of a unique_ptr members requires that the destructor be
out-of-line, since the payload classes are only forward-declared in
the header file.

Change-Id: Id0dcdde52cb3adc30d3051d2eed1d24c76154921
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-07-25 14:17:51 +00:00
Leander Beernaert
88bf485f91 Add EMBED_QML_FILES option to add_qml_module
Some projects in QtQuickControls force the qml files to embedded into
the binary. This change exposes an option to mimic that bevhavior.

Change-Id: I4cbf0c21c05ca03b8dd1189eb7d81e43279c7157
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-07-25 09:44:03 +00:00
Leander Beernaert
a92f029e2a Fix QML_FILES conversion
Use a the more appropriate scope.get_files() to retrieve the qml file
list from the qmake project. This makes it more consitent with the
rest of the conversion script and fixes some issues with incorrect
aliases in qrc files.

Change-Id: I8907516be9457ba0d60d14af53d241197637aa9f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-07-25 09:42:09 +00:00