summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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>
| | * Ensure that QFont::fromString() doesn't parse empty font specificationsShawn Rutledge2019-09-241-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-78236 Change-Id: Iba060e7a24080cdc8f317ecb6dc616b2cd918acb Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * Revert "BLACKLIST insert_remove_loop for msvc-2019"Friedemann Kleint2019-09-241-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error was due to a compiler optimization bug, which is fixed in 16.3.0. This reverts commit 305f2c3aa6a2405f8fdeaa33f5d8c684e425f4ee. Fixes: QTBUG-77239 Change-Id: Idfb86ad5c3ec026518f0713c41f7ad744ab4d5db Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * Skip tst_QDateTime::systemTimeZoneChange for UWP configurationsOliver Wolff2019-09-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Due to their sandboxed nature, UWP applications do not have access to system settings like time zone. Fixes: QTBUG-71185 Change-Id: I567a255f8adc18838fff79b81210faa094674722 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * tests: fix typo in commentRolf Eike Beer2019-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | Spotted while grepping for 'imx'. Change-Id: I24889929e58045d6bba8dd74f213eff3c0487c4c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Featurize support for signaling NaNEdward Welbourne2019-09-303-0/+21
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One of our compilers for emscripten coerces all signaling NaNs to quiet ones, so won't do any actual signaling. Anyone relying on them to do so shall be disappointed, so it's better that they know about it at compile-time - or, at least, have the ability to find it out. Put the signaling NaN producers (and remaining (test) code using them) under the control of a feature that's disabled when numeric_limits claims double has no signaling NaN. Assume the bootstrap library doesn't need signaling NaNs. Sadly, until C++20 <bit>, there's no contexpr way to test that alleged signalling and quiet NaNs are actually distinct. Added some auto-tests for signaling NaN, including that it's distinct from quiet NaN. Any platform on which the last fails should disable this feature. Task-number: QTBUG-77967 Change-Id: I57e9d14bfe276732cd313887adc9acc354d88f08 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Ensure drawable size atomicity within a frameLaszlo Agocs2019-09-294-25/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert surfacePixelSize() to be a getter only. With Metal this will mean returning the "live" layer size (and so not the layer.drawableSize), which is in line with what we expect with other backends. Instead, we leave it to the swapchain's buildOrResize() to "commit" the size by setting drawableSize on the layer. With typical application or Qt Quick logic this ensures that layer.drawableSize is set once and stays static until we get to process the next resize - on the rendering thread. This of course would still mean that there was a race when a client queries surfacePixelSize() to set the depth-stencil buffer size that is associated with a swapchain. (because that must happen before calling buildOrResize() according to the current semantics) That can however be solved in a quite elegant way, it turns out, because we already have a flag that indicates if a QRhiRenderBuffer is used in combination with (and only in combination with) a swapchain. If we simply say that setting the UsedWithSwapChainOnly flag provides automatic sizing as well (so no setPixelSize() call is needed), clients can simply get rid of the problematic surfacePixelSize() query and everything works. Task-number: QTBUG-78641 Change-Id: Ib1bfc9ef8531bcce033d1f1e5d4d5b4984d6d69f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | rhi: Always enable debug info printing from manual testsLaszlo Agocs2019-09-291-1/+3
| | | | | | | | | | | | | | | | | | It can be important to see for example the adapter enumeration that is printed when qt.rhi.general is enabled. Make it enabled by default in the tests. Change-Id: I7bd073781e176d9b17b5386c548e9f8a2e16c10f Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | rhi: Add a --transparent option to manual testsLaszlo Agocs2019-09-2615-14/+30
| | | | | | | | | | | | | | | | | | | | This will also cause clearing to 0,0,0,0. Essential in order to allow fast testing of window transparency issues in combination with QRhi and the various backends. Change-Id: Iee2763c1d06f1d3e5d59a9142abaf30fab1dc543 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | rhi: Unify handling of special cases for scissor and viewport rectsLaszlo Agocs2019-09-264-0/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With OpenGL a scissor (or viewport) rectangle is not allowed to have a negative width or height. Everything else is allowed. This is also the semantic we wish to keep for QRhiViewport and QRhiScissor. This raises some problems. For instance, when we do bottom-left - top-left rectangle conversion, the case of partially out of bounds rects needs to be taken into account. Otherwise, Qt Quick ends up in wrong scissoring in certain cases, typically when the QQuickWindow size is decreased so the content does not fit because that will then start generating negative x, y scissors for clipping (which is perfectly valid but the QRhi backends need to be able to deal with it) Then there is the problem of having to clamp width and height carefully, because some validation layers for some APIs will reject a viewport or scissor with partially out of bounds rectangles. To verify all this, add a new manual test, based on the cubemap one. (cubemap was chosen because that is an ideal test scene as it fills the viewport completely, and so it is visually straightforward when a scissor rectangle is moving around over it) Fixes: QTBUG-78702 Change-Id: I60614836432ea9934fc0dbd0ac7e88931f476542 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | Include missing shbang line in executable shell scriptEdward Welbourne2019-09-231-0/+1
| | | | | | | | | | Change-Id: I802665c89fcac9e07e745cf6dce1a04404ae764d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Rearrange tst_QNumeric's tests for infinity and (quiet) NaNEdward Welbourne2019-09-231-26/+84
| | | | | | | | | | | | | | | | | | | | Separate quiet NaN from infinity and expand the nan-with-payload test to a general test that bits outside the exponent don't break qIsNan(). Generally test more thoroughly and systematically. Tests for signalling NaN shall follow. Change-Id: Ib35dabacc8ebcc9a0761df38f6f419f0398d0e20 Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
* | Fix crash when using signaldumper and sender is deletedMårten Nordheim2019-09-237-12/+48
| | | | | | | | | | | | | | | | Testlib's signaldumper functionality would crash inside testlib as it dereferenced the sender after it was deleted. Change-Id: I6013b75b0a121e2768429d8a3cf0339a940314f2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | tst_QTreeView: cleanupChristian Ehrlicher2019-09-191-516/+511
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup QTreeView autotest: - use range-based for loops - use nullptr - use member initialization - use new signal/slot syntax - use static invocations / replace with QTRY_foo() calls - use override - use QStyledItemDelegate Change-Id: I0e2d023254ed9f6f5d94cebf4d4358351cc4c3e2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | tst_QTreeWidget: cleanupChristian Ehrlicher2019-09-192-559/+483
| | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup QTreeWidget autotest: - use range-based for loops - use nullptr - use member initialization - use new signal/slot syntax - use static invocations - use override Change-Id: I2c07e95871d8725366cddd5cd098010709c8dc55 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Disable debug-and-release builds for MinGWSimon Hausmann2019-09-186-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The requirement to separate debug and release DLLs on Windows stems from the Visual Studio C run-time library appearing in two different variants (debug and release) and not mixing well. It's possible to perform builds without optimzations and with debug symbols while linking against the release version of the C run-time, but at the same time the debug version of the run-time brings other developer visible advantages. MinGW on the other hand does not have this distinction, does not ship with separate DLLS and does also not require the VS C runtime library. Therefore we do not need this separation for MinGW, which means that our packages can be reduced in size and application developers wishing to debug their applications do not have to use debug builds of the Qt libraries or run into Qt internal debug code. Task-number: QTBUG-78445 Change-Id: Idf588606091298dc44262c4c89e689df18d34747 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* | QTextDocument: Fix device scaling for QTextFrameFormat margins, padding and ↵Nils Jeisecke2019-09-171-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | border Those values must be scaled to device coordinates - otherwise borders, margins etc. will be too small when rendered on high dpi devices (printers etc.). This change will add the scaling to those values. QTextDocument::print applies 2cm margins to the root frame of a unpaginated QTextDocument. Those margins were previously scaled to device coordinates in order to give the correct result. But because scaling is now done inside QTextDocumentLayout that scaling must be removed and pixel values based on qt_defaultDpi are provided instead. Fixes: QTBUG-78318 Change-Id: I6fe6dcc25f846341f6a2fe5df2f54baea473fdfd Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Fix mis-handling of actual TLD in qIsEffectiveTLD()Edward Welbourne2019-09-162-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the domain passed down is an actual TLD that's the subject of a * rule, e.g. "ck" subject to *.ck, then we were finding no dot in it and concluding that it couldn't be the subject of a * rule. Added a test for the specific .ck case and commented on where we could get some canonical test data that I tripped over while researching this. Cross-reference the cookie-jar test from the QUrl test, too. Fixes: QTBUG-78097 Change-Id: Id858a9dae22e6b306a68df3fc199e0160f537159 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | CoreText: Modernize style hint fallback lookupTor Arne Vestbø2019-09-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DefaultFontFallbacks.plist system file that we used for looking up style fallbacks does not exists in macOS 10.15, nor did it ever exists on iOS. Instead of relying on this file, we hard-code a set of default families, that we then look up the fallbacks for. The result of QFont::defaultFamily() on macOS is now: QFont::Helvetica --> "Helvetica" QFont::Times --> "Times New Roman" QFont::Courier --> "American Typewriter" QFont::OldEnglish --> "" QFont::System --> "Lucida Grande" QFont::AnyStyle --> "Lucida Grande" QFont::Cursive --> "Apple Chancery" QFont::Monospace --> "Menlo" QFont::Fantasy --> "Zapfino" And on iOS: QFont::Helvetica --> "Helvetica" QFont::Times --> "Times New Roman" QFont::Courier --> "American Typewriter" QFont::OldEnglish --> "" QFont::System --> "Helvetica" QFont::AnyStyle --> "Helvetica" QFont::Cursive --> "" QFont::Monospace --> "Menlo" QFont::Fantasy --> "Zapfino" Fixes: QTBUG-78240 Change-Id: Ie9bc13c9c1031d89f024199e4736a046c568a48d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | tst_QWidget::translucentWidget(): Pass with High DPI scaling enabledFriedemann Kleint2019-09-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 9c8d1ca18b48dbcc89dda1b9bacdf7d49c7fc754, the test would fail when High DPI scaling is enabled: FAIL! : tst_QWidget::translucentWidget() Compared QImages differ in device pixel ratio. Actual (actual): 2 Expected (expected): 1 .\tst_qwidget.cpp(8913) : failure location Set the device pixel ratio on the expected pixmap to fix this. Change-Id: I517495931c2c6b1f49125bb4b5836e304bdbf545 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | tst_QTableView: cleanupChristian Ehrlicher2019-09-141-730/+641
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup QTableView autotest: - use range-based for loops where possible - use nullptr - use member initialization - use new signal/slot syntax - remove a lot of c-style casts - use static invocations - use override - instantiate objects on stack instead heap to avoid memleaks Change-Id: I52fee26697b1732afa9f965e600d4c59551370ce Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | MS TZ data: avoid calculating a date in year 0Edward Welbourne2019-09-131-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no year 0 in the proleptic Gregorian calendar, so QDate() won't be happy if asked for a date in it. Tweak scanning of the data we get from MS-Win so as to avoid a date calculation that could otherwise happen in year 0 when constructing QDateTime(QDate(1, 1, 1), QTime(0, 0, 0), QTimeZone("Australia/Sydney")). Added a test for this case, which Oliver Wolff has kindly verified does reproduce the assertion failure. However, Coin is unable to reproduce, as all its MS builds are configured with -release, so Q_ASSERT() does nothing. (The relevant code then skips over year 0, albeit for the wrong reasons, and gets the right results, albeit inefficiently, leaving no other symptom by which to detect the problem.) Fixes: QTBUG-78051 Change-Id: Ife8a7470e5bd450bc421e89b3f1e1211756fc889 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-131-3/+0
|\| | | | | | | Change-Id: Idcf8fc1d79bcd84b494d7f43308e6fe82d60e1a4
| * Re-add tst_selftests "crashes old stdout txt" on QEMUAssam Boudjelthia2019-09-091-3/+0
| | | | | | | | | | | | | | | | | | | | | | The test is not failing anymore on QEMU targets. This partially reverts commit 71bd06d516a2410ae0ea698e79dcb94aba9bc5b4. Fixes: QTBUG-71915 Change-Id: I68593edf0ec245e14879833c8aa90661a3c2e227 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | rhi: Add a flag to indicate preferring a software adapterLaszlo Agocs2019-09-121-0/+7
| | | | | | | | | | | | | | ...if there is one and the concept is applicable in the first place. Change-Id: Iab202c1c1cdd229f4910159de4cae7ce30805ea9 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | rhi: d3d11: Add the device lost testing machineryLaszlo Agocs2019-09-121-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The device can be lost when physically removing the graphics adapter, disabling the driver (Device Manager), upgrading/uninstalling the graphics driver, and when it is reset due to an error. Some of these can (and should) be tested manually, but the last one has a convenient, programmatic way of triggering: by triggering the timeout detection and recovery (TDR) of WDDM. A compute shader with an infinite loop should trigger this after 2 seconds by default. All tests in tests/manual/rhi can now be started with a --curse <count> argument where <count> specifies the number of frames to render before breaking the device. Qt Quick will get an environment variable with similar semantics in a separate patch. Change-Id: I4b6f8d977a15b5b89d686b3973965df6435810ae Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | QReadWriteLock: add a check for writeOnly, tooMarc Mutz2019-09-121-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Results on my machine: PASS : tst_QReadWriteLock::writeOnly(QMutex) RESULT : tst_QReadWriteLock::writeOnly():QMutex: 3,607 msecs per iteration (total: 3,607, iterations: 1) PASS : tst_QReadWriteLock::writeOnly(QReadWriteLock) RESULT : tst_QReadWriteLock::writeOnly():QReadWriteLock: 39,703 msecs per iteration (total: 39,703, iterations: 1) PASS : tst_QReadWriteLock::writeOnly(std::mutex) RESULT : tst_QReadWriteLock::writeOnly():std::mutex: 3,697 msecs per iteration (total: 3,697, iterations: 1) PASS : tst_QReadWriteLock::writeOnly(std::shared_mutex) RESULT : tst_QReadWriteLock::writeOnly():std::shared_mutex: 5,727 msecs per iteration (total: 5,727, iterations: 1) PASS : tst_QReadWriteLock::writeOnly(std::shared_timed_mutex) RESULT : tst_QReadWriteLock::writeOnly():std::shared_timed_mutex: 5,921 msecs per iteration (total: 5,921, iterations: 1) (the 'nothing' test of course doesn't work with writing, as writing to the same QString from different threads is UB) Change-Id: Ia78b54963a51eaf6563ce0d243316a3337056a83 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Brush up QReadWriteLock benchmarkMarc Mutz2019-09-122-8/+23
| | | | | | | | | | | | | | | | | | - add override - tests C++17 shared_mutex in addition to C++14 shared_timed_mutex - replace manual memory management with unique_ptr Change-Id: If52df2097a4b92c10df4a7cdbb1c506d64b673e3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | tst_QTableWidget: cleanupChristian Ehrlicher2019-09-101-210/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup QTableWidget autotest: - use range-based for loops where possible - use nullptr - use member initialization - use new signal/slot syntax - remove a lot of C-style casts - use static invocations - use override - instantiate objects on stack instead of heap to avoid memleaks Change-Id: I99ed144caab88d648d5ab987ce0963fbc6f1197d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Friedemann Kleint2019-09-095-20/+48
|\| | | | | | | | | | | | | Conflicts: tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp Change-Id: Idd3ca5cb9a2b95a4c3513b2a4c8966e6f56193f1
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-09-083-2/+21
| |\ | | | | | | | | | Change-Id: I371c5ae1af6f58e32e579671f485b92b586e0b76
| | * Merge remote-tracking branch 'origin/5.12.5' into 5.12Qt Forward Merge Bot2019-09-071-0/+17
| | |\ | | | | | | | | | | | | Change-Id: I41a252fdbf22551aadb0b1a6e9ecf3f95f99fbd4
| | | * Fix crash when text contains too many directional charsRainer Keller2019-08-301-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case a text to be layouted contains more than 128 directional characters it causes the application to crash The function initScriptAnalysisAndIsolatePairs() collects information of RTL/LTR chaaracters into vector "isolatePairs". The size of the vector is capped to 128. Later the function generateDirectionalRuns() iterates the text again and tries to access items from the previously capped vector above the upper bound. Task-number: QTBUG-77819 Change-Id: Ibb7bf12c12b1db22f43ff46236518da3fdeed26a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | QShortcut: call base class implementation in event()Christian Ehrlicher2019-09-051-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QShortcut::event() did not call the base class implementation QObject::event() which caused that e.g. QEvent::DeferredDelete was not handled. Fix it by calling QObject::event() when the event was not handled. Fixes: QTBUG-66809 Change-Id: Ideebc980bc658f8f2b9ec4417e738bccda5eeab5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * | tst_http2::goaway - run in ALPN mode onlyTimur Pocheptsov2019-09-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was observing rare crashes on my mac, where I was using SecureTransport. This would imply both the client (the test) and the server were working in h2c mode. But this is against the test's logic - the first request will be HTTP/1.1 (and upgrading protocol) and I wanted to send 3 HTTP/2 requests instead. Fixes: QTBUG-77476 Change-Id: I048ca242e2096ca36dd112277807d1fee530150c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * | QPainter lancelot test: improve drawImage testingEirik Aavitsland2019-09-021-2/+8
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QPainter, there is a shortcut code path for the drawImage(point, image) call, relative to the full drawImage(targetRect, img, srcRect). The lance script interpreter would only use the latter, so the former was not covered by the tests. As a driveby, remove the pointless usage of non-default dithering flags in drawImage(), since it is more important to test the default. Change-Id: Id373fd528a0c4c40b6bd8eea37b960fd7cdb2cc7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | Merge remote-tracking branch 'origin/5.13.1' into 5.13Qt Forward Merge Bot2019-09-051-0/+17
| |\ \ | | | | | | | | | | | | Change-Id: Ic633850940bbe17dcedc1609217a052b6f81ce4b
| | * | Fix crash when text contains too many directional charsv5.13.1Rainer Keller2019-08-311-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case a text to be layouted contains more than 128 directional characters it causes the application to crash The function initScriptAnalysisAndIsolatePairs() collects information of RTL/LTR chaaracters into vector "isolatePairs". The size of the vector is capped to 128. Later the function generateDirectionalRuns() iterates the text again and tries to access items from the previously capped vector above the upper bound. Task-number: QTBUG-77819 Change-Id: Ibb7bf12c12b1db22f43ff46236518da3fdeed26a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> (cherry picked from commit 1232205e32464d90e871f39eb1e14fcf9b78a163) Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * | Add binary compatibility files for Qt5.13.0 for QtBaseMilla Pohjanheimo2019-08-1511-0/+105327
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Binary compatibility files added. Change-Id: If013647f17ade6a51e9f8678252b373d8f51d010 Reviewed-by: David Faure <david.faure@kdab.com> (cherry picked from commit b5677bc6da9c5e7517edc4902dc1fe7cf211685d) Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
| * | | Update lancelot tests to use non-system-specific host info collectionDaniel Smith2019-09-041-18/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the lancelot baseline test runner to use generic text files for host info data collection. This also avoids relying on QProcess and scraping the bash scripts output from stdout. Fixes: QTBUG-71836 Change-Id: I88a46c99dbb11f71afc18cae5a6d2fbebcbe76c5 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | | Remove BT.2020 support from QColorSpaceAllan Sandfeld Jensen2019-09-081-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BT.2020 is an HDR color space and its luminance range doesn't match that of the rest of the currently available color spaces. Without support for white-point luminance in 5.14, there would be a behavior change when luminance support is later introduced, so it is better to remove it now, and reintroduce it when the necessary handling of different luminance levels is available. Change-Id: Ie29e4dd757faae3ac91d4252e1206acce42801dc Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | | Fix the build of the qgraphicslayout manual testSona Kurazyan2019-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was accidentally introduced by 2f33e030b8c80b4665cc2c120df7833469c05145 and since manual tests are not built by default, was not discovered earlier. Change-Id: I5cb6d5cfe0911bdb01a33014f2648a47b7a48848 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | | Combine BGR30_to_RGB30 and BGR888_to_RGB888Allan Sandfeld Jensen2019-09-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | And let the meat of the function be shared with the rbSwap routine. Change-Id: I0ea18b30c26ff050c17dcb3ad4d654bfbb8c6221 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | | QGraphicsView: mark obsolete flag DontClipPainter as deprecatedChristian Ehrlicher2019-09-051-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The enum OptimizationFlag::DontClipPainter is deprecated and not used in the code since Qt4 times. Therefore also mark it as deprecated so it can be removed with Qt6 Change-Id: I318a55cf42e7a233d13d4ec0144e1977251f5c92 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | | Remove QOperatingSystemVersion::WindowsVistaSona Kurazyan2019-09-054-18/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The minimum supported version is Windows 7. Remove QOperatingSystemVersion::WindowsVista added by b0cd007335853f283c47ffb0f5611d14e6dbe84b and replace with "true" wherever it was used. Change-Id: I08c0208467b655a921b6773f77d8bc099be69031 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>