summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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>
| | * 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>