summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* CMake: Enable Moc for 3rdparty librariesLeander Beernaert2020-04-141-0/+2
| | | | | | | | This is required to support QtVirtualKeyboard's third party OpenWnn library. Change-Id: I64b6a2b6b6b0259bea5aa249a8c901def31f916c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove size assert in QMultiHash::take()Shawn Rutledge2020-04-141-1/+0
| | | | | | | | | | | It doesn't exist in every instantiation of the template; this becomes evident when attempting to build QQuickListView: error: 'using Chain = struct QHashPrivate::MultiNodeChain<FxViewItem*>' {aka 'struct QHashPrivate::MultiNodeChain<FxViewItem*>'} has no member named 'size' Change-Id: I24748c15f3995083eec06d86a3c0dced2209c303 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: pro2cmake expand variables for qt_add_resource()Leander Beernaert2020-04-141-0/+12
| | | | | Change-Id: Ida1196645dabcb0c3aee210d9bc5ee5632a9ccc5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix qConstexprNextPowerOfTwo(qint64) to return quint64Shawn Rutledge2020-04-131-3/+5
| | | | | | | | | | | | | | It doesn't make sense to lose precision, and that's a fatal warning when used on a 32-bit platform: implicit conversion loses integer precision: 'quint64' (aka 'unsigned long long') to 'quint32' (aka 'unsigned int') [-Werror,-Wshorten-64-to-32] Also fix coding style. Amends 7ef382649754c261ca9eb99dd50b67050e748efb Change-Id: I2c8f51883d74f0c6dc1b5faefe7b3ace1d9c15b9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix example documentation to not mention QRegExp anymoreLars Knoll2020-04-132-5/+2
| | | | | Change-Id: I2761d8efef31a3b890de9cab78589f1d6c03f62d Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Port test over to use QRegularExpressionLars Knoll2020-04-131-6/+6
| | | | | Change-Id: I7f69fbbdb9e327059cd978b0989eee2c75c5a24b Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Port tracedef to QRegularExpressionLars Knoll2020-04-131-20/+22
| | | | | Change-Id: I38bbf36719c99d4fda102eca375011c38792dd4a Reviewed-by: Rafael Roquetto <rafael@roquetto.com>
* Port androiddeployqt from QRegExp to QRegularExpressionLars Knoll2020-04-131-18/+24
| | | | | | | As a drive-by, also fix spelling of architecture. Change-Id: Ibeaa6b611ddbb75b9492deb5d97a64ed8b030c3a Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Include QRegularExpression in the bootstrap libraryLars Knoll2020-04-138-53/+142
| | | | | | | | This allows us to use regular expressions in bootstrapped tools such as moc and tracegen. Change-Id: I4310dd15bf26651aac6ab30c884e025ca06b3099 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2020-04-1122-120/+395
|\
| * Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-1122-120/+395
| |\ | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/network/socket/platformsocketengine/platformsocketengine.pri Change-Id: I22daf269a8f28f80630b5f521b91637531156404
| | * Stop using obsolete TouchPoint rect accessors in tests and examplesShawn Rutledge2020-04-102-56/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Followup to cf4a8b12fa277c2ea218f022607934f60fed1a06 68916fede41d1eca5d07eb6b1db518d41a007616 and 3c159957f863cf8d367a9261e7016e52cd0348c1. Task-number: QTBUG-83403 Change-Id: Ieaf418860c565dbe883384e7f296a829fbfa1e33 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * Fix warning about deprecated QComboBox::AdjustToMinimumContentsLengthThiago Macieira2020-04-091-3/+14
| | | | | | | | | | | | | | | Change-Id: Ibdc95e9af7bd456a94ecfffd1603f5c25dabf78e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * Remove more calls to deprecated TouchPoint functionsShawn Rutledge2020-04-093-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Followup to ed3ed0b9db97a8fab0c03add23228b6b0a96f171 68916fede41d1eca5d07eb6b1db518d41a007616 and 3c159957f863cf8d367a9261e7016e52cd0348c1. In QWindowSystemInterfacePrivate::fromNativeTouchPoints() and QWindowSystemInterfacePrivate::toNativeTouchPoints() we continue using struct TouchPoint's QRectF area as storage for the screen position + ellipse diameters; as the comment says, this is _unrotated_, meaning that rotation is stored separately, and area should not be construed as the bounding box of the rotated ellipse. (In Qt 6 we can make the QPA touchpoint look the same as the QTouchEvent::TouchPoint to eliminate the need to calculate the center of the rect.) In QGraphicsScenePrivate::updateTouchPointsForItem(), setRect() sets the position and the ellipse diameters, but the latter is redundant because the purpose of this function is to localize a touchpoint to the coordinate system of a particular QGraphicsItem. Ellipse diameters should stay the same. In QApplicationPrivate::updateTouchPointsForWidget(), as in QGraphicsScene, we are localizing touchpoints to a widget and to the screen that the widget is shown on, so only the position needs to be set, while preserving the sub-pixel resolution that mapFromGlobal(QPoint) loses. Fixes: QTBUG-83403 Change-Id: I61d29e14cbe38567767b164af6ae895082c5e1a1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * tst_QFileInfo: fix running with systems without /etc/passwdThiago Macieira2020-04-091-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clear Linux containers running as root may have no /etc/passwd. But they'll have /etc/machine-id because systemd creates that. Also test /proc/version (a Linux-specific file) because that isn't writeable even by root. Take the opportunity to check with access() instead of assuming root and only root can write to the file. Change-Id: Ibdc95e9af7bd456a94ecfffd1603e8359604752b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * Fix warning about QMetaObject::isEditable() being deprecatedThiago Macieira2020-04-091-1/+11
| | | | | | | | | | | | | | | Change-Id: Ibdc95e9af7bd456a94ecfffd1603f482445bff28 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| | * Switch to using versioned deprecated macrosAllan Sandfeld Jensen2020-04-091-24/+24
| | | | | | | | | | | | | | | | | | Change-Id: I4728e6ecc7218a6c98fd3a10e50e6edd1704fb83 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * QCborArray: fix operator[] that extends the arrayThiago Macieira2020-04-092-1/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was never tested. The infinite loop in QCborContainerPrivate::grow is the proof. [ChangeLog][QtCore][QCborArray] Fixed an infinite loop when operator[] was called with with an index larger than the array's size plus 1. Change-Id: Ibdc95e9af7bd456a94ecfffd1603df3855c73f20 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * QCborMap: fix assigning elements from the map to itselfThiago Macieira2020-04-092-3/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the QJsonObject issue of the previous commit (found with the same tests, but not the same root cause). One fix was that copying of byte data from the QByteArray to itself won't work if the array reallocates. The second was that assign(*that, other.concrete()); fails to set other.d to null after moving. By calling the operator=, we get the proper sequence of events. [ChangeLog][QtCore][QCborMap] Fixed some issues relating to assigning elements from a map to itself. Note: QCborMap is not affected by the design flaw discovered in QJsonObject because it always appends elements (it's unsorted), so existing QCborValueRef references still refer to the same value. Task-number: QTBUG-83366 Change-Id: Ibdc95e9af7bd456a94ecfffd1603df846f46094d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * QJsonObject: add missing detach2() callsThiago Macieira2020-04-092-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The refactoring to use CBOR missed two places where we could assign from the same object and thus cause corruption. In fixing this issue, I found a design flaw in QJsonObject, see Q_EXPECT_FAILing unit test and task QTBUG-83398. [ChangeLog][QtCore][QJsonObject] Fixed a regression from 5.13 that incorrect results when assigning elements from an object to itself. Fixes: QTBUG-83366 Change-Id: Ibdc95e9af7bd456a94ecfffd1603df24b06713aa Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * QFactoryLoader: Fix warning about binary JSON being deprecatedThiago Macieira2020-04-091-0/+3
| | | | | | | | | | | | | | | Change-Id: Ibdc95e9af7bd456a94ecfffd1603f4abb1c3dfec Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
| | * KMS: fix warning about hex() and dec() being deprecatedThiago Macieira2020-04-091-1/+1
| | | | | | | | | | | | | | | Change-Id: Ibdc95e9af7bd456a94ecfffd1603f54bcb86fb87 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * tst_PlatformSocketEngine: Removee SOURCES += of QtNetwork codeThiago Macieira2020-04-091-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoids ASAN warning of ODR violation: SUMMARY: AddressSanitizer: odr-violation: global 'typeinfo name for QSocketEngineHandler' at ../../../../../src/network/socket/qabstractsocketengine.cpp This trick has not been needed since we got Q_AUTOTEST_EXPORT. The main .pro file has: requires(qtConfig(private_tests)) Change-Id: Ibdc95e9af7bd456a94ecfffd1603e598932b88ad Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * MinGW: Fix debug only angle buildsKai Koehne2020-04-091-4/+5
| | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-83397 Change-Id: I89e21cc8101a17dcdb232ff5df1a76cc08842434 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: André Klitzing <aklitzing@gmail.com>
| | * tst_QSaveFile: skip test that fails when run as rootThiago Macieira2020-04-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FAIL! : tst_QSaveFile::retryTransactionalWrite() '!file.open(QIODevice::WriteOnly)' returned FALSE. () Loc: [/home/tjmaciei/src/qt/qt5/qtbase/tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp(156)] strace reveals: access("/TEMPDIR/outfile.ro", W_OK) = 0 Change-Id: Ibdc95e9af7bd456a94ecfffd1603eb371aadb02b Reviewed-by: David Faure <david.faure@kdab.com>
| | * QTemporaryFile/Linux: don't cut the root dir's slashThiago Macieira2020-04-082-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally people shouldn't create temporary files on /, but if you're running as root, why not? Caught when running tst_qtemporaryfile as root: openat(AT_FDCWD, "", O_RDWR|O_CLOEXEC|O_TMPFILE, 0600) = -1 ENOENT (No such file or directory) Change-Id: Ibdc95e9af7bd456a94ecfffd1603ebfc17cea220 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
| | * WASM: Replace NO_EXIT_RUNTIME=0 with EXIT_RUNTIME=1Fredrik Orderud2020-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Get rid of double negation to make the configuration easier to understand. Change-Id: I5dfe256c2ac2ef131c3db20dce9ff492c529a5b1 Reference: https://emscripten.org/docs/tools_reference/emcc.html Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * Minimal platform: fix leaking QMinimalScreen instanceShawn Rutledge2020-04-082-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This caused false alarms in fuzzing tests. The lifetime of the screen is the same as that of QMinimalIntegration. But failure to call handleScreenRemoved() also causes a warning; so as on "normal" platforms, the screen has to be separately allocated. Change-Id: Iad0cc53b8d09687400ced28bc2353b7500b01110 Reviewed-by: Robert Loehning <robert.loehning@qt.io>
* | | avoid compile warning when using clang++ with -Wshorten-64-to-32Martin Koller2020-04-115-7/+7
|/ / | | | | | | | | Change-Id: I78a6cd84ac5b8c250d9569d864a7e38269b85e10 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QApplication: remove obsolete globalStrut functionalityVolker Hilsheimer2020-04-1036-134/+67
| | | | | | | | | | | | Change-Id: If56873f86f5291264cac720f8db7dbd4db756f49 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Fix a few size_t / int conversion warningsFriedemann Kleint2020-04-105-6/+6
| | | | | | | | | | | | | | | | Change the hash function of QTypeRevision and QtFontFallbacksCacheKey to use size_t and add a few casts. Change-Id: I89a8fc617abbe8b0c67529ec41795691c99b0574 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Windows: Provide a way to switch between WinTab and Windows Ink at run-timeAndre de la Rocha2020-04-107-4/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds the setWinTabEnabled() function to Qt Platform Headers, which allows an application to set at run-time whether the WinTab API will be used for tablet input instead of the native Windows Ink API. [ChangeLog][Windows] The setWinTabEnabled() function added to Qt Platform Headers now allows an application to set at run-time whether the WinTab API will be used for tablet input instead of the native Windows Ink API. Fixes: QTBUG-83218 Change-Id: I51d3c7316baeda136763cf37c2f54295905450ec Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | cmake: Add library mapping for QtHttpServerMikhail Svetkin2020-04-091-0/+6
| | | | | | | | | | Change-Id: I3e12f164f7f6891c60c0d9da700b888850021e53 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Fix autotests after the QHash changesLars Knoll2020-04-0910-65/+413
| | | | | | | | | | | | | | | | | | | | | | | | | | Some test cases are sensitive to the exact ordering inside QHash, and need adjustments when we change QHash or the hashing functions. Some rcc tests now also need 32bit specific data, as the hashing functions for 32 and 64 bit are different now (as we use size_t). Change-Id: Ieab01cd55b1288336493b13c41d27e42a008bdd9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Deduplicate some codeLars Knoll2020-04-091-34/+6
| | | | | | | | | | | | | | | | Requires one more branch inside the loop, but that should not really matter performance wise. And it should expand to less code. Change-Id: I4619dd2a2e6fedf8d109009a5b6d7410ed89f1fb Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Optimize hashing of floating point numbersLars Knoll2020-04-092-10/+24
| | | | | | | | | | | | Change-Id: Id5e091b135c006b10987f229f45319228edb8675 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Replace Qt's hashing function with SipHashThiago Macieira2020-04-093-11/+351
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit replaces MurmurHash with SipHash for all strings longer than the size of a pointer. The most important difference between those algorithms is that MurmurHash has this unwelcome property: for two byte sequences x and y, if you know that x and y have the same hashing for a given seed, then they have the same hashing for all seeds. SipHash has no such issue. If the seed changes, the strings that used to compute to the same hash are no longer likely to do so. We've chosen to implement a SipHash-1-2 algorithm instead of the regular 2-4 as that has roughly the same performance as the old DJB33XA algorithm. It's around 50% slower than MurmurHash, which is acceptable given the added security. Task-number: QTBUG-47566 Change-Id: I09100678ff4443e6be06fffd14819c8878d223e2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Change qHashBits to use MurmurHash2Lars Knoll2020-04-092-150/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old implementation was either using CRC32 on modern processors or a trivial, but rather slow implementation. We can't continue with CRC32, as that implementation can only give us 32bit hashes, where we now need to support 64bit in Qt 6. Change the implementation to use MurmurHash, as public domain implementation that is both very fast and leads to well distributed hashes. This hash function is about as fast as the SSE optimized CRC32 implementation but works everywhere and gives us 64 bit hash values. Here are some numbers (time for 10M hashes): 14 char 16 char QByteArray QString float old qHash (non CRC32) 127ms 134ms 48ms old qHash (using SSE CRC32 instructions 60ms 62ms 46ms new qHash 52ms 43ms 46ms Unfortunately MurmurHash is not safe against hash table DoS attacks, as potential hash collisions are indepenent of the seed. This will get addressed in followup commit, where we use SipHash or an SSE optimized AES based hashing algorithm that does not have those issues. Change-Id: I4fbc0ac299215b6db78c7a0a2a1d7689b0ea848b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Fix compiler warning on 32bitLars Knoll2020-04-091-6/+7
| | | | | | | | | | | | Change-Id: I8728ba339161e210772e73c633cb2309dfb01b8e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Implement emplace() for QHash and QMultiHashLars Knoll2020-04-094-126/+262
| | | | | | | | | | | | | | | | | | | | At the same time use the opportunity to refactor the insertion code inside the implementation of QHash to avoid copy and move constructors as much as possible and always construct nodes in place. Change-Id: I951b4cf2c77a17f7db825c6a776aae38c2662d23 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Change qHash() to work with size_t instead of uintLars Knoll2020-04-09125-310/+305
| | | | | | | | | | | | | | | | | | | | | | This is required, so that QHash and QSet can hold more than 2^32 items on 64 bit platforms. The actual hashing functions for strings are still 32bit, this will be changed in a follow-up commit. Change-Id: I4372125252486075ff3a0b45ecfa818359fe103b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Fix the documentation for QHash and QMultiHashLars Knoll2020-04-091-312/+749
| | | | | | | | | | | | Change-Id: Iecf742c5e5bd4716e2d17394770e992024c5bdbb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Optimize QHash when using QHashDummyValueLars Knoll2020-04-091-2/+27
| | | | | | | | | | | | | | | | This is used by QSet to avoid storing extra data for the value in the Hash. Re-implement the optimization after the changes to QHash. Change-Id: Ic7eba53d1c0398399ed5b25fef589ad62567445f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | new QCache implementationLars Knoll2020-04-094-127/+230
| | | | | | | | | | | | | | | | Make use of the new features available in QHash and do a more performant implementation than the old one. Change-Id: Ie74b3cdcc9871cd241aca205672093dc395d04a7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | New QHash implementationLars Knoll2020-04-097-1378/+1624
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A brand new QHash implementation using a faster and more memory efficient data structure than the old QHash. A new implementation for QHash. Instead of a node based approach as the old QHash, this implementation now uses a two stage lookup table. The total amount of buckets in the table are divided into spans of 128 entries. Inside each span, we use an array of chars to index into a storage area for the span. The storage area for each span is a simple array, that gets (re-)allocated with size increments of 16 items. This gives an average memory overhead of 8*sizeof(struct{ Key; Value; }) + 128*sizeof(char) + 16 for each span. To give good performance and avoid too many collisions, the array keeps its load factor between .25 and .5 (and grows and rehashes if the load factor goes above .5). This design allows us to keep the memory overhead of the Hash very small, while at the same time giving very good performance. The calculated overhead for a QHash<int, int> comes to 1.7-3.3 bytes per entry and to 2.2-4.3 bytes for a QHash<ptr, ptr>. The new implementation also completely splits the QHash and QMultiHash classes. One behavioral change to note is that the new QHash implementation will not provide stable references to nodes in the hash when the table needs to grow. Benchmarking using https://github.com/Tessil/hash-table-shootout shows very nice performance compared to many different hash table implementation. Numbers shown below are for a hash<int64, int64> with 1 million entries. These numbers scale nicely (mostly in a linear fashion with some variation due to varying load factors) to smaller and larger tables. All numbers are in seconds, measured with gcc on Linux: Hash table random random random random reads full insertion insertion full full after iteration (reserved) deletes reads deletes ------------------------------------------------------------------------------ std::unordered_map 0,3842 0,1969 0,4511 0,1300 0,1169 0,0708 google::dense_hash_map 0,1091 0,0846 0,0550 0,0452 0,0754 0,0160 google::sparse_hash_map 0,2888 0,1582 0,0948 0,1020 0,1348 0,0112 tsl::sparse_map 0,1487 0,1013 0,0735 0,0448 0,0505 0,0042 old QHash 0,2886 0,1798 0,5065 0,0840 0,0717 0,1387 new QHash 0,0940 0,0714 0,1494 0,0579 0,0449 0,0146 Numbers for hash<std::string, int64>, with the string having 15 characters: Hash table random random random random reads insertion insertion full full after (reserved) deletes reads deletes -------------------------------------------------------------------- std::unordered_map 0,4993 0,2563 0,5515 0,2950 0,2153 google::dense_hash_map 0,2691 0,1870 0,1547 0,1125 0,1622 google::sparse_hash_map 0,6979 0,3304 0,1884 0,1822 0,2122 tsl::sparse_map 0,4066 0,2586 0,1929 0,1146 0,1095 old QHash 0,3236 0,2064 0,5986 0,2115 0,1666 new QHash 0,2119 0,1652 0,2390 0,1378 0,0965 Memory usage numbers (in MB for a table with 1M entries) also look very nice: Hash table Key int64 std::string (15 chars) Value int64 int64 --------------------------------------------------------- std::unordered_map 44.63 75.35 google::dense_hash_map 32.32 80,60 google::sparse_hash_map 18.08 44.21 tsl::sparse_map 20.44 45,93 old QHash 53.95 69,16 new QHash 23.23 51,32 Fixes: QTBUG-80311 Change-Id: I5679734144bc9bca2102acbe725fcc2fa89f0dff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Support multiple page ranges in QPrinterSzabolcs David2020-04-0914-103/+558
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new QRangeCollection type to store and manage multiple page ranges. This moves out the parser and validator logic from the platform dependent (UNIX) dialog and makes it publicly available from QPrinter. This improves the usability of QPrinter in those applications which doesn't use print dialog to configure printer. (e.g.: QTextDocument, QWebEnginePage) Change-Id: I0be5a8a64781c411f83b96a24f216605a84958e5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | CMake: Skip regeneration of manual compile test projectAlexandru Croitor2020-04-091-0/+1
| | | | | | | | | | Change-Id: I8563ed5b034c843b9f3a4390f963558f6d214ad1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | CMake: Handle missing packages in project compile testsAlexandru Croitor2020-04-092-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a find_package() in a try_compile project doesn't find a package, and we then link against a non-existent target, the configuration failure of the compile test also fails the configuration of the project. To avoid that, separate library targets from non-targets, and make sure to only link against the targets if they exist. pro2cmake now outputs modified compile test project code which iterates over targets and non-target libraries, and links against them when needed. Change-Id: Ib0f4b5f07af13929c42d01a661df2cabdf9b926b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Don't set WindowContextHelpButtonHint by default for dialogs and sheetsVolker Hilsheimer2020-04-093-18/+5
| | | | | | | | | | | | | | | | | | | | | | | | This makes the Qt::AA_DisableWindowContextHelpButton flag obsolete. It is already documented as such in Qt 5, so we can remove it now. [ChangeLog][QtWidgets] Do not show 'What's this' button anymore in dialogs on Windows. To show the button again, you need to set Qt::WindowsContextHelpButtonHint explicitly the top level widget. Change-Id: I30017ca300441cb2ee37940ce97dfe18eb2b118b Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Resolve Qt6 TODO items, replace Median and BlockSizeManagerKarsten Heimrich2020-04-094-196/+41
| | | | | | | | | | | | | | | | | | | | | | * Replaces the, only internaly used, implementation of template class Median with a fixed size none templated version. * Replaces BlockSizeManager with an updated BlockSizeManager V2, but keeping the original name. * adapt the auto-test to take the fixed size array into account Change-Id: If76cb944676c4a06a7566ad0bc37ded25b81c70c Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>