summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* QStringList: add QStringView overloads of join, filter, replaceInStringsMat Sutcliffe2019-06-301-0/+17
| | | | | | | | [ChangeLog][QtCore][QStringList] Added QStringView overloads of join(), filter(), and replaceInStrings(). Change-Id: I9636e21e2e43ed46cce0aa7fa23ab0710aa641ba Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Share the common configurations among different modulesRyan Chu2019-07-013-179/+55
| | | | | | | | | | | | | | | | | | | This change is used to generalize a template docker-compose file for all modules. Ideally, the leaf module only need to keep a docker compose file for all platforms (docker-compose.yml). NOTE: The version of docker-compose file downgrades from 3.4 to 2.1 because the 'extends' keyword is not supported in Compose version 3.x. Change-Id: I2e36fd9236eda86cb5fcf940d787ccefe9200696 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Remove usages of deprecated APIs from QtAlgorithmsSona Kurazyan2019-06-299-34/+13
| | | | | | | | | | | | | | | | | Task-number: QTBUG-76491 Change-Id: I9dab736a0cbd2e86588919640c26e8ce6b3674d0 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* QObject: deprecate the undocumented userData() featureMarc Mutz2019-06-291-0/+4
| | | | | | | | | | | ... and schedule it for removal in Qt 6. This appears to have come to some fame on the internet, so better add a deprecation warning before we remove it in Qt 6. Change-Id: I42d91d933f47dfd2d8d54c92358e9e46ced6bf21 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* rcc: Add -d option to output a Makefile-syntax depfileMarvin Scholz2019-06-296-0/+63
| | | | | | | | | | | | | | The -d option makes rcc output a dependency file with the specified file name. The resulting dependency file is useful for make or ninja based build systems. [ChangeLog][Tools][rcc] Added -d option to generate a dependency file. Fixes: QTBUG-45460 Change-Id: I495ade50f8d9865d4c00dce9373b2b6d1a6c8f2f Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Introduce Q_NAMESPACE_EXPORTGiuseppe D'Angelo2019-06-281-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A recurring problem with the Q_NAMESPACE macro is that it declares an object (staticMetaObject) in the surrounding namespace. That object lacks any export/import qualification to make it usable with shared libraries. Introduce therefore another macro to work around this issue, allowing the user to prefix the object with an exporting macro, f.i. like this: Q_NAMESPACE_EXPORT(Q_CORE_EXPORT) The old macro can simply then be rewritten in terms of this new one, supplying an empty export macro. Note that NOT passing an argument to a macro expecting one is well defined behavior in C99 -- the macro will expand an empty token. Of course, MSVC doesn't like this and emits warnings. As a workaround, use a variadic macro. [ChangeLog][QtCore] Added the new Q_NAMESPACE_EXPORT macro. It can be used just like Q_NAMESPACE to add meta-object information to a namespace; however it also supports exporting of such information from shared libraries. [ChangeLog][Potentially Source-Incompatible Changes] Prefixing Q_NAMESPACE with an export macro may no longer work. Use the new Q_NAMESPACE_EXPORT macro for that use case. Fixes: QTBUG-68014 Change-Id: Ib044a555ace1f77ae8e0244d824ec473550f3d8e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Corelib tests: Fix out of bounds string accessFriedemann Kleint2019-06-282-2/+2
| | | | | | | | | | | | | Fix warnings: Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt. introduced by qtbase/c2d2757bccc68e1b981df059786c2e76f2969530 (5.14). Change-Id: Ie6f0e2e3bb198a95dd40e7416adc8ffb29f3b2ba Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QAction(Group): Brush up the testsFriedemann Kleint2019-06-282-39/+39
| | | | | | | | | | | | | | | - Use nullptr - Use Qt 5 connection syntax - Remove C-Style casts Task-number: QTBUG-69478 Change-Id: Icf8faf3433ff3bff667db050e79b560b221867b0 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* tst_QThread: Add output for all elapsed testsFriedemann Kleint2019-06-281-7/+15
| | | | | | | | | | | | | | | Obtain diagnostics. Task-number: QTBUG-76707 Change-Id: I051fb43802a9736cb9542f4adaaf5880b52a407e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-06-279-41/+47
|\ | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/network/ssl/qsslsocket_openssl.cpp Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: Ibb57a0548b4977797b400637487a56245ac1c024
| * Skip tests if the required plugins were not deployedVolker Hilsheimer2019-06-191-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | This is usually the case on Android, where running this test would require deployment of files to the emulator. This doesn't give us any further testing that we don't already do by running this test on regular Linux, so skipping the test instead if the preconditions aren't met. Change-Id: I3722796634871213ba51c89ae7f40b19f954f2cb Fixes: QTBUG-73566 Reviewed-by: Daniel Smith <Daniel.Smith@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Output all font families in HTML outputAllan Sandfeld Jensen2019-06-211-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix our generation of font-family CSS so it contains the full list of families. Change-Id: I37d5efa64faeb4b6aeb7e2c5d6a54ff07febe9cc Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-06-257-53/+120
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qstorageinfo_unix.cpp src/network/ssl/qsslsocket_openssl.cpp Change-Id: Ibc9ce799bef62d60d616beaa9fbde8ebeadfbc20
| * | Fix crash in QPainterPath::reserve()Eirik Aavitsland2019-06-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Function did not handle default-constructed (null d_ptr) path correctly. Fixes: QTBUG-76516 Change-Id: I2925d4306f7fce34ece6739b18a8e275e7970837 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-06-206-2/+38
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/gui/painting/qdrawhelper.cpp src/network/ssl/qsslsocket_openssl.cpp src/widgets/styles/qstylesheetstyle.cpp Change-Id: Ibe1cd40f46a823c9e5edbe0a3cd16be1e1686b17
| * | | Android: don't run test function for fd leakage, make test passVolker Hilsheimer2019-06-191-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is sufficient to run this test on systems where we don't need to set up dependencies and satisfy other assumptions the test makes. It is safe to assume that if this test passes on regular Unix, then QTemporaryFile will behave as expected on Android as well. Change-Id: Iaf9a67d7c12b3acfd0992bab591c3f906b073d9e Fixes: QTBUG-73564 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Use C++11 alignof as reference for Q_ALIGNOF, and fix test on AndroidVolker Hilsheimer2019-06-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not removing QT_EMULATED_ALIGNOF logic from qglobal.h at this point, as it might be used elsewhere. Change-Id: Ie78922bb604a54aed03ab5b88e31a7f29a3a4de0 Fixes: QTBUG-73561 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Turn on C++11 and 14 correctlyVolker Hilsheimer2019-06-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this, a local build of this test on macOS fails. Change-Id: Ie03fa47ff0a54db752af47f223fbe5724cd9c976 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Fix editing of QDateTimeEdit in 12-hour locales that don't use AM/PMVolker Hilsheimer2019-05-281-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code made two incorrect assumptions: that the strings used are "AM" or "PM", or would be translated. Instead, the locale provides the correct strings, and there is no need to translate. However, in order not to break existing translations, we give those preference. And that the AM/PM string is not longer than 4 characters, while in e.g Spanish/Columbia locale the strings are "A. M." and "P. M.", ie 5 characters long. Also, the use of qMin in a function that is asked to provide the maximum section length is wrong. [ChangeLog][QWidgets][QDateTimeEdit] Use the information provided by the locale to determine the AM/PM strings, unless they are already translated. Change-Id: I6d1b05376e5ac62fc58da2cdea2e6cb732ec6747 Fixes: QTBUG-72833 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | | Merge "Merge remote-tracking branch 'origin/5.13.0' into 5.13"Liang Qi2019-06-172-14/+4
| |\ \ \
| | * \ \ Merge remote-tracking branch 'origin/5.13.0' into 5.13Liang Qi2019-06-172-14/+4
| | |\ \ \ | | | | | | | | | | | | | | | | | | Change-Id: I39248f6c561c6274ab5ead64238dd2f80e167eee
| | | * | | tst_qsslsocket: fix racy testv5.13.0-rc3v5.13.0Mårten Nordheim2019-06-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this threaded setup the server can sometimes have the data before it calls "waitForReadyRead", what happens then is that we fail the wait and as a result the test fails overall. Let's check if we actually got some data after all and then continue if we did. Since both the client and the server currently wait the same amount of time (2s) the max timeout for the client was increased by 0.5s so it has some time to notice that the server got the message. Change-Id: Ib5915958853413047aa5a7574712585bcae28f79 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit e79b1dcdf542be3a20d5c21ea163ff857ed875bf) Reviewed-by: Simo Fält <simo.falt@qt.io> (cherry picked from commit d53b8b77bc8de236e148ef2652806015a9a87e2b) Change-Id: I2f6ffb8e0a9b4d591edb6925e48baffcefc14511 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | * | | H2 auto-test, degrage flowControlServerSideTimur Pocheptsov2019-06-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | our powerful VMs die/time out on 30 requests, use 10 only. Change-Id: Ibf3ceedeac1839f9a88f88def844c7d61786b94f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 515c6e7639a7df647cfcc8b639e258864aaaa4af) Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | * | | QSslSocket: add and set the TLSv1.3-specific PSK callbackMårten Nordheim2019-06-131-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If this callback is not set then OpenSSL will call the callback used for <= TLS 1.2 unconditionally when connecting. If using PSK it will call it again later once the preshared key is needed. We don't currently handle the TLSv1.3 PSK, but we definitely should. But for now we can work around it - when psk_use_session_callback is called we simply change the PSK callback to a dummy function whose only purpose is to restore the old callback. This is mostly done to keep behavior the same as it is now for users (and to keep our tests running). Later we can add a new signal and handle this new feature properly. Reviewed-by: Simo Fält <simo.falt@qt.io> (cherry picked from commit d8efc8d718e3b3a0464f321e740541f5b221a5d6) Task-number: QTBUG-67463 Change-Id: I4aca4ae73ec4be7c4f82a85e8864de103f35a834 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | | | | QTextBoundaryFinder: don't break after uppercase followed by commawangChuan2019-05-231-0/+7
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QTextBoundaryFinder] Sentence breaking now no longer breaks between uppercase letters and comma. This is a deviation from the Unicode specification, but produces less surprising behavior. Fixes: QTBUG-75857 Change-Id: If1e78b3be3f20250d01100353ea7da6110985f82 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | | | | tst_QThread: Blacklist sleep() for WindowsFriedemann Kleint2019-06-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-76707 Change-Id: Iddce10fb3c8259b829d76596ffc9829f8d013bf3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | | | rhi: Add compute api and implement for Vulkan and MetalLaszlo Agocs2019-06-1734-44/+592
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | D3D11 and GL (4.3+, ES 3.1+) will come separately at a later time. Change-Id: If30f2f3d062fa27e57e9912674669225b82a7b93 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-06-2513-44/+160
|\ \ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/gui/painting/qdrawhelper.cpp src/gui/text/qdistancefield.cpp src/gui/text/qdistancefield_p.h src/network/ssl/qsslsocket_openssl.cpp src/plugins/platforms/android/qandroidinputcontext.cpp src/widgets/styles/qstylesheetstyle.cpp Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: Ia7daad21f077ea889898f17734ec46303e71fe6b
| * | | | QWidget: fix setTabOrder for compound widgetsChristian Ehrlicher2019-06-101-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 81e298a51d08c510457b4a26b37c0d4aac5eba65 fixed a case where the focus chain was screwed up when the order was already correct. This worked correctly in most cases but not when the next focus widget of the first one had Qt::NoFocus. The optimization check if lastFocusChildOfFirst is the same as second is thrown away since it now does not longer screw up the focus chain and the save would only be four pointer assignments. Fixes: QTBUG-75388 Task-number: QTBUG-10907 Task-number: QTBUG-68393 Task-number: QTBUG-69619 Change-Id: I581ed532156c34ea970123afd063194aab016304 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | | | Temporarily skip tst_QSslSocket::resumeMårten Nordheim2019-06-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Will be reverted once ready Change-Id: Id03df7dea1dd65579ec83606fddf2a73a45a0d64 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | | | SSL: Update an about-to-expire certificateMårten Nordheim2019-06-242-30/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I9e29baf529b74ae33fa0ee7250e5af6b1873e86f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | | | Revert "tst_qnetworkreply - QSKIP/disable tests that deadlock on Windows"Timur Pocheptsov2019-06-211-23/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSslSocket (OpenSSL backend) does not use mutex/locks during a handshake, so we re-enable previously skipped tests. This reverts commit 8c87a1402cc819c00301566755da5cb65461fac0. Change-Id: I994b085f016f0eb18b3ba439a7041ea08cd3577b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * | | | Stabilize tst_qsplitterFrederik Gladhorn2019-06-192-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the worst fix ever, adding one more qWait. The test has been updated in the 5.13 branch, so there a different fix will be needed. For now this is in line with the rest of the code. This test is currently one of the worst offenders when it comes to flaky tests. Task-number: QTBUG-64639 Change-Id: Ia1e71cc948997408b9658839013c9ad098111033 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | | | Report correct state change when destroying QAbstractAnimationTor Arne Vestbø2019-06-201-0/+15
| | |_|/ | |/| | | | | | | | | | | | | | Change-Id: Ibe5310e20268d1baa5b329a4d02a3dc38d875008 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | Merge remote-tracking branch 'origin/5.12.4' into 5.12Qt Forward Merge Bot2019-06-173-14/+27
| |\ \ \ | | | | | | | | | | | | | | | Change-Id: I61c92717cf82cfe2b14a4d7cbe17f03c3634e827
| | * | | QSslSocket: add and set the TLSv1.3-specific PSK callbackv5.12.4Mårten Nordheim2019-06-121-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If this callback is not set then OpenSSL will call the callback used for <= TLS 1.2 unconditionally when connecting. If using PSK it will call it again later once the preshared key is needed. We don't currently handle the TLSv1.3 PSK, but we definitely should. But for now we can work around it - when psk_use_session_callback is called we simply change the PSK callback to a dummy function whose only purpose is to restore the old callback. This is mostly done to keep behavior the same as it is now for users (and to keep our tests running). Later we can add a new signal and handle this new feature properly. Task-number: QTBUG-67463 Change-Id: I4aca4ae73ec4be7c4f82a85e8864de103f35a834 Reviewed-by: Simo Fält <simo.falt@qt.io>
| | * | | H2 auto-test, degrage flowControlServerSideTimur Pocheptsov2019-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | our powerful VMs die/time out on 30 requests, use 10 only. Change-Id: Ibf3ceedeac1839f9a88f88def844c7d61786b94f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * | | tst_qsslsocket: fix racy testMårten Nordheim2019-06-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this threaded setup the server can sometimes have the data before it calls "waitForReadyRead", what happens then is that we fail the wait and as a result the test fails overall. Let's check if we actually got some data after all and then continue if we did. Since both the client and the server currently wait the same amount of time (2s) the max timeout for the client was increased by 0.5s so it has some time to notice that the server got the message. Change-Id: Ib5915958853413047aa5a7574712585bcae28f79 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit e79b1dcdf542be3a20d5c21ea163ff857ed875bf) Reviewed-by: Simo Fält <simo.falt@qt.io>
| | * | | tst_qnetworkreply - QSKIP/disable tests that deadlock on WindowsTimur Pocheptsov2019-06-121-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use global object to store errors found by q_X509Callback. Thus, we also use a lock/mutex. It would appear all tests involving in-process server and QNAM are prone to intermittent failures on our Windows VMs - it's always about timeouts due to the client socket (QNAM) locking and the server socket blocking main thread while trying to acquire the same lock. The real fix is to get rid of global variable/locking, we'll have it later (quite a change and requires a lot of accuracy). Task-number: QTBUG-76247 Change-Id: Iffc90d9e16783f17f62e836e01c35f22681bdd39 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 91ab70d17f892f3ff6b2019632fda3920d045dcb) Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
| * | | | Fix raster paint error in path joins of tightly bending bezier curvesEirik Aavitsland2019-06-141-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code for generating round line joins is optimized with a shortcut for the inner, normally invisible joins. For certain joins of a tightly turning bezier, this optimization would lead to visible painting error. Fix by avoiding the optimization if the next control point is so close as to allow such tight turns. As a driveby, make the angle > 90 test cheaper, since absolute precision is not required in the optimization choice. Fixes: QTBUG-75008 Change-Id: I293e0776003310dc36fa7f43fbcd9c25f1f8fa5d Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | | | Generalize image file name @2x suffix handling to higher scale factorsEirik Aavitsland2019-06-144-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | @3x is in use on iOS already, so extend the handling in QImageReader to all single-digit factors, like QIcon does. Fixes: QTBUG-76273 Change-Id: Ic9442731c0549dbe8f797e1ddb1a09d8447e8441 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | | | Do not use the resolver for the local hostnameDimitrios Apostolou2019-06-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix test for systems that do not resolve their hostname to localhost. Not using name resolution also makes the test more robust. Change-Id: I558b9a975b9021536709db87fbf6a3b314f7ca79 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | | QByteArray autotest: code tidiesGiuseppe D'Angelo2019-06-231-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suppress a few warnings raised by GCC 9. Change-Id: Ic52dc9c85e447ee0f54ef8310a7fcd41d6e09304 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | | QString: towards QStringView::arg() pt.3: Long live ↵Marc Mutz2019-06-202-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QStringView/QLatin1String::arg() This version of arg(), unlike its QString counterpart, transparently accepts views without conversion to QString, and is also extensible to further argument types, say a future QFormattedNumber. [ChangeLog][QtCore][QStringView/QLatin1String] Added arg(), taking arbitrarily many strings. Change-Id: If40ef3c445f63383e32573f3f515fdda84c7fe3a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | | Overload QTextBrowser::setSource() to add optional type argumentShawn Rutledge2019-06-204-10/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that it's trying to guess whether the type is markdown based on the file extension, there needs to be a way to override it. For example it might be arranged that directory listings will be generated in markdown format instead of HTML; then when loading a source URL that is a directory, the application may override the type. The type for the single-argument setSource(url) is UnknownResource to preserve the existing behavior, but the user can override the guessing by setting a specific type. Change-Id: Id111efd24de7d8fd18c47b16a2d58f5b09d77891 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | | | | Support copy-pasting foreground images within same documentEskil Abrahamsen Blomfeldt2019-06-211-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using a texture for foreground color in text and copy-pasting the text inside the same QTextEdit, the formatting would disappear. Fixing this in a general way would require implementing some other carrier format in the mime data than HTML, such as e.g ODF, but it can quite easily be fixed for the case where the data is pasted in the same document, or even different documents as long as they have a reference to the image in the formats. [ChangeLog][QtWidgets][QTextEdit] Added support for copy-pasting foreground brushes with textures within same document. Task-number: QTBUG-75931 Change-Id: I8b39dce289c64eea39e25cb8eb207e2534bcd2eb Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | | | Port from QAtomic::load() to loadRelaxed()Giuseppe D'Angelo2019-06-2030-459/+459
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Semi-automated, just needed ~20 manual fixes: $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)load\(\)/$1loadRelaxed\(\)/g' -i \{\} + $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)store\(/$1storeRelaxed\(/g' -i \{\} + It can be easily improved (e.g. for store check that there are no commas after the opening parens). The most common offender is QLibrary::load, and some code using std::atomic directly. Change-Id: I07c38a3c8ed32c924ef4999e85c7e45cf48f0f6c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | | | Convert uses of QTime as a timer to QElapsedTimerEdward Welbourne2019-06-1425-87/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2297f61efa5adf9ea5194c7f3ff68574cbcf452c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | | | test: migrate ModelsToTest to QRegularExpressionSamuel Gaist2019-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is part of the migration of qtbase from QRexExp to QRegularExpression. Task-number: QTBUG-72587 Change-Id: Ifea720470541000481fbacc510b4cb589c9990d9 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
* | | | | test: migrate QNetworkReply test to QRegularExpressionSamuel Gaist2019-06-102-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is part of the migration of qtbase from QRexExp to QRegularExpression. Task-number: QTBUG-72587 Change-Id: Ibdd3f63d9069c3f01dfe8431bcc64bde4f2aa569 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>