Commit Graph

44209 Commits

Author SHA1 Message Date
Edward Welbourne
26f6aa3e50 Configure the MS-Win long time format rather than assuming we know it
In tst_QLocale::windowsDefaultLocale(), we configure the long and
short date formats and the short time format eccentrically, then
verify that QLocale::system() does actually get these eccentric
formats. However, we did not configure the long time format (whose
MS-API name doesn't match that of the other formats), so had to rely
on a guess at the system locale's format. That, however, is not
robust; so now configure the long time format, too.

Removed a duplicated test, at the same time.

Fixes: QTBUG-36306
Change-Id: I04dc22c7eb1b58af55412b598873868f79e9c74f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-02-06 12:56:58 +01:00
Volker Hilsheimer
d75d22f785 Docs: tag newly added QFile and QFileInfo APIs as \since 5.15
Change-Id: I7d8605221a28cd05b4ebdbf20adf00ec3e121b58
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-02-06 12:21:25 +01:00
Qt Forward Merge Bot
d37f58e75b Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2020-02-06 11:38:18 +01:00
Qt Forward Merge Bot
8ce0ad805d Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/network/ssl/qsslsocket_openssl_symbols.cpp

Change-Id: I8c13b5c48a8ecce96540b39c6d5f8ca146eb2339
2020-02-06 11:10:34 +01:00
Jan Arve Sæther
8c6c4df3e8 Maintain at least 500ms timestamp distance between each test function
If we had one test function that just did

tst_Mouse::f1()
{
    QTest::mouseMove(w, QPoint(0,0));
}

and another test function that did

tst_Mouse::f2()
{
    QTest::mouseMove(w, QPoint(500,500));
}

their corresponding event timestamps were only 1 apart from each other.
This meant that any code that tried to estimate the velocity of a mouse
cursor would get a really high velocity estimate inside f2(). This would
come as a surprise to most people. So to avoid this, we add a 500 ms
timestamp delay between each test function call.

In theory this could also prevent generating a mouseDoubleClickEvent
when a pair of test functions containing a press-release sequence was
run, but there is a separate pre-existing mechanism to handle that case.

Change-Id: Icd4fc35853c09f080466d22411208c7b5c4174b5
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-02-06 09:31:47 +01:00
Assam Boudjelthia
6d6ca70538 Android: Allow requesting qtvirtualkeyboard with QT_IM_MODULE
Allow Android apps to request qtvirtualkeyboard using environment
variable QT_IM_MODULE.

Similar to commit b46fe39d94 for Windows
platform.

Task-number: QTBUG-80357
Change-Id: I584859729e60f5d73943ca5840a9dcd169cc9ecb
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-02-06 09:48:31 +02:00
Sze Howe Koh
c3050b6d96 Rename Qt::ReturnByValue_t -> Qt::ReturnByValueConstant
Copy the convention of QDeadlineTimer::ForeverConstant

Task-number: QTBUG-48701
Change-Id: Ic7760b7ffec630f1cd47361f5adda3f17fffb9f6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-02-06 07:37:15 +08:00
Volker Hilsheimer
74a2467edd Add QFile::moveToTrash, which moves a file to the trash
Due to the nature of QFile just operating on a file path, this also
works for paths that are actually directories.

The test covers files from different locations on which this
operation should typically succeed, but tries to handle the case
where trashing files will fail because of the file system
structure.

On Windows 7, running the test will open a confirmation dialog as
the implementation of IFileOperation doesn't respect the various
flags. This might depend on the specific Windows 7 patch level,
and the option to always use SHFileOperation on that platform needs
to be evaluated further.

[ChangeLog][QtCore][QFile] Introduce QFile::moveToTrash to allow
applications to move files to the trash.

Change-Id: I45019040c25b30f7db293b6933c63aca2f319514
Fixes: QTBUG-47703
Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
2020-02-05 20:21:45 +01:00
Leander Beernaert
225113d59b Fix qt_add_qml_module() for non-prefix builds
Always set the installation directory for Qml modules as it is required
for qt6_add_qml_module() to set the correct properties so that qml files
can be copied to the right location.

This patch also fixes the copy of qmldir. As it previously stood, the
copied file was not complete as it is possible fore the contents to
change after we exit this function.

Change-Id: I974269cf0507664b005a93bf27ab19941d99f1d6
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-05 15:18:31 +00:00
Leander Beernaert
20bb59ca61 Allow manually specification of moc.json files for metatype generation
qt6_generate_meta_types_json_file() has been extended to allow the
generated moc_....cpp.json files to be manually specified. This now
enabled the metatype generation to be used without resorting to AUTOMOC.

Additionally, Core_qobject declaration order has been temporarily moved
as it otherwise does not produce the correct metatypes dependency file
for Core. This will be fixed in a follow up patch.

Change-Id: I3266ab3073db478458a0c1dbc8b9fbab16622a64
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-05 15:18:03 +00:00
Morten Johan Sørvig
d29aaf598a tst_qnetworkreply: Print proxy warning to stderr instead of stdout
This way we produce valid xml also for the no-proxy case.

Change-Id: I5a277255d22c3814fe463c0cd013c04ddc6ad919
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-02-05 15:01:10 +00:00
Alexandru Croitor
ac38fa1182 Regenerate projects to correctly handle private dependencies
Change-Id: I7d84bc9962bff5c89a90367ae704974c6ce2ec89
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-05 14:36:31 +00:00
Alexandru Croitor
c5b61d2e90 pro2cmake: Handle QT += core-private correctly for modules
If a module project (Quick) contains QT += core-private, the
qmake semantics translated to CMake would mean the following:

target_link_libraries(Quick PUBLIC Core)
target_link_libraries(Quick PRIVATE CorePrivate)
target_link_libraries(QuickPrivate INTERFACE CorePrivate)

Whereas a QT_PRIVATE += core-private only means
target_link_libraries(Quick PRIVATE CorePrivate)

without adding any public dependencies to QuickPrivate.

To achieve that, we need a few modifications to both pro2cmake and
QtBuild.cmake

- pro2cmake doesn't automagically add public and private dependencies
  to targets when encountering a private module assigned to QT.
  Instead it generates the logic described above by passing correct
  LIBRARIES, PUBLIC_LIBRARIES, and PRIVATE_MODULE_INTERFACE values.

- pro2cmake doesn't do any dependency magic for non-module targets
  anymore, like executables, plugins, internal_modules. This means
  that QT assignments are now regular public dependencies.

- qt_add_module and qt_extend_target now accept a new
  PRIVATE_MODULE_INTERFACE option.

- qt_extend_target does not automagically make private modules be
   public dependencies on other private modules.

- qt_extend_target correctly assigns PRIVATE_MODULE_INTERFACE values
  to Private module only. For other target types, it's a no-op.

The change requires regeneration of all projects.

When we fix pro2cmake and QtBuild.cmake to properly handle
internal_modules (create only Private modules without creating
a non-Private counter part), we will need another project regeneration
to correctly assign dependencies.

Change-Id: I4c21f26b3ef3b2a4ed208b58bccb65a5b7312f81
Task-number: QTBUG-81780
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-05 14:36:16 +00:00
Samuli Piippo
4ddd4bf1aa Add additional include path for DRM
Tegra has drm.h header in include/drm instead of include/libdrm

Both paths are defined in libdrm.pc, but those are not used since this
cmake file searches only for xf86drm.h.

Change-Id: If1e979c7d5aec520b18eed5b3fcbb5ac2e15cc62
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-05 12:54:51 +00:00
Assam Boudjelthia
6839d297b3 Android: Fix native open fileDialog crash on Android
Unregister the ActivityResultListener() after the result is handled.

Fixes: QTBUG-78912
Change-Id: Ia2b45eca002e854492c409c70a3876fa8ce98de1
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-02-05 13:19:15 +02:00
Morten Johan Sørvig
7dd6d32657 wasm: Specify event targets by CSS selectors; Support emsdk >= 1.39.5
DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR is now on by default, which
means that functions like emscripten_set_keydown_callback() now expects
CSS selectors (e.g. "#canvas_id" instead of "canvas_id").

In addition, Module.canvas is no more. Add a deprecation warning in case
someone is setting it and expects Qt to use it. (qtloader.js sets
qtCanvasElements instead).

This bumps the minimum supported emsdk version to 1.39.5.

Fixes: QTBUG-74601
Change-Id: I8c46ce170143f969e6281824f78b1bb809c267ab
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2020-02-05 11:48:04 +01:00
BogDan Vatra
0947cf66e5 Fix AndroidAbstractFileEngine
"" it's the root folder of the assets, setting m_fileName = "" will make
AndroidAbstractFileEngine::setFileName to fail and it will not set the
proper flags.

Fixes: QTBUG-81535
Change-Id: I0653f83b55ee790c8edf188889ccb30ef54584c0
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-02-05 12:41:34 +02:00
VaL Doroshchuk
9ecc595d71 widgets: Don't create winId when the widget is being destroyed
When QWidget is being destroyed, its winId is cleared, and
a QEvent::WinIdChange is sent. If a listener of this event
reacted by calling winId() again, we might crash.

A crash can be observed when this child widget is destroyed in dtor of its parent.
E.g. here is a hierarchy of widgets:
1:QWidget
 2:QObject
 3:QWidget
  4:QWidget

If a listener subscribed for WinIdChange events from (4),
and there is a connection to destroy (4) when (2) is destroyed.

This will lead to infinite loop:

1. QWidget::~QWidget
2. QWidget::destroy
3. QWidgetPrivate::setWinId(0)
4. QCoreApplication::sendEvent(q, QEvent::WinIdChange);
5. eventFilter
6. QWidget::winId
7. QWidgetPrivate::createWinId (this=0x555555957600) at kernel/qwidget.cpp:2380
8. QWidgetPrivate::createWinId (this=0x55555596b040) at kernel/qwidget.cpp:2387
9. QWidget::create (this=0x5555558f2010, window=0, initializeWindow=true, destroyOldWindow=true) at kernel/qwidget.cpp:1163
10. QWidgetPrivate::createWinId (this=0x55555596b040) at kernel/qwidget.cpp:2387
11. QWidget::create (this=0x5555558f2010, window=0, initializeWindow=true, destroyOldWindow=true) at kernel/qwidget.cpp:1163
12. QWidgetPrivate::createWinId (this=0x55555596b040) at kernel/qwidget.cpp:2387

Fixes: QTBUG-81849
Change-Id: Ib4c33ac97d9a79c701431ae107bddfb22720ba0d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-02-05 11:05:24 +01:00
Morten Johan Sørvig
7d19dd7730 wasm: Change compiler flags to target "upstream" llvm
As of version 1.39, Emscripten now uses upstream llvm instead of
the "fastcomp" fork. As a result of this em++ no longer builds
via the asm.js text format, and the performance issues related
to text parsing are gone.

Reducing the binary size for debug builds is no longer needed,
and we can fall back to using the default build flags.

This effectively makes 1.39.x the minimum Emscripten version for
Qt 5.15. The "-fastcomp" SDK variant is not supported.

Change-Id: Id66ef77294a9accd1b103e34785458d71dc188b1
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2020-02-05 09:59:27 +00:00
Samuli Piippo
0f8039140c qtbase: don't use neon flags on arm64
NEON is mandatory for aarch64 and compiler doesn't recognize
-mfpu=neon commandline argument.

Change-Id: I36e9c40e3fd3604d4895da0526152e90b2165770
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-05 09:45:14 +00:00
Samuli Piippo
e1170185e3 qtbase: use syncqt.pl from QT_HOST_PATH
Use syncqt.pl from QT_HOST_PATH if that is given, since qtbase
sources might not be available and CMAKE_INSTALL_PREFIX doesn't
check for sysroot.

Change-Id: I165b17a5a02fd4dbb2340bf69a641b8aaab8fabd
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-05 09:44:10 +00:00
Timur Pocheptsov
e5408b62bd Fix symbol resolving for OPENSSL_NO_NEXPROTONEG
Our ALPN-related definitions were conditioned both on OPENSSL_NO_NEXTPROTONEG
and OpenSSL version (since ALPN first was introduced in 1.0.2), but
resolving was only under version check, not OPENSSL_NO_NEXTPROTONEG.
This went unnoticed for many years, and was found only recently with
OpenSSL built with no-nexprotoneg.

Fixes: QTBUG-81762
Change-Id: I7afca0b2034a234a19b5bcdefd3ce26f4202cddb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-05 10:41:02 +01:00
Friedemann Kleint
6baed76654 uic/Python: Set form object name correctly
Add missing "not" for the isEmpty() check.

Fixes: PYSIDE-1210
Change-Id: I3798d483df9d077300ff69dc5d3a8d08812f534e
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-02-05 10:37:02 +01:00
Leander Beernaert
7e2c198e90 Remove retained quick compiler resource files
Remove retained file feature as the expected behavior now is for the
compiled file to be retained by default.

Change-Id: I5a791a182825b223eb4497970fbb1c47c70135cc
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-05 09:27:27 +00:00
Edward Welbourne
2767367795 Coding style: put case bodies on separate lines from the case label
While the single-line-case format is more readable when consistently
applied through the whole switch, it works less well when several of
the cases are too complex to fit on a single line.

Change-Id: I6a84a3d3d1493dadddab103da0336a8ef860563c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-02-05 10:24:01 +01:00
Edward Welbourne
41b2c477b7 Take care of NULL data from QStringView in QCollator
Back-ends need to catch NULL data so as not to call system APIs with
invalid pointers.

[ChangeLog][QtCore][QCollator] Fixed a regression introduced in 5.14.0
that caused QCollator not to operate with default-constructed QStrings
and print a warning on Windows.

Fixes: QTBUG-81673
Change-Id: I2eafe1e188b436afcca3cf2ecdf98bba707c44c9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-02-05 10:23:43 +01:00
Timur Pocheptsov
c9b8ebc223 QUrl::topLevelDomain() - deprecate in 5.15
And remove in Qt 6 (with private API remaining).

[ChangeLog][Deprecation Notice] QUrl::topLevelDomain() was deprecated in 5.15 and will be removed in 6.0

Task-number: QTBUG-80308
Change-Id: Ie053c9c8813274c971e2d6fc442dd6ce716fadf1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-05 09:00:01 +01:00
Sona Kurazyan
a20dbcf7c7 Deprecate QLinkedList
[ChangeLog][Deprecation Notice] QLinkedList is deprecated and will be
moved to Qt5Compat in Qt 6. It is recommended to use std::list instead.

Task-number: QTBUG-81630
Task-number: QTBUG-80312
Change-Id: I2c2b64e51d1cc2fd305aee6a11e9a89788f51eb4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-02-04 20:01:18 +01:00
Alexandru Croitor
5a985f020d Regenerate rest of qtbase
Change-Id: I3a1ce255d26522d8ad6694c5b0daaa53fb694de3
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-04 18:50:48 +00:00
Alexandru Croitor
7610805879 Regenerate examples
Change-Id: I04b2adbe370ffea81d7787ad90e4ae69d2c165cb
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-04 18:50:39 +00:00
Johan Klokkhammer Helsing
fcaa7506ba Move QOpenGLTextureBlitter from QtGui to QtOpenGL
Task-number: QTBUG-74409
Change-Id: Ie4a3dfd01ba44715de6da71c4420fe9a95a0c242
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-02-04 18:02:41 +01:00
Volker Hilsheimer
f8e39a6656 Fix build of bootstrapped tools with clang 10
Building of qmake fails with clang 10 due to QStorageInfo symbols not
being resolved. Since bootstrapped tools don't need this functionality,
we can remove the respective code and make the function fail as "not
implemented".

Change-Id: I48bbbd822e4f70630d903e5caead1a08fe4f13a8
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2020-02-04 17:48:46 +01:00
Volker Hilsheimer
336b3bb0dd Address failing test case for internal implementation of moveToTrash
This ammends 601ce9e08a, which added
a new test case for the internal Qt APIs. The test was not
getting executed by coin as it wasn't included in the io.pro file,
and trying to fix that generates link errors on Windows, since these
internal APIs depend on other internal APIs.

Short of bootstrapping much of QtCore into this test case, the only
sensible option is to remove this test case again, and cover the
testing when the public API is added in a follow up commit.

At the same time, address those failures that were discovered
on platforms that could build the test, and fix compilation on
iOS platforms in Coin.

Change-Id: Id31b43c9df9f205476c48bccb6b87c7a53ed15c5
Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
2020-02-04 11:58:56 +01:00
Qt Forward Merge Bot
6b858e21ed Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2020-02-04 10:49:41 +01:00
Qt Forward Merge Bot
97417e8f28 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	.qmake.conf
	examples/widgets/widgets/imageviewer/imageviewer.cpp
	src/corelib/text/qchar.cpp
	src/corelib/time/qdatetime.cpp

Change-Id: I9762f5c4ff650799219729d6aee79ac07ce9024a
2020-02-04 10:44:00 +01:00
Eskil Abrahamsen Blomfeldt
35262678c3 Experimental DirectWrite font database
Adds an opt-in experimental DirectWrite-based font database.

This cannot be the 100% replacement for GDI unfortunately, since
quite a few font formats used on Windows are still unsupported.
But it would be good to have it as an opt-in experimental feature
since it should make it easier to solve multiple font selection
issues we have on Windows.

In order to still share the DirectWrite-specific code between
the old and new database, this introduces a common base class.

Note that the feature depends on DirectWrite 3 support (Windows 10).

Fixes: QTBUG-74917
Change-Id: Ida08ec7ef4fda9fc78622ca4297909a727390a64
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-02-04 10:19:12 +01:00
Laszlo Agocs
b3422402b4 Clean up and modernize hellominimalcrossgfxtriangle manual test
This particular test may serve as sample code in various materials in
the future, therefore it is highly beneficial if it is kept in good shape.

Make it easier to read, more compact, and split up among the natural
boundaries of the functionality (global setup in main, window+swapchain
management in Window, graphics resource setup and draw call recording
in HelloWindow).

Change-Id: I2451d3961a01131dcbffe66baf23d2cf9bfd077f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-02-04 10:15:02 +01:00
Vlad Zahorodnii
9d49475e91 xcb: Compute correct global pointer position in startSystemMoveResize
QWindow::mapToGlobal() expects pos to be in device-independent pixels,
while in reality it's in device pixels.

We need to use QXcbWindow::mapToGlobal(), which operates on physical
pixels.

Change-Id: I8dcad5cc1f5d55df7950b36d97af5ce4b983ed54
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2020-02-04 11:11:07 +02:00
Nico Vertriest
6fee92770d Doc: Make snippets Qt Network compilable
Task-number: QTBUG-81489
Change-Id: I43446c7dafe60bc735fe463f359467b889952082
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-02-04 08:27:26 +01:00
Johan Klokkhammer Helsing
a13e8d6660 Move backing store OpenGL support to the platformcompositor module
QPlatformBackingStore had a dependency on the QOpenGLTextureBlitter, which is a
problem because we want to get rid of all the public QOpenGL* classes in the
gui module.

This splits the heavily QOpenGL dependent parts of the backing store
implementation into a separate class and moves it to the platformcompositor
module.

qplatformbackingstore.cpp is now mostly free from OpenGL implementation
details.

Platform integrations now have to explicitly request backing store OpenGL
support. This has been done for:

- xcb
- windows
- cocoa
- winrt
- android
- wasm
- ios

QPlatformGraphicsBufferHelper::lockAndBindToTexture is now exported so it can
be used from other modules.

Task-number: QTBUG-74409
Change-Id: I42ad9250e5a424939cf751a8ad880c7381ede2ae
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-02-03 22:05:44 +01:00
Thiago Macieira
02eb9df851 Add new AVX512 extensions found in Intel CLX, ICL and ICX processors
Cascade Lake (CLX) added AVX512VNNI, Ice Lake has added that plus the
integer multiplication (IFMA), the vector bit manipulation instructions
(VBMI and VBMI2), bit algorithms (BITALG), the extended vector AES
instructions (VAES), among others.

I haven't turned on the configure check for those yet. I believe the
VBMI and IFMA instructions will be interesting for Qt image algorithms,
but we'll need some Ice Lakes to do benchmarking on.

Change-Id: Ib5d667bf77a740c28d2efffd15cb43dd821d4b2d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-02-03 11:31:49 -07:00
Thiago Macieira
056230cc9c qfloat16: include the tables in AVX2 binaries regardless
Having a QtCore build optimized for AVX2 does not imply all user
binaries and libraries are optimized the same way. Most of them will
actually have been built for the base platform, which means they require
access to these tables to operate if they are using qfloat16.

Introduced by 5e40d3d982.

Change-Id: If79a52e476594446baccfffd15ee2da9e3693cce
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-02-03 10:31:25 -08:00
Lars Knoll
c6e1b54f94 Cleanup code where we mixed QHash and QMultiHash iterator code
Change-Id: Ib229cad13ca21d6288e009c6ee1c39fa974f80b8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-03 17:43:30 +01:00
Lars Knoll
7f67e91e55 Don't compile qmake in c++11 mode
Change-Id: Ia43dd67f3b83263b4be16e468b8c22598db9ac78
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-03 17:43:30 +01:00
Lars Knoll
eea82ab75d Cleanup QDBusArgument marshalling for containers
There's no need to specialize the marshalling for QList, QHash and QMap
when we can simply have generic code here that works for all containers

Change-Id: I442ac6009953d2bd8e5a7012262cffeb8e912034
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-03 17:43:30 +01:00
Lars Knoll
4681f1fc2c Separate streaming of QHash and QMultiHash/QMap and QMultiMap
Those classes will not have relations anymore in Qt6, so they need
separate streaming operators. Writing of multi maps/hashes requires some
additional care so that restoring keeps the order of how iteme have been
inserted.

Change-Id: If41d0c5c24962764a2cb81bd2de9e2fadf1a2b63
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-03 17:43:30 +01:00
Lars Knoll
10afe69c16 Use a QMap instead of a QHash for the ProValueMap
qmake relies heavily on stable references to nodes stored within the
container. QHash in Qt6 doesn't offer that guarantee, so use a QMap
instead, that supports this.

Change-Id: Ifcf3d67098585ea26f4e02f4570d407a56e33c9c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-02-03 17:43:30 +01:00
Lars Knoll
91b12a1add QVariantHash/Map can't hold multiple entries for the same key in Qt 6
This is a consequence of QHash being separated from QMultiHash.

Change-Id: Id3bb585c9882ecbaa02691c8ba6553748dd21a24
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-03 17:43:30 +01:00
Alexandru Croitor
4e7af2061e Merge remote-tracking branch 'origin/wip/cmake' into dev
This pulls the CMake port, which not only adds CMake files but also
modifies existing code. A brief summary of "seemingly unrelated" changes:

    * configure.json was re-formatted to not use multi-line strings. That
      is an extension of the Qt JSON parser but not JSON compliant, which
      is needed for the configure.json-to-cmake conversion script (python).
    * Some moc inclusions were added due to CMake's slightly different way
      of handling moc. With the changes the files build with qmake and cmake.
    * Since CMake just grep's for the Q_OBJECT macro to determine whether to
      call moc (instead of doing pre-processing like qmake), the existing use
      of "Q_OBJECT" in our documentation was changed to \Q_OBJECT, which cmake
      doesn't see and which is now a qdoc macro.
    * QTestLib's qFindTestData was extended to also search in the source
      directory known at build time.

What this change also brings is a new way of building modules in Coin by using
YAML configuration files that describe the steps of building and testing in Coin
specific terms. The platform configuration files in qt5 are instructed to use the
old Coin built-in way of testing ("UseLegacyInstructions" feature) but for any
configurations that do not have this, these yaml files in the coin/ sub-directory
are used and shared across repositories.

Change-Id: I1d832c3400e8d6945ad787024ba60e7440225c08
2020-02-03 15:01:53 +00:00
Edward Welbourne
71fa90a37c Enable system locale to skip digit-grouping if configured to do so
On macOS it's possible to configure the system locale to not do digit
grouping (separating "thousands", in most western locales); it then
returns an empty string when asked for the grouping character, which
QLocale's system-configuration then ignored, falling back on using the
base UI locale's grouping separator. This could lead to the same
separator being used for decimal and grouping, which should never
happen, least of all when configured to not group at all.

In order to notice when this happens, query() must take care to return
an empty QString (as a QVariant, which is then non-null) when it *has*
a value for the locale property, and that value is empty, as opposed
to a null QVariant when it doesn't find a configured value. The caller
can then distinguish the two cases.

Furthermore, the group and decimal separators need to be distinct, so
we need to take care to avoid cases where the system overrides one
with what the CLDR has given for the other and doesn't over-ride that
other.

Only presently implemented for macOS and MS-Win, since the (other)
Unix implementation of the system locale returns single QChar values
for the numeric tokens - see QTBUG-69324, QTBUG-81053.

Fixes: QTBUG-80459
Change-Id: Ic3fbb0fb86e974604a60781378b09abc13bab15d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-02-03 15:34:02 +01:00