summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Markdown importer: properly set hyperlinksGiuseppe D'Angelo2020-02-032-0/+26
| | | | | | | | The "title" in markdown is the tooltip, not the name attribute of a link. Also, tell the char format that it's an anchor. Change-Id: I2978848ec6705fe16376d6fe17f31007cce4b801 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Pass QDate and QTime by value in manual calendar test codeEdward Welbourne2020-01-312-4/+4
| | | | | | | They're value types, pass them as such. Change-Id: I78e93165d431ac4eff145f47a9385d6bf5cd0c15 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Blacklist failing tests on macOS 10.14Morten Johan Sørvig2020-01-302-0/+3
| | | | | | | | | These tests fail locally, and have been reported to fail on the CI system. Change-Id: Ia76bb15c288af4171ebe47b3c30f3651a63df3f2 Task-number: QTBUG-75786 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QGraphicsProxyWidget: fix handling of proxy focusGiuseppe D'Angelo2020-01-291-0/+70
| | | | | | | | | | | If a widget inside a QGPW has a proxy focus, the code would keep sending focus in events to the proxy even if the proxy was already focused. Amend the check in place to prevent this from happening. Change-Id: Id28d3bfe4f396da5c9477df713441ca7d506662f Fixes: QTBUG-51856 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Merge remote-tracking branch 'origin/5.14.1' into 5.14Liang Qi2020-01-281-0/+24
|\ | | | | | | | | | | | | | | Conflicts: mkspecs/features/create_cmake.prf Done-With: Artem Pisarenko <artem.k.pisarenko@gmail.com> Change-Id: I2ecb9fdca06fe687be8ab3457a58dd81e5e81c4c
| * Merge 5.14 into 5.14.1Kari Oikarinen2020-01-1531-94/+280
| |\ | | | | | | | | | Change-Id: Ie90edfd16f48e1907fd18288473ac403f62b9032
| * | QSequentialIterableImpl: support appendFabian Kosmale2020-01-151-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-80916 Change-Id: I87e74da0ce454e56b5fe94d9db3693a587d35edf Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Make sure the focus is passed on correctly when back-tabbingAndy Shaw2020-01-251-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the tested widget has a focus proxy, then we should check if the current focus widget is not the same as that focus proxy before setting it to be the widget that gets focus. This ensures that when back-tabbing from a widget like QDoubleSpinBox that it will not get stuck inside that widget and will back-tab to the next correct one. Fixes: QTBUG-81097 Change-Id: I3f689c7715da7f3ce8c3d2f616041528f5778a2f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | QXmlStreamReader: early return in case of malformed attributesGiuseppe D'Angelo2020-01-232-0/+9005
| | | | | | | | | | | | | | | | | | | | | | | | There's no point at keep raising errors after encountering the first malformed attribute. Change-Id: Idb37e577ea96c3bd850b3caf008fe3ecd57dd32e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Flatten version-specific blacklisting on macOS to all macOS versionsTor Arne Vestbø2020-01-2215-61/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't know which versions these blacklistings actually apply on unless we actually get macOS 10.14 and 10.15 into the CI and running tests, so let's start with that, and then granularize the blacklists after that. Task-number: QTBUG-75786 Change-Id: Id79642afa50cb20efa2cd209286b6933918d3a4a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Blacklist tstPauseAnimation::noTimerUpdates on macOSTor Arne Vestbø2020-01-221-3/+4
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-75786 Change-Id: I89d81a9d0f5f301f325044dee2395d441c0d5970 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Extend blacklisting for a few tests to include all macOS versionsTor Arne Vestbø2020-01-222-2/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-75786 Change-Id: I06867de99a19f9e46ac0eeea10a7365a30c49c6d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Blacklist two tst_QScroller tests on macOSTor Arne Vestbø2020-01-221-0/+5
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-75786 Change-Id: I43e0a9a6e28a67f6aa1f2adaecd60ed0d65601d4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Blacklist tst_QAbstractItemView::task200665_itemEntered on macOSTor Arne Vestbø2020-01-221-0/+2
| |/ |/| | | | | | | | | Task-number: QTBUG-75786 Change-Id: I74720b4015e38c846dbc5c6a93f056f8deb3552a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | uic/Python: Fix missing QCursor importFriedemann Kleint2020-01-141-1/+1
| | | | | | | | | | | | Fixes: PYSIDE-1182 Change-Id: I1ccc524a152ea75508166f3d2c0c60f8d829cd8f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Combine negativeYear() and printNegativeYear()Edward Welbourne2020-01-141-22/+17
| | | | | | | | | | | | | | | | | | | | They overlapped and the latter had duplicated code, so make them into a single data-driven test. At the same time, replace the '-' at the start of the expected string with QLocale::negativeSign(), since the test fails otherwise when LC_NUMERIC=nb_NO on Linux (Debian/testing). Change-Id: I051c75abff16b2e6f8278fcb152b6bde14c71f9a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | uic: add customwidget imports support for pythonCristián Maureira-Fredes2020-01-141-1/+1
| | | | | | | | | | | | Fixes: QTBUG-81073 Change-Id: I29659481b14927ffcb8f2cb1829b577a67e4b937 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Clarify blacklisting of tst_QWidget::childEvents on macOSTor Arne Vestbø2020-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | The test expects a very explicit list of events during show, but on macOS we also get an InputMethodQuery event as a result of the window becoming active. The test needs to be written significantly to support these kind of platform differences. Change-Id: I395c1e9e4e9baf7d9f88f0d067586fc15afb9a16 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Extend blacklisting of tst_QWidget::showMinimizedKeepsFocus to all macOS ↵Tor Arne Vestbø2020-01-141-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | versions For some reason the firstChild gets the focus when clearing the focus. This seems to be timing dependent, as removing the 30ms qWait 'fixes' the issue. So does a processEvent call before minimzing. Both of these require further investigation. Change-Id: I62833a5541712f97dc24bc63384fa4c051096537 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Blacklist tests on macOS that rely on moving the cursorTor Arne Vestbø2020-01-142-0/+6
| | | | | | | | | | | | Task-number: QTBUG-76312 Change-Id: Ibb29231141017ed608beaa12255cdd083317433c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Blacklist tst_QTableView::mouseWheel on macOSTor Arne Vestbø2020-01-141-0/+2
| | | | | | | | | | | | | | | | There's a timing issue that affects the position of the vertical scrollbar when scrolling by pixels. Change-Id: I29d73574785be539a5870b498a902b1aba887e9c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Blacklist tst_QStyleSheetStyle::widgetStylePropagation on macOSTor Arne Vestbø2020-01-141-0/+2
| | | | | | | | | | | | | | | | | | It's not clear why this is failing, but we need to blacklist it so that we can move over to testing macOS 10.14 and 10.15 in the CI. Task-number: QTBUG-75786 Change-Id: I208d5af92406c5da8d0210e0188568466b78b2a9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Skip tst_QMenu::pushButtonPopulateOnAboutToShow on macOSTor Arne Vestbø2020-01-141-0/+4
| | | | | | | | | | | | | | | | The combobox popup can overlap a little with the button, and that's the expected behavior. Change-Id: I245bfce85cb5ee661ceb51dbe0d844492878a2bc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Skip instead of fail tests when test server is not availableTor Arne Vestbø2020-01-1418-15/+92
| | | | | | | | | | | | | | | | | | | | We were being inconsistent in how we handled this, some tests skipping while others using QVERIFY. It makes more sense to skip the tests, since the problem is a missing pre-condition of the test, not the test itself being bad or exposing real failures in the implementation. Change-Id: I20eacfe12dbce0b0d926e48cbe2d2772819fa4a5 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Remove empty block at beginning of imported markdownRainer Keller2020-01-131-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | An empty QTextDocument already contains a block; so when the formatting is fully determined, if the document is still empty, then instead of inserting a new block, we can set formatting on the cursor, which affects the pre-existing block, before inserting text. This avoids leaving a blank line (the default block) above the inserted content. Fixes: QTBUG-81060 Change-Id: I14e45e300a602493aa59680417d74d4c2b25862d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | QString::isLower/isUpper: redo the implementationGiuseppe D'Angelo2020-01-111-40/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use QStringIterator rather than indexed loops. This fixes handling of non-BMP code points (which may be lower or uppercase, see the test). Change also the semantics of the functions, adopting Unicode §3.13 definitions: a string is lowercase/uppercase if it's equal to its own toLower/toUpper folding. As a side effect, empty strings are now correctly reported to be lowercase AND uppercase. [ChangeLog][Important Behavior Changes] The semantics of QString::isLower() and QString::isUpper() have been changed to match the Unicode specification. Now lowercase (resp. uppercase) strings are allowed to contain any character; a string is considered lowercase (resp. uppercase) if it's equal to its own toLower() (resp. toUpper()) folding. Previously, a non-letter character would make the string not lowercase nor uppercase, and the mere presence of an uppercase (resp. lowercase) letter would make isLower() (resp. isUpper()) return false, even if the letter wouldn't change under case folding. As a consequence, now empty strings are lowercase and uppercase. [ChangeLog][QtCore][QString] Fixed a number of bugs of QString::isLower() and QString::isUpper(). Empty strings are now correctly reported to be lowercase (resp. uppercase), and strings containing code points outside the BMP are now correctly handled. Note that the behavior of these functions has also been changed. Change-Id: Iba1398279a072399a9f21295fe75f6e414f3f813 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QFileSystemWatcher/win: watch also for attribute changes of directoriesChristian Ehrlicher2020-01-101-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The windows filesystemwatcher did not watch for attribute changes for directories (e.g. hidden flag) so it was not in sync with other backends. Fix it by adding FILE_NOTIFY_CHANGE_ATTRIBUTES to the watch flags when watching a directory. [ChangeLog][QtCore][QFileSystemWatcher] Fixed a bug that caused QFSW not to watch for attribute changes on Windows. Now it will correctly report when files and directories become hidden or unhidden, for example. Fixes: QTBUG-80545 Change-Id: I31767a0da899963e3940b4f5b36d1d581e6aa57c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Fix encoding expected by tst_qmessagehandler::qMessagePattern()Edward Welbourne2020-01-091-5/+5
| | | | | | | | | | | | | | | | The actual logging code, qt_message_print(), uses toLocal8Bit(), so testing by comaring with toUtf8() isn't robust. Change-Id: I7d6614e4af8c679674dbbf4ff47a88b2b75fc2dc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix encoding inconsistency between tst_QNoDebug and QTestLogEdward Welbourne2020-01-091-2/+2
| | | | | | | | | | | | | | | | | | Fix tst_QNoDebug::streaming() to use toLocal8Bit(), to match QTestLog::ignoreMessage(), which uses fromLocal8Bit(). Change-Id: I65f7b995a582aeab7b7ba61781a229fecd1ed3c3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: David Faure <david.faure@kdab.com>
* | QObject: Replace more 0 and NULL with nullptrAndre Hartmann2020-01-091-4/+4
|/ | | | | | | | ... in docs, comments, and warnings. Also adopt some occurrences around there and in the snippets. Change-Id: Icc0aa0868cadd8ec2270dda794bf83cd7ab84160 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* uic: Extend the baseline test for PythonFriedemann Kleint2020-01-072-21/+730
| | | | | | | | | | | | | | | | | Previously, there was only a Python compile test which triggers only when PySide2 is found. Rename it to pythonCompile(). Extend the TestEntry structure by adding the base line file and flags, which represent all special cases found in the code. Check for the presence of a Python base line file in addition to the C++ one. Prototypically add one form. Further forms can be added on the go. Task-number: PYSIDE-797 Change-Id: Ic2983fa3cab2399a6809e244f93c663e0212f675 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* QTextDocument: Set the font family to be after the families setAndy Shaw2020-01-061-1/+12
| | | | | | | | | | | | This amends a1f4321bbba2f3bff24d753ce766be738dbfa61a as the font families should take precedence over the font family set. If the font family is already included in the families then it should keep its placement. Otherwise it should be appended. Task-number: QTBUG-80475 Change-Id: I0049189c88b6879e57619815ec780960e9c0a300 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QVariant: Prefer direct conversion to QVariant{List,Map,Hash}Fabian Kosmale2020-01-031-0/+44
| | | | | | | | | | | | | | | If a type has both a converter to QVariantList and to QSequentialIterableImpl registered, we would have chosen the QSequentialIterableImpl version. In the case of types like QJSValue, this is more costly. With this change we therefore uses the direct conversion if it has been registered. The same applies to QAssociativeIterableImpl and QVariantHash/QVariantMap. Change-Id: I9c0b5068efe4bfbc5e0598a200e6db59201e9974 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QTextDocument: Give fontFamily() precedence over fontFamilies()Ulf Hermann2020-01-021-0/+21
| | | | | | | | | | If the singular fontFamily() is given, then this is obviously the one to be preferred over any plural fontFamilies(). Make sure it always ends up first in the list of emitted font families. Change-Id: I1e3b1ba29721c8298b1a0d4a1e1da49ba5b4e7ac Fixes: QTBUG-80475 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* wasm: support all cursor shapesAlexandra Cherdantseva2019-12-305-0/+272
| | | | | | | | Every Qt::CursorShape is supported. Tested in Chrome, Firefox and Safari. Change-Id: I38c9024dba4af70af789ac84ad7e38f749c847d7 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* QLocale: Support Indian number formattingTuomas Heimonen2019-12-301-0/+53
| | | | | | | | | | | When QLocale::Country is set to QLocale::India numbers are written so that after first three from the right and then after every second will be comma. E.g. 10000000 is written as 1,00,00,000 Task-number: QTBUG-24301 Change-Id: Ic06241c127b0af1824104f94f7e2ce6e2058a070 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
* Add binary compatibility files for qtbase 5.14 branchMilla Pohjanheimo2019-12-2011-0/+105821
| | | | | | | BC files built against 5.14.0 added. Change-Id: Ifaf79d8ebb057e3bcccd6134868890b3fccf8720 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix QAccessibleWidget::focusChild() to return focused descendantPeter Varga2019-12-191-0/+169
| | | | | | | | | | | | | | | This method should not ignore accessibility objects without corresponding widget. The widget may have parts with their own QAccessibilityInterface and these can be also focused. VoiceOver ignores them if they are not returned by focusChild(). QAccessibleTabBar::focusChild() has been implemented to demonstrate the concept and make tab titles of QTabBar readable by VoiceOver. Task-number: QTBUG-78284 Change-Id: Id7c62d86154bbd5d47d6bbee8cb7d05268c2e151 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Let QItemSelectionModel::columnIntersectsSelection honor the parentChristian Ehrlicher2019-12-141-0/+4
| | | | | | | | | | | | | QItemSelectionModel::columnIntersectsSelection() should honor the parent according to the docs. For rowIntersectsSelection() this was fixed a long time ago but columnIntersectsSelection() was forgotten. Sync the both functions and use range-based for loops as a drive-by. Fixes: QTBUG-80644 Change-Id: Iaf08f85e2225204d1e6564fa4bb0bc826352ed53 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QVariant: introduce ShouldDeleteVariantData flagFabian Kosmale2019-12-111-1/+96
| | | | | | | | | | | | | | | | This flag is used in QSequentialIterable and QAssociativeIterable to indicate that the data pointer in VariantData should be deleted after the variant has been constructed. The use case for this is https://codereview.qt-project.org/c/qt/qtdeclarative/+/284151, where we have a proxy iterator and cannot easily return a pointer to already owned data, as it is hard to manage its lifetime in the iterator. In contrast, it is clear that we can release the memory in the QSequentialIterable functions, as it has already been copied into the QVariant there. Change-Id: I2b33497d991cd4f752153e0ebda767b82e4bb851 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix more mis-handling of spaces in ISO date format stringsEdward Welbourne2019-12-101-0/+38
| | | | | | | | | | | | | | | | | ISO date format doesn't allow spaces within a date, although 3339 does allow a space to replace the T between date and time. Sixteen tests added to check this all failed. So clean up the handling of spaces in the parsing of ISO date-time strings. [ChangeLog][QtCore][QDateTime] ISO 8601: parsing of dates now requires a punctuator as separator (it previously allowed any non-digit; officially only a dash should be allowed) and parsing of date-times no longer tolerates spaces in the numeric fields: an internal space is only allowed in an ISO 8601 date-time as replacement for the T between date and time. Change-Id: I24d110e71d416ecef74e196d5ee270b59d1bd813 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QSqlQuery: fix some testsChristian Ehrlicher2019-12-101-39/+36
| | | | | | | | | | | | | | Fix some tests in tst_QSqlQuery: - make sure to use QSql::HighPrecision in tst_QSqlQuery::precision() (needed for psql) - remove outdated stuff for mysql 3.x - psql_bindWithDoubleColonCastOperator: the placeholder are stored as named placeholders in psql - avoid some useless old-style casts Change-Id: I54d29a7e24f17d853cce6baa09a67d9278098810 Reviewed-by: Robert Szefner <robertsz27@interia.pl> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Don't wrap feature detection macros with QT_HAS_FOO() variantsTor Arne Vestbø2019-12-108-18/+18
| | | | | | | | | | | | | | | | | Using wrappers for these macros is problematic when for example passing the -frewrite-includes flag to preprocess sources before shipping off to distcc or Icecream. It will also start producing warnings when compilers implement http://eel.is/c++draft/cpp.cond#7.sentence-2. See for example https://reviews.llvm.org/D49091 Both https://clang.llvm.org/docs/LanguageExtensions.html and the SD-6 document at https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations recommend defining '__has_foo(x) 0' as a fallback for compilers without the macros, so that's what we go for. Change-Id: I0298cd3b4a6ff6618821e34642a5ddd6728be767 Reviewed-by: Alex Richardson <arichardson.kde@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QWidget: React to platform surface being created or destroyedTor Arne Vestbø2019-12-091-0/+54
| | | | | | | | | | | | | The platform window may create or destroy its surface from other entry points than the QWidget API, in which case QWidget needs to sync up its own state to match. In particular WA_WState_Created and the winId needs to be recomputed. Fixes: QTBUG-69289 Fixes: QTBUG-77350 Change-Id: I769e58ead3c2efcf8c451c363108848feade9388 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* tst_QNetworkInterface: don't force an IPv4 link-local addressThiago Macieira2019-12-072-21/+31
| | | | | | | | | | | | | | | | | | | | | | | | Windows apparently has special code to deal with those addresses. If all your network interfaces are up and have acquired addresses, then the link-local network at 169.254.0.0/16 is unreachable. I had never caught this because both my Windows VM and my bare metal Windows have inactive interfaces (like the Bluetooth PAN one) and, when inactive, Windows assigns a link-local address. But in the CI, the interface(s) were all up and running, causing this issue. Unix systems don't treat IPv4 link-local any differently, so they always worked, so long as any interface was up and there had to be one to reach the network test server. This commit reworks the test to add test addresses based on the addresses found on up & running interfaces (see tst_qudpsocket.cpp). For IPv4, we flip the bits in the local portion of the address. For IPv6, we add a node with an address I generated randomly (non-universal), with the same scope. Fixes: QTBUG-65667 Change-Id: I568dea4813b448fe9ba6fffd15dd9f482db34991 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix updating the text cursor position after editingSona Kurazyan2019-12-061-0/+46
| | | | | | | | | | | | | In some cases when editing the text (for example when removing the selected text, or pasting a text block) the text cursor position is updated, but its visual x position is not updated. This causes the next cursor movements to start from a wrong position. Force the update for those cases. Fixes: QTBUG-78479 Change-Id: Ia496be62beec58660f5e1695e5aafae09c79684e Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Allow lower-case for the T and Z in ISO 8601 date formatEdward Welbourne2019-12-061-0/+2
| | | | | | | | | Cite RFC 3339 as basis for allowing a space in place of the T, too. The RFC mentions that ISO 8601 accepts t and z for T and Z, so test for them case-insensitively. Add a test for this. Change-Id: Iba700c8d74d485df154d27300aab7b1958e1ccef Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix handling of trailing space at the end of an ISO date-timeEdward Welbourne2019-12-061-0/+11
| | | | | | | | | | | | | | | | If milliseconds were followed by a space, the space was included in the count of "digits" read as the fractional part; since we read (up to) four digits (so that we round correctly if extras are given), a harmless apce could cause scaling down by too large a power of ten. Since QString::toInt() ignores leading space, we were also allowing interior space at the start of the milliseconds, which we should not, so catch that at the same time. Added tests, including one for the rounding that's the reason for reading the extra digit, when present. Fixes: QTBUG-80445 Change-Id: I606b29a94818a101f45c8b59a0f5d1f78893d78f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix crash when a date-time has an invalid time-zoneEdward Welbourne2019-12-061-14/+38
| | | | | | | | | | | | | | | | QDateTime is a friend of QTimeZone, so can access its internals; but it must check the zone is valid before doing so. Expanded tst_QDateTime::invalid() and made it data-driven to catch the failure cases. Commented on a test-case that caught a mistake in my first attempt at this, and on QDateTimeParser's surprising reliance on a quirk of QDateTime::toMSecsSinceEpoch()'s behavior. Fixes: QTBUG-80146 Change-Id: I24856e19ff9bf402152d17d71f83be84e366faad Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Manual High DPI test: Add a page logging all screen change signals to MetricsFriedemann Kleint2019-12-051-7/+130
| | | | | | | | | | | | Turn the Metrics widget into a QTabWidget and add a tab logging all changed signals of QScreen. This is useful when for example debugging issues with lock screens and laptop hibernation. Task-number: QTBUG-79248 Task-number: QTBUG-76902 Change-Id: Ie86789fe1514cb3333a5f3def7f613f217fa6802 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>