summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Remove Perforce commands from setupSuite.shThiago Macieira2020-05-051-3/+1
| | | | | | | | | | | | | | | This file mustn't have changed at all, aside from the copyright headers, since we switched to Git in October 2008. Quick check shows the data from W3C is still online: https://dev.w3.org/cvsweb/2001/XML-Test-Suite/ I didn't check that the CVS server is actually running because none of my machines even has the cvs command anymore... Pick-To: 5.15 Change-Id: I4e559af2a9a1455ab770fffd15f4e740114a2433 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* tst_QProcess: create a more reliable crashingThiago Macieira2020-05-051-6/+25
| | | | | | | | | | | | | Turns out that crashing on purpose is more difficult than it seems. It should be easy, given how often we do it accidentally... Let the null pointer dereferencing be the fall back. Some compilers are too smart for their own good and remove the fault. Instead, let's rely on raise(SIGABRT) on Unix and on the UD2 instruction on Windows. Pick-To: 5.15 Change-Id: Ibdc95e9af7bd456a94ecfffd1603f1c9b73b167d Reviewed-by: Simon Hausmann <hausmann@gmail.com>
* tst_QResourceEngine: fix the order of arguments to QCOMPAREThiago Macieira2020-05-051-2/+2
| | | | | | | | Expected and actual were inverted. Pick-To: 5.15 Change-Id: Idc3fae4d0f614c389d27fffd15e9fa6a0a8f25e6 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2020-05-052-0/+24
|\
| * Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-05-052-0/+24
| |\ | | | | | | | | | Change-Id: I003c0d6271c6444748bf30b4331eca3fb2410f44
| | * Allow switching of QT_NO_CREATE_VERSIONLESS_TARGETSKai Koehne2020-05-052-0/+24
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-83774 Change-Id: Ib3f2507a917046426b94a779e205012ce52cbfe9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Fix bug in QTextLayout::min/maxWidth for WrapAtWordBoundaryOrAnywhereJan Arve Sæther2020-05-051-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In that specific wrapping mode, it will first try a normal word wrap. If it doesn't fit within the specified line width it will discard the result of that and try WrapAnywhere by calling layout_helper() recursively. The problem was that at the point it called itself again it had already adjusted eng->maxWidth: eng->maxWidth += line.textWidth; This was not restored, but carried on to the recursive call to layout_helper(), so the end result was that the maximumWidth would accumulate text widths from parts of the same line twice. Due to the same recursive behavior the minimumWidth also had a problem: It always returned the width of the widest word because it took the qMax() of the minimum widths of the two passes, (WordWrap and then WrapAnywhere) effectively making the minimum width always be the width of the widest word (even though it could wrap at finer granularity). Pick-to: 5.15 Task-number: QTBUG-77337 Change-Id: Ie7e9c17b157506352c2da38cc7f4a8dfa1283966 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | QChar: make std::hash'ableMarc Mutz2020-05-051-0/+7
| | | | | | | | | | | | | | | Change-Id: I2164df19cd17ab96a39020de66a3fe9fec838a36 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Build qmake with QT_USE_STRINGBUILDERLars Knoll2020-05-052-1/+2
|/ / | | | | | | | | | | | | | | Should improve performance and is going to be required in the future anyway. Change-Id: I89d7c50441d2491da1ab0a4d564dcc91f52ade85 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | uic: Generate string-based connections for custom slotsFriedemann Kleint2020-05-052-0/+415
| | | | | | | | | | | | | | | | | | | | | | Qt Designer let's you add custom slots and signals to the main form; they should use string-based connection syntax since the class is not known in setupUI(). Amends da3cb1deb6c752f8e4c05434e3451432e5d787ba. Task-number: QTBUG-76375 Change-Id: I5a3a5630f77c812d48db1cdb7a8658a4d2718228 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Purge from Q(Date|Time)+ most things marked to go at Qt 6Edward Welbourne2020-05-053-194/+3
| | | | | | | | | | | | Change-Id: Ib3f48c74132b47649dc7b4cbacf2cefed5a57687 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Re-order the sub-dirs to catch real culprits before things they breakEdward Welbourne2020-05-053-64/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A failure in testlib is apt to imply misleading failures elsewhere, so catch those first. Likewise, broken tools or corelib break everything. Put the rest of the list in alphabetic order. Restructure auto.pro to use conditional SUBDIRS += (in the right order) instead of setting SUBDIRS to a full list and then doing conditional SUBDIRS -= for most entries. This more closely matches the way the generated cmake config does things, although it still doesn't regenerate cleanly. Change-Id: Idc15326c3534eb4fdce55394269f2dfbc17fcd99 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | QCoreApplication: force the process locale codec to UTF-8Thiago Macieira2020-05-052-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As discussed in the mailing list and in the Qt Contributor Summit 2019. Tested on Linux, macOS and FreeBSD, showing these fallbacks: OS environment setlocale() call FreeBSD empty "C.UTF-8" FreeBSD LC_ALL=C "C.UTF-8" Linux empty "C.UTF-8" Linux LC_ALL=C "C.UTF-8" Linux LANG=en_US "en_US.UTF-8" Linux LANG=de_DE@euro "de_DE.UTF-8" Linux LANG=en_GB.iso885915 "en_GB.UTF-8" Linux LANG=hy_AM.armscii8 "hy_AM.UTF-8" Linux LANG=ja_JP.sjis "ja_JP.UTF-8" Linux LANG=ru_RU.koi8r "ru_RU.UTF-8" macOS empty "UTF-8" macOS LC_ALL=C "UTF-8" Versions tested: FreeBSD 12.1, Linux w/ glibc 2.30, macOS 10.14.2. See * https://wiki.qt.io/Qt_Contributor_Summit_2019_-_QtCore * https://lists.qt-project.org/pipermail/development/2019-October/037791.html Change-Id: Ia2aa807ffa8a4c798425fffd15d97ddb4f35b0ae Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Hotfix for int->qsizetype fallout in QShaderLaszlo Agocs2020-05-051-0/+17
| | | | | | | | | | | | | | | | The proper solution is to use qint32 everywhere, but that is left as a separate exercise. Change-Id: Id0c06b102b56a1b3b48dd67c6c29c28da7d1f22d Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2020-05-0415-239/+510
|\ \
| * | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-05-0415-239/+510
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/text/qlocale.cpp src/network/access/qnetworkaccessmanager.cpp Regenerated tests/auto/testlib/selftests/float/CMakeLists.txt Change-Id: I5a8ae42511380ca49a38b13c6fa8a3c5df8bed01
| | * QCommandLineParser: Wrap very long option names to leave room for descriptionsDavid Faure2020-05-012-0/+40
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-79926 Change-Id: I3302e0ed5b58949a35ccb001c71b22a6400a6c81 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Merge "Merge remote-tracking branch 'origin/5.15.0' into 5.15"Qt Forward Merge Bot2020-04-301-0/+200
| | |\
| | | * QCborValue: check parsing of invalid URLThiago Macieira2020-04-301-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QUrl will reject invalid URLs for us, so we don't get normalization. The original junk should be retrievable, of course. Change-Id: Ibdc95e9af7bd456a94ecfffd160610f5b2c8e1a2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | * QCborValue: add tests of parsing invalid ISO date-time stringsThiago Macieira2020-04-301-4/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We rely on QDateTime::fromString being proper, so this is not extensive testing. Change-Id: Ibdc95e9af7bd456a94ecfffd160610cdac5d62e1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | * QCborValue: add an extra check against producing invalid ISO datesThiago Macieira2020-04-301-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By QCborValue design, we store the textual representation in ISO format, equivalent of CBOR tag 0, which isn't allowed to have negative years or beyond year 10000. Change-Id: Ibdc95e9af7bd456a94ecfffd16060ccff359c296 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | | * QCborValue: avoid signed integer oveflows when decoding time_tThiago Macieira2020-04-301-0/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDateTime::fromSecsSinceEpoch() multiplies by 1000 but does not check for overflow. That means we must do so in QCborValue validation. We can't use mul_overflow<qint64> on 32-bit platforms, so we do a compare- and-branch there. For 64-bit platforms, we prefer to do the multiplication with checked overflow, as the common case is that it will not overflow and we'll need the multiplication anyway. Change-Id: Ibdc95e9af7bd456a94ecfffd16060cba6f1c86b8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * | QCOMPARE: treat values as equal if qFuzzyIsNull(each)Edward Welbourne2020-04-309-239/+257
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We hope this shall avoid some flaky failures noticed in quick tests, e.g. tst_QQuickMenu::Material::subMenuPosition(cascading,flip) was recently seen failing with 3.88e-11 != 0. This required some revision to test data in the testlib selftest for floats; the resulting expected output differs in details but not in which tests pass or fail. QEMU, naturally, made life difficult, requiring special-case code in the test-driver. [ChangeLog][QtTestLib][QCOMPARE] QCOMPARE() now treats its values as equal when qFuzzyIsNull() is true for both of them. Change-Id: Icc6ad5164b609937eddbe39cc69120f0abf0f3b4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Fix data corruption regression in QJsonObject::erase()Eirik Aavitsland2020-04-231-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | The internal removeAt(index) method was implemented as taking cbor indexes directly, in contrast to the other ...At(index) methods. Fixes: QTBUG-83695 Change-Id: I16597eb6db1cf71e1585c041caa81bf8f7a75303 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Port more tests from qtbase/tests/auto/corelib/io/ to CMakeSona Kurazyan2020-05-0432-6/+528
|/ / | | | | | | | | | | Change-Id: I56427e3e1908047a0674c8c80c24eeda80e947c2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | uic: Generate Qt 5 connection syntaxFriedemann Kleint2020-05-0456-92/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a enum and formatting for member function pointer based connections. Now preferably use member function pointer for Qt classes or parameterless connections. This should not require qOverload() within Qt classes after the Signal/Slot disambiguation. Add command line option to force either syntax for all connections. Task-number: QTBUG-76375 Change-Id: Icdb4051e1173172a71cd536bdbc7d1ab1edf267d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Fix QTextDocumentLayout test with certain fontsEskil Abrahamsen Blomfeldt2020-05-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If there is a negative right bearing on the last character of the string, it will stretch past the tab position (which aligns the advance position, and not the right edge of the glyph). For certain fonts, this would cause the actual ideal width to be calculated as 301 instead of 300 (which is the right alignment edge set in the code). Pick-to: 5.15 Fixes: QTBUG-46206 Change-Id: I03e8b8fb86e9ebe5337d3ba3384ade73d2ccdd69 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Remove useless codeLars Knoll2020-05-011-8/+0
| | | | | | | | | | | | | | | | | | We don't rely on a latin1 locale anymore for the test, and the other code was not doing anything. Change-Id: I08bc08d200c9e037884d8b680dfbb24c129f3d2e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Remove QTextStream dependency from tst_qfileLars Knoll2020-05-011-15/+6
| | | | | | | | | | | | Change-Id: I83cb05da8c094185b50e9cedea2e705ad1c7f948 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Fix crash when using QProperty<T>::setBinding(Functor ...)Simon Hausmann2020-04-301-0/+12
| | | | | | | | | | | | | | | | We must move the functor properly into the binding object, otherwise we end up with stale pointers as pointed out by ASAN. Change-Id: Icd84f4c113dd48e1e3e2d744abac0902cdf9339e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Provide a way of exposing private QProperties with a fake APISimon Hausmann2020-04-301-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | The API reduces the amount of manual plumbing required to offer a conceptual property through the traditional setter/getter API as well as through QProperty<T> API. Since the latter would require inlining the type and thus making it impossible to add new properties without breaking binary compatibility, this patch introduces a fake API that behaves similar but does not contain the property by value. Change-Id: Ib9bccd867f0e4e36a520e5583ba348e728284253 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Allow for private properties to be implemented using QPropertySimon Hausmann2020-04-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recently the moc learned that Q_PROPERTY(int x ...) can mean that "x" is implemented as QProperty and then allows installing bindings, etc. - this works by scanning the same class' members. For our own use of QProperty, we need to place the QProperty member itself into the d-pointer to be able to maintain the ability to add new properties without breaking binary compatibility. That however means that moc can't know that a certain property is backed by QProperty - we don't scan the members of the private class. As a workaround, this change enables the syntax where the property type used in Q_PRIVATE_PROPERTY may be wrapped with QProperty<T>. In addition this patch fixes the compilation of such declared properties by ensuring the accessor prefix (t->$accessor) is applied also for the QProperty related meta call variants. Change-Id: I8fbdc49319048b57f4eb0b65b56daba0459e9598 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | CMake: Fix build of qlogging test on MinGWAlexandru Croitor2020-04-301-1/+1
| | | | | | | | | | | | | | | | | | | | The linker doesn't have a -rdynamic option. Otherwise the build fails with g++.exe error unrecognized command line option '-rdynamic' Task-number: QTBUG-75578 Change-Id: Ie89a19fd25e90bef14e64d1d98fd973fa0315997 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Port more tests from tests/auto/corelib/tools to CMakeSona Kurazyan2020-04-2912-15/+179
| | | | | | | | | | | | | | | | Also removed add_subdirectory calls for subdirs which no longer exist. Change-Id: I759f408ca812e1721dde495b0e23feffdeeb9c60 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | uic tests: Update version in baselineFriedemann Kleint2020-04-29104-104/+104
| | | | | | | | | | Change-Id: I74334587727097a59fdeccd2fc58d18096cfed0a Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | tst_QDialogButtonBox: Port away from QAbstractButton::animateClick()Friedemann Kleint2020-04-291-40/+38
| | | | | | | | | | | | | | | | | | | | Use QAbstractButton::click(). Refactor and polish the tests to use QTRY_VERIFY() instead of qWait(), speeding them up. Pick-to: 5.15 Task-number: QTBUG-81845 Change-Id: I119bede8143ec1db5f5250517dee38b576d5a8d2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | tst_Gestures: fix -Wdangling-else GCC warningMarc Mutz2020-04-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and do a local code cleanup: - add override - port from foreach to C++11 ranged for loop - remove dead code (`gestureEvent` (née event) was already dereferenced when we check it for null'ness, so it cannot be nullptr, so the condition is always true). Pick-to: 5.15 Change-Id: Ica5e34fbe65c95f6573630f188582b90be15c8f7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Remove deprecated members from QtGui/image classesVolker Hilsheimer2020-04-294-66/+7
| | | | | | | | | | | | | | | | Cleaning up those that are trivial to remove because they have direct replacements. Change-Id: I4f5c25884a01474fa2db8b369f0d883bd21edd5b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Port qtbase/tests/auto/gui/painting to CMakeSona Kurazyan2020-04-2712-16/+449
| | | | | | | | | | | | Task-number: QTBUG-78225 Change-Id: Idc1333b119939e65da8f47d8de5333a38701bcb4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Port qtbase/tests/auto/corelib/text tests to CMakeSona Kurazyan2020-04-2715-11/+290
| | | | | | | | | | | | Task-number: QTBUG-78220 Change-Id: I497da6ed489854bdee5a1ead9a3f34118c78d001 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Remove deprecated QComboBox::SizeAdjustPolicy enum valueVolker Hilsheimer2020-04-271-12/+1
| | | | | | | | | | Change-Id: Ia8ae2eb11b86bc615e1297d7fabd1afcb821557c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Remove deprecated members from several QtGui classesVolker Hilsheimer2020-04-273-56/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Those can be trivially removed as they have direct replacements, or are completely unused. The migration path for QCursor::bitmap and QCursor::mask is QBitmap *pb = c.bitmap(); // up to 5.15, warns in 5.15 QBitmap vb = c.bitmap(Qt::ReturnByValue); // from 5.15, works in 6 QBitmap b = c.bitmap(); // from 6.0 on Change-Id: I3b3acd1c7f09c4c8414e98b3ce11986f1ecd5eda Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | QApplication: deliver all wheel events to widget that accepts the firstVolker Hilsheimer2020-04-251-0/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For kinetic wheel events, Qt tries to make sure that all events in the stream go to the widget that accepted the first wheel event. It did so by directing all events from the stream to the widget from which the spontaneous event was returned as accepted. However, that widget might have passed the event on to some other widgets; e.g QScrollArea forwards wheel events from the viewport to the relevant scroll bar. The event might then have come back accepted only because parent propagation kicked in (the scrollbar might not accept the event, so the parents get a chance, and some parent's scrollbar ultimately accepts the event). In this scenario, the wheel widget would be the viewport under the mouse, when it should have been the scrollbar of the parent. The next events from the stream were then delivered to a widget that didn't scroll; and parent propagation is not (and should not be) implemented for the case where Qt has a wheel widget. Instead, make the first widget that accepts any initial wheel event the wheel widget, even if the event was not spontaneous. With this change, all events from the stream are delivered to the widget that actually handled the event. That has the effect that ie. a viewport of a scroll area only gets the first event; all following events are delivered directly to the scrollbar. The test case added simulates the different scenarios - nesting of scroll areas, classic wheel events and a stream of kinetic wheel events. [ChangeLog][QtWidgets][QApplication] Wheel events from a device that creates an event stream are correctly delivered to the widget that accepts the first wheel event in the stream. Change-Id: I5ebfc7789b5c32ebc8d881686f450fa05ec92cfe Fixes: QTBUG-79102 Pick-to: 5.15 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Don't send QEvent::Hide to an already hidden top level widgetVolker Hilsheimer2020-04-241-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When hiding a popup by clicking outside of its area, a window is closed. Depending on the platform specific implementation details, this can result in multiple calls to QWidgetPrivate::setVisible(false). The first one from the handling of the close event in QWidgetWindow::event; the second from the destruction of the window in QWindow::event. Since the first call already sets the Qt::WA_WState_Hidden flag before calling QWidgetPrivate::hide_helper, we can test if the flag is set and skip the second call if it is. The included test does not reproduce the issue, as that issue only reproduces if the close event is generated by the mouse event handling in the Cocoa platform plugin (which doesn't call QWidget::close, but rather sends a native close event to the platform window). However, it verifies that the fix doesn't introduce any regressions. Change-Id: Id0eda9326a8adf0cc1f6a3840f9ac0b635ab39a1 Fixes: QTBUG-79134 Pick-to: 5.15 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Remove deprecated ApplicationAttribute enum valuesVolker Hilsheimer2020-04-241-12/+11
| | | | | | | | | | | | | | | | In the declaration, leave them in as comments so that the gaps in the numbering of the values doesn't create confusion. Change-Id: I92ff299416896c471e7c7d80b988cd4642b6b756 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | QString: add append, op+=, prepend, insert taking QStringViewMarc Mutz2020-04-241-0/+25
| | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QString] Now supports appending, prepending and inserting QStringViews. Change-Id: I7538c050c67590f27d91443eda0b94a4b80b62f2 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Deprecate QGuiApplication::fontChanged() signalAndy Shaw2020-04-241-8/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than have a fontChanged() signal which can be connected to for tracking when the application font has changed, then it is better to use the event that is sent to all windows and the application itself. That way it is easy for a window/widget or item that cares about the change to the application font to catch it in the event() function. [ChangeLog][QtGui][QGuiApplication] Deprecated fontChanged() signal in favor of QEvent::ApplicationFontChanged. Change-Id: Iae8e832238fc85e385a52305bc04f16e597454b0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | QFuture: the result type doesn't have to be a default-constructibleVitaly Fanaskov2020-04-231-0/+37
| | | | | | | | | | | | | | | | | | | | | | Added asserts to insure the invariant declared in the documentation. Canceled future object is not valid, hence we don't need to handle this case separately. Fixes: QTBUG-83389 Change-Id: Ib0653ef40cd3135574a91740e4ce2c6dc4da8a71 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | QWidget: fix regression when changing focus proxy while it has focusVolker Hilsheimer2020-04-231-0/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This follows up on commits 3e7463411e549100eee7abe2a8fae16fd965f8f6 and 947883141d9d8b3079a8a21981ad8a5ce3c4798e. The changing of the pointer of QApplicationPrivate does not transfer focus properly. It updates the pointer, but it doesn't deliver events or update the widget hierarchy's focus chain. The result is that multiple line edits might show a blinking cursor. Instead, use QWidget::setFocus when the focus proxy has changed while it had focus, and pass OtherFocusReason rather than NoFocusReason. Add a basic test for QWidget::focusProxy, which exercises this code path and verifies that pointers are consistent when focus changes as a side effect of modifying the focusProxy. Change-Id: I15a4d868bab2b590cfe4a1daa6a3c8cebc9c9ca2 Fixes: QTBUG-83720 Fixes: QTBUG-79707 Pick-to: 5.15 Reviewed-by: David Faure <david.faure@kdab.com>
* | rhi: Take mip size into account for render target sizeLaszlo Agocs2020-04-231-1/+267
| | | | | | | | | | | | | | | | Also extend autotesting, both for rendering into a given mip level and for rendering into a given cubemap face. Change-Id: Ida94b71150477ceb50a3b5616d8b7be13174558b Reviewed-by: Andy Nichols <andy.nichols@qt.io>