Commit Graph

44162 Commits

Author SHA1 Message Date
Giuseppe D'Angelo
a065eb5c47 Silence another -Werror=class-memaccess
QDataBuffer when used with non trivally copiable types will
try to realloc them, causing GCC to complain.

Change-Id: I778d32d00774b0a53b85257be0064f19d9fb2bb9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2020-02-15 12:18:43 +01:00
Lars Knoll
735fd68dac Implement better hash functions for integer types
The hash function provides rather good mixing of the input bits.
It spreads numbers out evenly through the uint range, a change of
one bit in the input changes around half the output bits, and it is
pretty fast.

Using this as a hash function over the simple hash(int) == int has the
advantage that it reduces the amount of collisions for badly distributed
keys. In addition, it allows us to always use power of two sizes for the
hash table, leading to better performance for inserts and lookups.

the 32 and 64 bit hash functions where chosen from
https://nullprogram.com/blog/2018/07/31/. I selected the ones that give
a very good distribution of the hash values while using the integer for
both multiplication steps. This should be slighty faster than using two
different numbers.

While the result is still being cast to a uint, the method is prepared
so it can handle 64 bit keys and seeds.

Fixes: QTBUG-29009
Change-Id: Id7a1b97b3c0d219e65de2e6e1fe6faf092f8ce16
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-02-15 12:15:48 +01:00
Alexandru Croitor
d4c8ad79c4 Merge "Merge remote-tracking branch 'origin/wip/cmake' into dev" 2020-02-14 14:55:04 +01:00
Vitaly Fanaskov
141ec5c6cc QSignalMapper: remove deprecated signals
Fixes: QTBUG-81774
Change-Id: I644e8b067e2d7698c297978199fa5655804b79c5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-02-14 11:21:28 +01:00
Timur Pocheptsov
d5589bc494 QSslConfiguration - fix a warning
With non-OpenSSL backends parameters in setters are unused variables.

Change-Id: I2113042d39bd97adbe964089f5d7e93c1df31ec5
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-14 07:58:32 +01:00
Alexandru Croitor
c53ee1f054 Merge remote-tracking branch 'origin/wip/cmake' into dev
Conflicts:
	tests/manual/rhi/hellominimalcrossgfxtriangle/CMakeLists.txt

Hopefully final merge from wip/cmake, and then all cmake changes
should target dev directly.

Change-Id: I29b04c9b0284e97334877c77a32ffdf887dbf95b
2020-02-13 23:29:51 +01:00
Christian Ehrlicher
8471d267f1 QtSql: remove compat SQL plugin names
Remove the compat SQL plugin names (QMYSQL3, QOCI8, QODBC3, QPSQL7)
since they are not needed and just confuse the user

[ChangeLog][QtSql] The compat plugin names QMYSQL3, QOCI8, QODBC3 and
QPSQL7 are no longer available.

Change-Id: I6d88f449ef3e18881a6970fb374ba0ab074ef302
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-02-13 22:42:26 +01:00
Liang Qi
60feaae196 coin: remove contact person for cmake issues
Change-Id: Id274bf821f424077e7259ed42433f2ef88153c36
Reviewed-by: Toni Saario <toni.saario@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-13 20:14:12 +01:00
Liang Qi
6b2535ea15 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	examples/widgets/graphicsview/boxes/scene.h
	src/corelib/Qt5CoreMacros.cmake
	src/corelib/Qt6CoreMacros.cmake
	src/network/ssl/qsslsocket.cpp
	src/network/ssl/qsslsocket.h
	src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp
	src/testlib/CMakeLists.txt
	src/testlib/.prev_CMakeLists.txt
	tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp

Disabled building manual tests with CMake for now, because qmake
doesn't do it, and it confuses people.

Done-With: Alexandru Croitor <alexandru.croitor@qt.io>
Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io>
Change-Id: I865ae347bd01f4e59f16d007b66d175a52f1f152
2020-02-13 18:31:40 +01:00
Volker Hilsheimer
67491e2df5 Detect double timer during single timeout in registerTimer test, and skip
We observe this happening on macOS in the CI system, and it might happen
if a VM doesn't get CPU cycles for long enough time so that two timers
time out. Then event processing will process two timer events, and we
overwrite the timerIdFromEvent with the second event.

Instead, skip the test when this happens.

This is an ammendment to 5c520f4b0a

Change-Id: Ibc1169b5458c8dce9d4fe9ce715f49c396e17b86
Fixes: QTBUG-71751
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-02-12 22:16:26 +01:00
Alexandru Croitor
0d177053b9 Regenerate projects one last time before merge
Change-Id: Ia24cf56b79ca6dacd370a7e397024e9b663e0167
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-12 17:30:49 +00:00
Jan Arve Sæther
5e83a2eed2 Deprecate one overload of QInputDialog::getDouble() for 5.15
...and merge the two overloads of getDouble() in Qt6

