summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* QTableView: properly deselect row when column 0 is hidden/not visibleChristian Ehrlicher2019-10-241-0/+26
| | | | | | | | | | | | | When the first column is hidden or not visible in the current viewport, it is not possible to deselect the current row. Fix it by passing the correct column to QItemSelectionModel::selectedRows() when testing if the current index is selected. Fixes: QTBUG-79092 Change-Id: I9d8082d2b29ad2f799156aee910c6ff6e3217771 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QFileSystemEngine: Consistently check for invalid file namesUlf Hermann2019-10-241-0/+4
| | | | | | | | | | | | | | stat() and friends expect a null-terminated C string. There is no way to generate anything useful from a string that has null bytes in the middle. It's important to catch this early, as otherwise, for example, a QDir::exists() on such a path can return true, as the path is silently truncated. Extend the checks for empty file names to windows and add checks for null bytes. Change-Id: Ie9794c3a7c4fd57f9a66bdbbab8b45a08b6f9170 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QStateMachine: Don't scream at the userRobert Loehning2019-10-241-4/+4
| | | | | | Change-Id: I171606d10985bc7338b0f24ceb142fc0d88e7932 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.13' into 5.14"Qt Forward Merge Bot2019-10-246-34/+91
|\
| * Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-246-34/+91
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qstandardpaths_unix.cpp src/corelib/tools/qsharedpointer_impl.h tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp Change-Id: Iae95c5778dc091058f16f6db76f04a0178a9e809
| | * QODBC: Fix crash when a prepared statement is deleted after the db was removedChristian Ehrlicher2019-10-151-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a prepared statement is still alive after the database was removed with QSqlDatabase::removeDatabase(), the cleanup routine is trying to access the driver which is no longer alive which results in a crash. Fixes: QTBUG-79019 Change-Id: I4630e3b947a12b23ed062f015abc373fc0e246c1 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | * QStandardPaths: Correct handling for XDG_RUNTIME_DIRSamuli Piippo2019-10-121-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always try to create the runtime directory and never change the permissions of an existing directory. Conform to the XDG Base Directory Specification: "If, when attempting to write a file, the destination directory is non-existent an attempt should be made to create it with permission 0700. If the destination directory exists already the permissions should not be changed." Fixes: QTBUG-68338 Change-Id: Iaf854d69225fc46e43abae86232d749e5c247df0 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Fix QGraphicsScene::update() performanceAndre de la Rocha2019-10-111-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A previous fix has caused a performance degradation while adding a check for avoiding adding duplicated rectangles to the update list. This patch fixes it by using a std::set instead of a QList, avoiding duplication while using an O(log N) operation, instead of the O(N) used before. Fixes: QTBUG-77952 Change-Id: Ifa9fbf110e0bad60ee02a42d91281981fd98ceab Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * Q{Shared,Weak}Pointer: Reduce overload sets in implicit conversionsMilian Wolff2019-10-111-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only allow implicit conversions when the types involved are compatible. That means, only allow construction and copy assignment when the type X* is convertible to type T*. This is done using SFINAE and the std::is_convertible type trait, which makes the previous QSHAREDPOINTER_VERIFY_AUTO_CAST obsolete. This patch fixes compilation when a function is overloaded with Q{Shared,Weak}Pointer of different, incompatible types. Previously, this resulted in a compilation error due to an ambiguous overload. Change-Id: I069d22f3582e69842f14284d4f27827326597ca2 Fixes: QTBUG-75222 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * DTLS auto-test(s) - fix a buggy logic with pending datagramsTimur Pocheptsov2019-10-102-4/+4
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-79128 Change-Id: Ifebd5b056541b7732b15b5cf063ad22ab754a64c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Fix: confusion in QImage paintEngine creation on shared imagesEirik Aavitsland2019-10-241-0/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | During the creation of a raster paint engine in QImage::paintEngine(), the QImage will be detached. At least old gcc versions would get confused so that the newly created paintengine would end up in the old QImage copy insteads of the newly detached one. Work around by dropping the temporary engine pointer. Fixes: QTBUG-79383 Change-Id: I27b1f24312269bc2bcc641dc4334397a92e3bfbb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Enable cursor in ligature test on WindowsEskil Abrahamsen Blomfeldt2019-10-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The default font on Windows ("Times" is not found) does not have a ligature for "fi", so the test would not actually be testing what it was supposed to on this platform, and would pass even when the code was buggy. To enable the test on Windows, we select a standard font which has the ligature (Calibri). Change-Id: Ic117cd8e549aa729a0cd68006d7c180c6c89c053 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix: QPainter off-by-one clipping for some non-integer scalingsEirik Aavitsland2019-10-181-1/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | For some scalings, setClipRect(QRect) would produce a clip one pixel different from setClipRect(QRectF) because of different rounding. Ditto for setClipRegion. Fix by making sure to transform QRectFs instead of QRects. Fixes: QTBUG-78962 Fixes: QTBUG-78963 Change-Id: I0be721133858c30769ec6d81e978962a3d6b70cf Reviewed-by: Christoph Cullmann <cullmann@kde.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add testing of fillRect() to QPainter lancelot testEirik Aavitsland2019-10-164-0/+295
| | | | | | | | | | Change-Id: I3be230d3fafa178a37cf7387f79f372c8d8aeb05 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | tst_QSqlQuery: remove tests commented out a long time agoChristian Ehrlicher2019-10-161-90/+0
| | | | | | | | | | | | | | | | | | Remove some code which was commented out with 'NOT_READY_YET' since the initial Qt5 import. Since the mentioned bug reports are no longer available remove this code. Change-Id: I98686e53d85619f01d16105d147eba79b557a104 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Prepare for deprecating the QDesktopWidgetSona Kurazyan2019-10-158-30/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QDesktopWidget is marked as obsolete in docs, but it is not yet completely deprecated, some of its methods are still in use. Replace uses of the following methods marked as obsolete: - QDesktopWidget::screenNumber(QWidget*) -> QWidget::screen() - QDesktopWidget::screenGeometry(QWidget*) -> QWidget::screen()->geometry() - QDesktopWidget::availableGeometry(QWidget*) -> QWidget::screen()->availableGeometry() Task-number: QTBUG-76491 Change-Id: I2cca30f2b4caa6e6848e8190e09f959d2c272f33 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Win32: Consolidate registry codeFriedemann Kleint2019-10-145-41/+99
| | | | | | | | | | | | | | | | Add a RAII class for registry keys and use it throughout the code base. Change-Id: I666b2fbb790f83436443101d6bc1e3c0525e78df Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Fix the size calculation of QHeaderView when stylesheet is usedSona Kurazyan2019-10-141-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When calculating the header section size based on its contents when a stylesheet is used, the size hints from the stylesheet are used. In case if the stylesheet specifies only one of the sizes, the other is set to -1. Because of this the actual content size is ignored. The solution is to calculate the size based on the application style, in case if it's not specified in the stylesheet. Fixes: QTBUG-75615 Change-Id: I3453fa623d75b6b32832edf753de6e3e4e7f5a22 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Remove usages of deprecated APIs of QDesktopWidgetSona Kurazyan2019-10-134-12/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replaced the usages of the following deprecated APIs: * QDesktopWidget::screenCount() -> QGuiApplication::screens().size() * QDesktopWidget::screenGeometry(int) -> QGuiApplication::screens().at() * QDesktopWidget::screenNumber(QPoint) -> QGuiApplication::screenAt(QPoint) - Added notes for the QWidget *QDesktopWidget::screen(int), which currently has no replacement. - Fixed the tests to build conditionally, only when these APIs are enabled. Task-number: QTBUG-76491 Change-Id: I2fdec96d0a6a4fc782c53549b05a5556412b8305 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | QGroupBox: always disable children in a checkable, unchecked groupboxVolker Hilsheimer2019-10-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The childEvent handler sets the enabled property of children as they are added to the groupbox, but applications might later enable children and check/uncheck the groupbox's checkbox in undefined order. In that case, we would end up with enabled children inside a conceptually disabled groupbox (the groupbox's checkbox represents the logical "disabled" state), which breaks documented QWidget::enabled rules. To make sure that all children are disabled as per the state of the groupbox, we need to run that logic once the UI has been set up, and before it becomes visible. This is what polishing is for, so listen for that event in addition and handle it the same way as adding (which duplicates things, but keeps existing code that might depend on things being updated as they are added working). Adds the case to the existing enabledChildPropagation test case. [ChangeLog][QWidget][QGroupBox] Always disable children of a checkable, unchecked group box before showing. Change-Id: I978bd27b6f1a3f54ec745faeea529a98d0d93619 Fixes: QTBUG-25938 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Fix QEasingCurve possible imprecision at endpointsEirik Aavitsland2019-10-111-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | Both the spline curves and (most of) the predefines curves are defined as having start value 0.0 and end value 1.0. The spline and In/OutBack functions would sometimes not produce that result precisely, so code could not reliably depend on expressions like (easedValue < 1.0) becoming false. Fix by explicitly handling endpoints. Fixes: QTBUG-76781 Fixes: QTBUG-72630 Change-Id: I21be43af469a76c090154bffef8406a9baf2d0b1 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* | Distinguish invalid datetimes from othersEdward Welbourne2019-10-111-22/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A default-constructed QDateTime is invalid, but compared equal to a valid one referencing the start of 1970. This lead to date properties in QML being initialized invalid but not getting an onChange if the first value they're set to is the start of 1970. Fixing that then lead to some tests failing. Indeed, the original equality check involved using toMSecsSinceEpoch(), whose value is undefined unless the datetime is valid, without a prior check on its validity: so ensure all uses of toMSecsSinceEpoch() are guarded with isValid() checks. Reworked tst_QDateTime::toSecsSinceEpoch() to use its bool column (previously unused, after separating from toTime_t(), which uses this column for "out of time_t's range") for validity of the datetime. [ChangeLog][QtCore][QDateTime] Invalid datetimes are now treated as equal and less than all valid ones. They could previously be found equal to valid datetimes. Fixes: QTBUG-79006 Change-Id: Ie72deb8af4350a5e808144d0f6e42dc8eb3ff5ef Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Make QTextBlockFormat::MarkerType an enum classShawn Rutledge2019-10-101-1/+1
| | | | | | | | | | | | | | This came up during API review. Change-Id: I9198e1eb96db0c21e46a226a032919bb62d3ca66 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-10-101-0/+9
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbscreen.h src/src.pro Change-Id: I4e1981e69a1ddcbe4078ec6ab2a64b0da6a445de
| * Don't crash when calling jumpToFrame() on an empty QMovieLars Knoll2019-10-091-0/+9
| | | | | | | | | | | | | | | | | | Properly return an invalid frame when calling jumpToFrame() with a non existent frame number. Fixes: QTBUG-79029 Change-Id: Ic40f4a6de3106fab42c0bb6c961194be47b04e31 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Fuzzing: Don't copy input data to QByteArrayRobert Loehning2019-10-094-4/+4
| | | | | | | | | | Change-Id: I603413805dca46a85709c2ab6ff573687849572e Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
* | rhi: Autotest for rendering a triangle into a windowLaszlo Agocs2019-10-091-0/+159
| | | | | | | | | | Change-Id: Id1562ff8cf7c6bc7e5bd147bb628f3d9dd57f2b5 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | rhi: Autotest rendering with uniform bufferLaszlo Agocs2019-10-099-0/+246
| | | | | | | | | | Change-Id: I4251f31494680c78e90a08a2b471cb1af08ecd81 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | rhi: Autotest rendering a textured quadLaszlo Agocs2019-10-099-0/+188
| | | | | | | | | | | | Task-number: QTBUG-78971 Change-Id: I0e7e0f3c00f9509031f7b4a8a389e51c915f01c2 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | rhi: Enable the qrhi autotest on WinRTLaszlo Agocs2019-10-093-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | There is no onscreen support for WinRT in the D3D11 backend yet. However, offscreen operations (rendering into a texture) should work. One catch is that there is no D3DCompile available for deployed WinRT apps. So ship the intermediate format (DXBC output from fxc) in the .qsb files. Change-Id: Ic0aba4b817c27d13dcf3af41bf7612d799382655 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | rhi: Autotest rendering a triangleLaszlo Agocs2019-10-097-30/+239
| | | | | | | | | | | | | | | | | | Also improve (docs and runtime checks) and test the minimum set of required data to create a graphics pipeline. Task-number: QTBUG-78971 Change-Id: If5c14f1ab1ff3cf70f168fde585f05fc9d28ec91 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | rhi: gl: Add a feature flag for reading back non-zero mip levelsLaszlo Agocs2019-10-091-5/+12
| | | | | | | | | | | | | | | | | | The joys of "level - Specifies the mipmap level of the texture image to be attached, which must be 0." for glFramebufferTexture2D in OpenGL ES 2.0. Change-Id: Iaf19502f48d7ba73b26abb72535bfa6696a1e182 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | rhi: Autotest basic texture operationsLaszlo Agocs2019-10-091-13/+395
| | | | | | | | | | | | | | | | | | | | | | | | ...and make the Null backend able to deal with these, for RGBA8 textures at least. Naturally it is all QImage and QPainter under the hood. Also fix a bug in the OpenGL backend, as discovered by the autotest: the size from the readback did not reflect the mip level. Task-number: QTBUG-78971 Change-Id: Ie424b268bf5feb09021099b67068f4418a9b583e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | rhi: Add support for buffer readbacksLaszlo Agocs2019-10-091-1/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also marks the beginnings of significantly extending autotesting of the resource and rendering functionality in QRhi. Also involves fixing up the buffer operation lists like we did for textures before. This is to ensure updates and reads on the same batch execute in the correct order. So just have two lists: one with buffer, one with texture operations. Also simplify the struct layouts. No need for those inner structs with many duplicate members. This reduces the size even, since using a union was never an option here. Also switch to a VLA, the size is around 253 KB per batch. The Null backend now keeps track of the QRhiBuffer data so it can return valid results in readbacks. Task-number: QTBUG-78984 Task-number: QTBUG-78986 Task-number: QTBUG-78971 Task-number: QTBUG-78883 Change-Id: I9694bd7fec523a4e71cf8a5c77c828123ebbb3bd Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | rhi: Exercise nativeHandles() in qrhi testLaszlo Agocs2019-10-091-2/+244
| | | | | | | | | | | | | | Task-number: QTBUG-78971 Task-number: QTBUG-78972 Change-Id: Ibce10caf1ccd74ae7efead9579f4a4342ef896b8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Suppress deprecation warnings on a test of a deprecated QString methodEdward Welbourne2019-10-091-0/+3
| | | | | | | | | | | | | | | | QString::fromAscii() is deprecated since 5.0 but still tested. So suppress deprecations for its code. Change-Id: Ic048a843c43551021da39a16d94c3222201573dc Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* | Add libfuzzer test for QTextLayout::beginLayout()Robert Loehning2019-10-072-0/+39
| | | | | | | | | | | | Task-number: QTBUG-77819 Change-Id: I34e9cbaa615896222bcf947012cfed9f6c3186c7 Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
* | Remove CFBundleGetInfoString from Info.plist templatesTor Arne Vestbø2019-10-042-12/+0
| | | | | | | | | | | | | | | | | | | | Is't been deprecated since Mac OS X 10.5. Task-number: QTBUG-74872 Change-Id: I8b1ad7aca6448883cb164fd0c4b329592ca60548 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Add libfuzzer test for QTextDocument::setMarkdown()Robert Loehning2019-10-042-0/+38
| | | | | | | | | | | | Change-Id: I729d4a3bb276523011a6f17a800e72aa34540e47 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Make conflicting targets check less strictJoerg Bornemann2019-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | People tend to "turn off debug and release builds" by just not building one of the variants. For example, Qt's own rcc is built in release only, however it is configured for debug_and_release with the same TARGET for both. Let qmake complain about conflicting TARGETs only we're about to build all of those conflicting targets, i.e. if build_all is set. Change-Id: I0448bf5cb421e2d801d3cc30e0d80353fba0d999 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Prospective fix to stabilize tst_qwindow::isActive() on Windows 10Simon Hausmann2019-10-031-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | It is conceivable that during the try-compare loop of processing windowing system events we loose and regain the focus. That would explain the occasional test failure where instead of the expected 3 focus in events, we have received four. Task-number: QTBUG-77769 Change-Id: I2221440d09a74d4d18a72f7786232b4491cf45a8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 56f084781e2b8891929eca0070212fd7a32b32fc) Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Correct handling of -qfloat16(0)Edward Welbourne2019-10-031-1/+12
| | | | | | | | | | | | | | | | It is finite and normal; it classifies as a zero; and it should not be > qfloat16(0). Added tests to match. Change-Id: I7874fb54f622b4cdf28b0894050ad3e75cf5d77c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Reorganise the qfloat16 auto-testEdward Welbourne2019-10-031-84/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Its limits() test was rather large and had some overlap with an older qNan() test, that needed some clean-up (it combined qfloat16 values with double and float values in ways that caused qfloat16 to be promoted to another type, so we weren't testing qfloat16). Renamed the qNan() test to qNaN(), separated out the parts of it that actually tested infinity. Moved various parts of limits() to these and rationalised the result. Split out a properties() test from limits() for the properties of the qfloat16 type that are supplied by its numeric_limits. Split out a data-driven finite() test to cover some repeated code that was in limits() and extended it to test more values. Added more tests of isNormal(). Fixed my earlier UK-ish spelling of "optimise", in the process, and identify the processor rather than the virtualization as the context where the compiler errs. Change-Id: I8133da6fb7995ee20e5802c6357d611c8c0cba73 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | rhi: Remove QVectors from the data description structs as wellLaszlo Agocs2019-10-033-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As usual, keep some QVector overloads around to allow Qt Quick to compile. Color attachments and vertex input bindings get an at(index) type of accessor, unlike any other of similar lists. This is because there the index is significant, and sequential iteration is not the only type of operation that is performed. Sometimes a lookup based on an index will be needed as well. Task-number: QTBUG-78883 Change-Id: I3882941f09e94ee2f179e0e9b8161551f0d5dae7 Reviewed-by: Christian Strømme <christian.stromme@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Remove QVector in the API of QRhiResource subclassesLaszlo Agocs2019-09-304-22/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Forcing users to go through a QVector, when in practice they almost always want to source the data from an initializer list, a QVarLengthArray, or a plain C array, is not ideal. Especially since we can reason about the maximum number of elements in the vast majority of use cases for all the affected lists. QRhiResource is also not copyable so we do not need the usual machinery offered by containers. So switch to a QVarLengthArray. Note that a resource is not a container. The only operations we are interested in is to be able to source data either via an initializer list or by iterating on something, and to be able to extract the data, in case a user wishes to set up another resource based on the existing one. In some cases a QVector overload is kept for source compatibility with other modules (Qt Quick). These may be removed in the future. Also do a similar QVector->QVarLengthArray change in the srb-related data in the backends. Change-Id: I6f5b2ebd8e75416ce0cca0817bb529446a4cb664 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.13' into 5.14"Liang Qi2019-09-308-18/+36
|\ \
| * | Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-308-18/+36
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qrandom.cpp src/corelib/io/qfileinfo.cpp src/corelib/kernel/qeventdispatcher_win.cpp src/corelib/kernel/qeventdispatcher_win_p.h src/gui/text/qfontdatabase.cpp src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm src/plugins/platforms/windows/qwindowsglcontext.cpp src/testlib/qtestcase.cpp Done-With: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Done-With: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4893212471aa24be804c989a581810e2f714545c
| | * Re-enable tst_QOpenGLWindow on Win32Friedemann Kleint2019-09-272-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test was found crashing with software rendering in Qt 5.7. Removing the insignification revealed that there are failures on WinRT as well, blacklist them for the moment. Task-number: QTBUG-78802 Fixes: QTBUG-49630 Change-Id: Ib1a3efe69d7b63cdd98c6da364ab09e0e2dbdf62 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
| | * Fix QRandomGenerator initialization on AMD CPUsDmitry Kazakov2019-09-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some AMD CPUs (e.g. AMD A4-6250J and AMD Ryzen 3000-series) have a failing random generation instruction, which always returns 0xffffffff, even when generation was "successful". This code checks if hardware random generator generates four consecutive equal numbers. If it does, then we probably have a failing one and should disable it completely. Change-Id: I38c87920ca2e8cce4143afbff5e453ce3845d11a Fixes: QTBUG-69423 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * QWizard/Aerostyle: Fix "&Next" shortcutFriedemann Kleint2019-09-251-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix for QTBUG-35203 set the Alt+Right shortcut on the next button, clobbering the Alt+N shortcut from parsing the text (similar for other languages). Add a separate shortcut for Alt+Right since a button may not have several shortcuts. Amends 6714196f45fbae755b26a4b2406a7bbe066084dc. Fixes: QTBUG-78604 Change-Id: I1367da739c35fbd011d11f850c9bc3915113c644 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>