Change-Id: I55faa2ff222b41e48889a0ef14dd00a6da691c36
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-02-12 16:10:24 +01:00
Morten Johan Sørvig
2b0af50c8b wasm: store and pass canvases as emscripten::val
Store and pass canvases as emscripten::val instead of
a QString containing the element id.

This simplifies code which interacts with the canvas
using the emscripten::val API, by removing the need to
look up with getElementById.

The Emscripten C event API does not accept emscripten::val,
and using the element id is still needed here.

emscripten::val does not provide a hash key suitable
for use with QHash, but does provide an equality-compare
in the form of val::equals(). Change the canvas->screen
mapping code to use a QVector instead of a QHash.

Change-Id: I1dbdbbc8fb06bb869031f1500e83ae2d64780a7f
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2020-02-12 14:50:47 +00:00
Leander Beernaert
36089f5e77 Fix metatypes source dependencies for non-prefix build
Change-Id: I0b262929f74c8da10f42d9ddbc7c119dc21619cf
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-12 09:34:12 +00:00
Jan Arve Sæther
e290ebae9f a11y: Remove a ### Qt6 that doesn't make much sense
Since the enum names are "the same", the comment seems to suggest to
change the enum value of Canvas to 0x401. I don't see any benefit to
that really.

In addition, we are today using UIA in favor of MSAA, and the closest
matching role (controlTypeId) seems to be for a static image
(UIA_ImageControlTypeId), which is quite different from the semantic of
IA2_ROLE_CANVAS.

For the record, here's a list of similar roles for different a11y APIs:

IA2:
  IA2_ROLE_CANVAS        An object that can be drawn into and to manage
			 events from the objects drawn into it. Also
			 refer to IA2_ROLE_FRAME, IA2_ROLE_GLASS_PANE,
			 and IA2_ROLE_LAYERED_PANE.

MSAA:
  ROLE_SYSTEM_DIAGRAM    The object represents a graphical image that is
                         used to diagram data.

UIA:
  UIA_ImageControlTypeId Identifies the _Image_ control type.

atspi:
  ATSPI_ROLE_CANVAS      Object that can be drawn into and is used to
                         trap events.

Change-Id: Ic2ead0dc40be0ae2e798f49285eb6a392cc29142
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2020-02-12 10:02:15 +01:00
The Qt Project
f4a52b79ce Merge "Merge remote-tracking branch 'origin/dev' into wip/cmake" into wip/cmake 2020-02-12 08:47:47 +00:00
Leander Beernaert
99da0c164b Use INSTALL_QMLDIR instead of Qt6_DIR for qmltypes properties
Change-Id: Ic7e6230656670ebe925530eea5e34b16b6fea59b
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-12 08:45:38 +00:00
Christophe Giboudeaux
aa94565f89 Use INSTALL_DOCDIR when possible
Hardcoding 'doc' causes issues when installing qtbase but also
when trying to build the other modules documentation.

Change-Id: I5c57852add59d0dc0d067813feea0bbb0962c84b
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-12 08:45:22 +00:00
Mårten Nordheim
f126d44db6 Add library mapping for QtShaderTools
Change-Id: Ideefd13d75bdd4e0463c0f7b1e15c0781cfffe8c
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-12 08:44:51 +00:00
Leander Beernaert
572c03eb7a Add support for qt_helper_lib()
Add qt_add_3rdparty_library() function as a replacement for qmake's
qt_helper_lib feature.

All 3rdparty libraries will be available under the Qt:: alias when built
through this method so that they can properly register as dependencies
of a Qt module.

This patch also adds Qt3rdPartyLibraryConfig.cmake.in to export the
CMake configuration for static builds and shared libraries.

Change-Id: I52bf3a95ca22fccd9ab54343468847bb1b570c28
Fixes: QTBUG-81969
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-12 08:43:29 +00:00
Leander Beernaert
a2eb09a377 Only export public module link dependencies for shared builds
Unless we are building under a static library configuration there is no
reason to export the dependency on private libraries.

Change-Id: I724da38495dc55cc2783d4b19c01533fc0900d22
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-12 08:37:38 +00:00
Eskil Abrahamsen Blomfeldt
54c2cebabd Make it possible to enable DirectWrite font database
A last minute change to fix compilation on Windows 7 accidentally
disabled the opt-in of the DirectWrite font database, because
the QT_USE_DIRECTWRITE3 define was only defined for
platformsupport/fontdatabase.

Change-Id: I25fb33b4d84044decd495f5638ffe1dca743f1b7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-02-12 07:51:33 +01:00
Eskil Abrahamsen Blomfeldt
04b50ed011 Remove work-around from thaiWithZWJ test
We added a work-around to disable the test when the Waree Book
font was not available, but this also excludes perfectly valid
versions of the font, so it is a bit unfortunate.

Change-Id: Ibeeff78d87acc384c1aa1b01e988edd524c60575
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-02-12 06:33:54 +00:00
Qt Forward Merge Bot
9a5df00a61 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I8caee4d1ce0eed27d905194df3c3d46c5d07d2b0
2020-02-12 01:00:50 +01:00
Alexandru Croitor
c53f8c038c Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: Ia0f7f0f1511f9f593c6d4585c859d1bf1353540d
2020-02-11 20:23:12 +01:00
Hikaru Terazono (3c1u)
243f4b2a8c Fix sorting of fallback fonts based on writing systems
Now qt_sort_families_by_writing_system checks all writing systems for sc
ript. This makes Japanese text look properly on macOS.

Task-number: QTBUG-81924
Change-Id: Id2a149eb84c5992414505b079be4e707f7f8c6c7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2020-02-12 02:36:25 +09:00
Simon Hausmann
f9802b2fb1 Prospective fix for build with -Werror
home/qt/work/qt/qt5/qtbase/src/platformsupport/linuxaccessibility/constant_mappings_p.h:110:8:
error: ‘<anonymous>.TestNamespace::RoleNames::m_spiRole’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]

Change-Id: I514417b33c6142e4d87b97b24dec76d68ec92ab8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2020-02-11 18:36:17 +01:00
Timur Pocheptsov
47189b3a67 Cleanup QSsl code a bit
to get rid of the remaining deprecated enumerators/related names
and documentation bits.

Fixes: QTBUG-76501
Change-Id: I72aa837daf64d8336c95a4708840e0dec3e82d2b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-11 18:36:17 +01:00
Volker Hilsheimer
4e796e0b0d Stabilize QFileSystemModel::dirsBeforeFiles test
Make the test operate in its own temporary directory, so that entries
left behind by other test functions don't impact this test.

Also, call QFileSystemModel::sort explicitly; it would otherwise only
be done once through a single-shot timer, and the test processes events
until the model is populated, which might not process that delayed
sorting. Since dirsBeforeFiles tests the sorting algorithm and not
the sorting logic, best to do this explicitly.

In case of sort failure, print diagnostics.

Change-Id: I44c2b82ef1330cc8787aed2b5cbf109ef3a67876
Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io>
Fixes: QTBUG-75452
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-02-11 17:27:41 +01:00
Ulf Hermann
673038ebd5 metatypes: Only load qt_build_paths if we need them
Otherwise this fails for user projects.

Fixes: QTBUG-82038
Change-Id: I01bae2aab28bcedf745d1c5ae6932659ed4a7ed5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-11 15:36:18 +01:00
Alexander Akulich
c08b0cec2f QLocalSocket: Deprecate 'error' signal, use 'errorOccurred' instead
[ChangeLog][Deprecation Notice] QLocalSocket::error() (the signal) is deprecated; superseded by errorOccurred()

Change-Id: I579c07564f5c470cf2867864755e0a26e6afce3b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-11 16:54:59 +03:00
Alexander Akulich
1c573ba47c QLocalSocket: Rename private errorOccurred method to setErrorAndEmit()
The method named like a signal and can lead to confusion especially
if such a signal will be added.

The new name taken from QAbstractSocketPrivate::setErrorAndEmit(),
though in QLocalSocket the method is NOT the only place of the error
set and the signal emission.

Change-Id: I7cdc487a39ec290203cced7359527f888342a0ad
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-11 16:54:50 +03:00
Alexander Akulich
c034f92fc2 Revert "QLocalSocket - deprecate ambiguous 'error' overloads"
This reverts commit 0de6c26ac1.

The patch fixes ambiguity between a getter and a signal by changing the
getter name, but we still have to rename the signal to follow the signals
naming convention.

Revert the commit to keep the getter as is and change the signal name instead.

Change-Id: I67dbb5cada25da473bdd02e71b1e2d9bd03f039e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-11 16:54:33 +03:00
Vitaly Fanaskov
11dc7b35c8 QComboBox: deprecate currentIndexChanged(const QString&)
Task-number: QTBUG-81845
Change-Id: Ia0ff5321423a5d3d4853bd425dd7236926f16047
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-02-11 10:37:10 +01:00
Samuli Piippo
9bab556005 Fix typo for Mtdev pkgconfig target
Change-Id: Id6e7057e8010f67ba1c8ce948abc59bc7abf7b7b
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-11 09:20:14 +00:00
Alexandru Croitor
c9e67a7926 CMake: Regenenerate projects where recent changes happened
Change-Id: If86e49d73a45b7cfc494fa48bdc6cb1ba503b112
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-11 10:19:45 +01:00
Alexandru Croitor
f1ae5ae726 Merge "Merge remote-tracking branch 'origin/wip/cmake' into dev" 2020-02-11 10:19:42 +01:00
BogDan Vatra
dd04fb639b Set also ndk.dir
It's needed when ANDROID_NDK_HOME is not set

Fixes: QTBUG-81978
Change-Id: Id6108083ae62757ca839d652793d98a89e6cb6b5
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-02-11 11:16:42 +02:00
BogDan Vatra
59121d2980 Fix ANDROID_XXXX replace qmake function call
The second parameter of replace is a regex, therefore trying to replace strings like
"plugins/sensors/libplugins_sensors_qtsensors_android.so" will result to super strange
results.

Fixes: QTBUG-81974
Change-Id: I887e70f4fd8fa2af482a60f63af371f954b56ce1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-02-11 09:16:42 +00:00
Johan Klokkhammer Helsing
79da236e76 QOpenGLContext: Remove QGL helpers
They were all private, and used only by QGL* (which have been removed) so
should be safe to remove.

Task-number: QTBUG-74408
Change-Id: Ia7fdff8f0bb963449470dbd8296cbdd8652c50e2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-02-11 07:45:03 +00:00
Jan Arve Sæther
a0da15f2c9 Remove comments about destructors needing to be empty
Not important, but removes some ### Qt6 comments from my radar

Change-Id: Ifd1bf44c44ece8fa1314d3c7e0e95d1bd37ae0ea
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2020-02-11 07:34:20 +01:00
Eskil Abrahamsen Blomfeldt
15aade6c76 Fix compilation with -no-directwrite
The refactoring for adding the DirectWrite font database broke
disabling this feature, which in turn broke compilation with CMake,
since the configure test isn't added there yet.

Change-Id: I7727145112df7f1009a09f09bf3368645fb1b5da
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-10 23:03:51 +01:00
Cristian Adam
4d798801e0 CMake Support: Fix dependent libraries search for MinGW and CMake 3.17
Fixes: QTBUG-81903
Change-Id: Ie2847e38c196c1f9d664b1a35339cca5ebf424cc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-10 22:36:32 +01:00
Andy Shaw
288d5d8a71 Android: Make sure that it can find qrc files created via the pro file
Since Android will place the created qrc files in their own architecture
then we need to make sure that we account for this when returning a list
of all the resources. This is so that when other files are created that
depend on this list, it is able to find them.

Fixes: QTBUG-81477
Change-Id: I4a083c1c5c3e0aec35649cf7f5419cf3c6a75eae
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-02-10 21:04:03 +00:00
Lars Knoll
7b0422d467 Remove dead code
We don't support unsharable containers anymore.

Change-Id: Ifafa1c9b4eb43d16b3866be3dd74dda1c592f084
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-10 19:20:17 +01:00
Lars Knoll
e12577b563 don't limit QCryptographicHash to 2^31 bytes of input
Change-Id: Icd43d3b387af9ef9e9b8adb9a6388c741949c9e8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-02-10 19:19:56 +01:00
Alexandru Croitor
3af9d49bb7 Merge remote-tracking branch 'origin/wip/cmake' into dev
Change-Id: If75ae006db6eb977cf66af4c3d36cb5c8098a1f1
2020-02-10 18:35:07 +01:00
Vitaly Fanaskov
f216c801ea QTextBrowser: remove deprecated signal highlighted(const QString&)
Task-number: QTBUG-81845
Change-Id: Ibdb0fe40557b901596cc8ef37c9707f99b4df403
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2020-02-10 18:28:48 +01:00
Vitaly Fanaskov
e59094cb86 QSpinBox: remove deprecated signal valueChanged(const QString &)
Task-number: QTBUG-81845
Change-Id: I91148cac553f63b44968337ccc121e7376ee4465
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2020-02-10 18:28:47 +01:00
Vitaly Fanaskov
9cc8949cc6 QComboBox: remove deprecated signals
The following signals have been removed:
- void activated(const QString &);
- void highlighted(const QString &);

Task-number: QTBUG-81845
Change-Id: I61b552d9258987d4252202953aaf4909f9bd718e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2020-02-10 18:28:45 +01:00