summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix tst_QSizePolicy::constExpr() to compile with MSVC 15.8.1Friedemann Kleint2018-08-301-2/+10
| | | | | | | | | | | | For ControlType != QSizePolicy::DefaultType, qCountTrailingZeroBits() is used which, MSVC 15.8.1 does not consider constexpr due to built-ins. Exclude the check by #ifdef. Task-number: QTBUG-69983 Change-Id: Ifc3dc3d94a804246bee1705fc8f3ac9b04ee4d32 Reviewed-by: Alexander Shevchenko <sav_ix@ukr.net> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update QMetaObjectBuilder::MetaObjectFlag enumBogDan Vatra2018-08-301-3/+1
| | | | | | | | | Synced QMetaObjectBuilder::MetaObjectFlag with the MetaObjectFlags enum from qmetaobject_p.h. Also added a few comments for Qt 6. Change-Id: Ieccd5cf8d512a6bf7256b2f4db88d45662774536 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Allow registering constructor for a set of dynamic typesBogDan Vatra2018-08-302-1/+247
| | | | | | | | | | | | | | | This feature is needed to register complex types (e.g. Q_GADGETS) at runtime, using a single constructor method and added type parameter. Without having the type id available to the Constructor it is impossible to specialize behavior, thus requiring separate constructors for each type. Generating these separate constructors at compile time is easy, but not at runtime. [ChangeLog][QMetaType] QMetaType can now register constructor for a set of dynamic types. Change-Id: I6071271d0e157864594dd07b4bc3a0abbeb15a44 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QWidget: fix setTabOrder for compound widgetsChristian Ehrlicher2018-08-301-0/+29
| | | | | | | | | | | | | When adjusting the tab order for compound widgets, it can happen that the order is already correct. The check for this case forgot one case which lead to a garbled focus chain. Task-number: QTBUG-68393 Task-number: QTBUG-69619 Task-number: QTBUG-10907 Change-Id: Ic3242746bdcf3a4db6ea8daa1498381500ca116d Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Postpone testing docker images and files until running 'make check'Ryan Chu2018-08-301-4/+9
| | | | | | | | | | | To avoid bothering the user who just wants to build all the test cases in qtbase. It is better to move the docker related testing to the check target. Then, it won't break the build procedure and force users to finish test server provisioning in advance. Change-Id: I2c4212297342c3eec7bcbebff9f991b7346d9503 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit e798e8a03ba51fad795c3407dce2aec18027b5f1)
* Add missing dependencies for tst_macnativeeventsTor Arne Vestbø2018-08-291-0/+2
| | | | | Change-Id: I5578b78a90588117339562b65884b7bc46770647 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Add missing dependencies for tst_qmacautoreleasepoolTor Arne Vestbø2018-08-291-0/+1
| | | | | Change-Id: Idf94d419526f02e89608b1d105a0858bceabbba1 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* darwin: fix tst_qsettings depsOswald Buddenhagen2018-08-291-0/+2
| | | | | | | | | | | the test uses CoreFoundation api directly, so it must link it explicitly. amends 6c8f32388b. Change-Id: I76b7d8ab41d6a66138eb45bd0f067cfee8e96cb8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* darwin: fix tst_qimage depsOswald Buddenhagen2018-08-291-0/+1
| | | | | | | | | the test uses CoreGraphics api directly, so it must link it explicitly. amends b0abe20d4. Change-Id: I734bfbedff56df731c1e528670f686565b63f3b5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Blacklist tst_Gestures on Ubuntu 18.04Joni Jäntti2018-08-281-0/+1
| | | | | | | | | | | | | These autotests are not currently working with the Ubuntu 18.04 platform being introduced to the CI. Task-number: QTBUG-70227 Task-number: QTBUG-70226 Task-number: QTBUG-70224 Task-number: QTBUG-70223 Task-number: QTBUG-70209 Change-Id: Ibe7cafd37763d7d305d8c3d9ec17bc6339db744a Reviewed-by: Liang Qi <liang.qi@qt.io>
* Initialize the QSqlQuery to be invalid when creating a sql modelAndy Shaw2018-08-281-0/+47
| | | | | | | | | | | | | | | When QSqlQueryModel or QSqlTableModel is created it will create a QSqlQuery which defaults to using the default QSqlDatabase connection. If this connection belongs to another thread then it will throw a warning as this is not safe to use. Since the QSqlQuery is always recreated when a query is set, the instance which is a member of the class can effectively be invalid until a new one is set. Task-number: QTBUG-69213 Change-Id: I68a5dd59fe62788f531d59a0680da11b118ee383 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* tst_QLocale::formattedDataSize: add RussianShawn Rutledge2018-08-261-0/+31
| | | | | | | | | The table and macros weren't extensible enough for non-Latin-based languages. Change-Id: I950f06de57aaf6bd0b24e0056e4acee2fb655f3d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge "Merge remote-tracking branch 'origin/5.11' into 5.12" into ↵Liang Qi2018-08-254-0/+33
|\ | | | | | | refs/staging/5.12
| * Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-08-244-0/+33
| |\ | | | | | | | | | Change-Id: I5f1567c792992fc00f0256f39b76cfbe017e6a3a
| | * Blacklist two tests on macOS that a planned CI change shall breakEdward Welbourne2018-08-242-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have #if-ery on Q_OS_DARWIN controlling an expectation of gettign "GMT+1" and "GMT+2" instead of "CET" and "CEST" in two tests; this turns out to not be a deficiency of macOS so much as of how we configure Coin's VMs. While we fix that, we need to ignore failures in these tests, so that we can pull the #if-ery out and clear the blacklist once the VMs are set up properly. Task-number: QTBUG-70149 Change-Id: If3577200cf980b3329161ab3eea7bd2e9d0124e0 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
| | * Test for fractional part of Costa Rican currencyEdward Welbourne2018-08-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CLDR up to somewhere between v29 (used by 5.9) and v31.0.1 (used by 5.10 and later) claimed Costa Ricans don't include fractions in their currency; now it claims they expec two digits. Apparently one of them does expect those digits, so this is the regression test I'll be cherry-picking back to LTS, to accompany the CLDR updates they need. Task-number: QTBUG-70093 Change-Id: I138772cc6013fa74de4f7c54b836cac83421eab2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * _q_interpolate<T> is unsafe with unsigned template argumentsLuca Beldi2018-08-221-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | _q_interpolate<T> subtracts 2 arguments of type T, for unsigned types this can cause wrapping around Task-number: QTBUG-57925 Change-Id: Iffa59f413579a3d5de8cb728fe71443d8e8a04aa Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | | Blacklist tst_Gestures::autoCancelGestures2Joni Jantti2018-08-241-0/+2
|/ / | | | | | | | | | | | | | | This autotest fails on the Ubuntu 18.04 platform. Task-number: QTBUG-70153 Change-Id: I2a2b0075a046664cdf5733d8629f634b4e33dc6f Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* | Refactor tst_QFiledialog::clearLineEdit()Friedemann Kleint2018-08-241-16/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test had some shortcomings: - Flakyness due to not waiting for the file dialog list to be populated. - It assumed that the hardcoded directory name ____aaaa... always would show first in the list. This may not be true on Windows, where names like .designer show above. - On failure, the test directory would leak. This manifested in failures like: FAIL! : tst_QFiledialog::clearLineEdit() '(fd.directory().absolutePath() != QDir::home().absolutePath())' returned FALSE. () To fix this, use QTemporaryDir and introduce predicates that can be used to check whether the dialog has been populated and the right file/directory is selected by pressing cursor down. Use the temporary directory as not to pollute the home directory. Change-Id: Ic504b91325993dcd6099c99e125e7ed8ff1d7672 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Faure <david.faure@kdab.com>
* | Revert "Fix time-zone tests on macOS >= 10.13, which now knows what CET is"Edward Welbourne2018-08-242-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fd38c97a6c5b7bfab39b5f814d68a02e4d197e70. Apparently our actual VMs for 10.13 don't get this right, although the ones used in testing did (prompting the fix this reverts). We probably have mis-configured VMs, but this is the quick-fix to get development moving again. Task-number: QTBUG-70149 Change-Id: Ib96755d8e21d9b226e22fc985f13f34fa04117b1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Extend blacklisting of tst_QWidget::maskedUpdate to cover all openSUSEsTony Sarajärvi2018-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | Fails on previous 42.3 and also 15.0. Just covering "opensuse" saves us from new commits every time we upgrade our openSUSE. We have a bug open of it after all. Task-number: QTBUG-51399 Change-Id: I5c0869daea41b1886faba3d0caaa0804a3705d54 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | tests: blacklist tst_QDialog::showFullScreen() on macOS 10.13 in CILiang Qi2018-08-221-0/+2
| | | | | | | | | | | | Task-number: QTBUG-70109 Change-Id: I70b998c1853462f8ea2037cff59e9598923743e5 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.11' into 5.12" into ↵Liang Qi2018-08-223-1/+237
|\ \ | | | | | | | | | refs/staging/5.12
| * | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-08-223-1/+237
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/text/qtextengine.cpp tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.cpp tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.h Change-Id: Ib9f968edbb0f3387c89bc25e914321d0738bfadc
| | * Windows QPA: Fix mapping of static text accessibility roleAndre de la Rocha2018-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | QAccessible::StaticText should be mapped to UIA_TextControlTypeId instead of UIA_EditControlTypeId. Task-number: QTBUG-69894 Change-Id: If2f8f55d2be492c02a3af5b1813ca12cf774a33a Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * QSortFilterProxyModel inserting at bottom of source modelLuca Beldi2018-08-171-0/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, if you try to insert a row at the bottom of QSortFilterProxyModel the row will be inserted in the source model at position proxy->rowCount rather than at the bottom. This causes insert at apparently random positions in the source. [ChangeLog][QtCore][QSortFilterProxyModel] QSortFilterProxyModel::insertRows(row,count,parent) with row == QSortFilterProxyModel::rowCount will insert at the bottom of the source model rather than at the row QSortFilterProxyModel::rowCount of the source model Task-number: QTBUG-58499 Task-number: QTBUG-69158 Change-Id: Ie78416c8fbc429303b8c9c98375630e3e4d85f6d Reviewed-by: David Faure <david.faure@kdab.com>
* | | Smooth image scaling for 64bit imagesAllan Sandfeld Jensen2018-08-221-11/+23
|/ / | | | | | | | | | | | | | | Adds support for smooth scaling 64bit images. Task-number: QTBUG-45858 Change-Id: If46030fb8e7d684159f852a3b8266a74e5e6700c Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | QWidgetWindow: Ensure Qt::WA_Mapped is set on obscured parent widgetsFriedemann Kleint2018-08-211-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | Frameless obscured windows do not receive WM_PAINT/expose events on Windows. Qt::WA_Mapped needs to be set on them to ensure updating works. Task-number: QTBUG-39220 Task-number: QTBUG-52039 Task-number: QTBUG-58575 Task-number: QTBUG-63927 Change-Id: Ic6c11f2be96378b6a6b61296f1f3e13cd49b50a6 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | MinGW: Exclude failing value of tst_QEasingCurve::setCustomType()Friedemann Kleint2018-08-211-0/+5
| | | | | | | | | | | | | | | | | | After updating MinGW toolchain from 5.3.0 to 7.30 test starts to fail. Task-number: QTBUG-69947 Change-Id: I850d854b27e1cb4e1dd2cb600e8e79bd18bff4a0 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Simo Fält <simo.falt@qt.io>
* | Extend blacklisting of qeventdispatcher to cover WinRTHeikki Halmet2018-08-211-0/+1
| | | | | | | | | | | | | | | | | | They have been blacklisted on windows and macOS previously. Now failing on WinRT as well. Task-number: QTBUG-69962 Change-Id: I30ca23005b082e820ee896fa36a8984a1536ad6b Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Merge dev into 5.12Oswald Buddenhagen2018-08-2136-278/+701
|\ \ | | | | | | | | | Change-Id: I63f632b595f66d2fc93e9aa713500e3799e3df2a
| * | tst_QWidget: Explain why some tests fail on WaylandJohan Klokkhammer Helsing2018-08-201-1/+7
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-66849 Change-Id: Ie6295bd402f6bc960c16f1e4b3b5a786017453e1 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | QMimeDatabase: Fix MIME detection issues with magics in MIME hierarchiesEike Ziller2018-08-205-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assume two MIME types A and B are registered, both with the same glob pattern, A being parent of B, A with some magic rule, and B with another magic rule. Given a file that matches the glob pattern and the magic rule of A, the resulting MIME type depended on the order of registration of A and B, because it would just check if some glob matching MIME type was also a subclass of the magic matching MIME type. The patch prefers the the MIME type that matches by magic if that matches by glob pattern as well (i.e. A in our example). The "recommended checking order" of the spec does handle that case. Task-number: QTBUG-44846 Change-Id: I2af43f6199faf9a42cd9c35d3a045441afbd6217 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
| * | Add support for QRegularExpression to QSortFilterProxyModelSamuel Gaist2018-08-1911-179/+420
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements the support for QRegularExpression in QSortFilterProxyModel. [ChangeLog][QtCore][QSFPM] QSortFilterProxyModel now supports QRegularExpression. Task-number: QTBUG-46810 Change-Id: If932d55f98f9b8bcf3a72c03ffd51da52cb50ad1 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: David Faure <david.faure@kdab.com>
| * | Migrate QDir to use QRegularExpressionSamuel Gaist2018-08-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The match method still uses QRegExp. This patch updates the code to use QRegularExpression and translates the wildcard patterns to a suitable form for QRegularExpression. [ChangeLog][Core][QDir] QDir now uses QRegularExpression internally for wildcard matching. Note that QRegularExpression might not give the exact same result as QRegExp as its implementation follows strictly the glob patterns definition for wildcard expressions. Nevertheless, the tests for QDir return the same results as before. Change-Id: I095959443ac7362f7534e35454eff038061fca82 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * | QRegularExpression: refactor wildcard translationSamuel Gaist2018-08-181-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch refactors the wildcardToRegularExpression method to generate a simpler regular expression. It also fixes some shortcomings of the previous implementation. Tests have been updated to ensure all cases are properly supported. Change-Id: I454e3fe8fe0bb663b2f319d6fa2fa8aec626c50d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | [macOS] Skip test that triggers a buffer overflow in CoreFoundationErik Verbruggen2018-08-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deep down in CoreFoundation, ICU is used, and this test triggers a heap-buffer-overflow with AddressSanitizer. Disable this test for macOS until Apple fixes it. Task-number: QTBUG-69875 Change-Id: I43e4a69708be8cde3bde87c57db21f5b717f96b8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Liang Qi2018-08-171-1/+18
| |\ \ | | | | | | | | | | | | refs/staging/dev
| | * | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-171-1/+18
| | |\| | | | | | | | | | | | | Change-Id: I8bb8227f9da982e7d5ebe5324fc27abd9ac0d4fc
| | | * QUrl: Make sure we do reject URLs for which IDNA nameprep failedThiago Macieira2018-08-161-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qt_nameprep() already reset the string to its original length to indicate failure, but we didn't handle that in qt_ACE_do(). So make it have a return value whcih makes it easier to handle that case and do handle it. [ChangeLog][QtCore][QUrl] Fixed a bug that caused URLs whose hostnames contained unassigned or prohibited Unicode codepoints to report isValid() = true, despite clearing the hostname. Change-Id: I41e7b3bced5944239f41fffd1545b7274c4b419d Reviewed-by: David Faure <david.faure@kdab.com>
| * | | Add a method to clear the data to QStandardItemModelLuca Beldi2018-08-172-0/+34
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | After the behavior of setItemData has been changed following QTBUG-45114, QStandardItemModel was lacking an interface to clear all the data from a single index. Task-number: QTBUG-69616 Change-Id: Ide0b5bb6358439fc42c474df8b044fbace6def8d Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: David Faure <david.faure@kdab.com>
| * | Modernize the "thread" featureUlf Hermann2018-08-175-28/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add it to configure.json and replace all occurrences of QT_NO_THREAD with QT_CONFIG(thread). Add conditions for other features that depend on thread support. Remove conditions where we can use the QMutex and QThreadStorage stubs. Change-Id: I284e5d794fda9a4c6f4a1ab29e55aa686272a0eb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Liang Qi2018-08-165-2/+33
| |\ \ | | | | | | | | | | | | refs/staging/dev
| | * | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-08-165-2/+33
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qconfig-bootstrapped.h src/plugins/platforms/xcb/qxcbbackingstore.cpp Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I4af138ffb2f5306373244523768209e8873b2798
| | | * tests: Fix top-level CMakeLists.txtKevin Funk2018-08-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: CMake Error in CMakeLists.txt: A logical block opening on the line .../qtbase/tests/auto/cmake/CMakeLists.txt:149 (if) is not closed. Broken by change 02ed1b36daebed5f3997bb676cf5e818c0db9d3c Change-Id: I6c04721edbccaa9fcdb53af92d33dfa87eeaebb8 Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| | | * Make QMessageBox window with the detailed text closableAlexander Volkov2018-08-141-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMessageBox window ignores QCloseEvent if it was created with Ok button and the detailed text was set. But it can be closed if it contains only one button. Make it closable if there are two buttons and one of them is the "Show Details..." button. [ChangeLog][QtWidgets][QMessageBox] A message box with two buttons, one of which is the "Show Details..." button, can be closed by clicking the X button on the window's title bar. Task-number: QTBUG-69526 Change-Id: Iba09e38561eb3898dc2aecfd38d8519d512a71c1 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | * Skip all qfocusevent test on platforms that don't support window activationJohan Klokkhammer Helsing2018-08-142-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-66846 Change-Id: Ia8b69ede9154822f78ca28e0a2470b8bfb2abef0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | * Fix potential crash when showing line/paragraph separatorsEskil Abrahamsen Blomfeldt2018-08-091-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When showing line and paragraph separators at an offset from the start of the string, the end of string pointer would be incorrectly set, and we would read past the end of the string. If any part of this memory happened to match the line or paragraph separator, then we would overwrite it and have a crash. I couldn't find any reliable way to test this, since the crash depends on the contents of the memory after the string allocated by the algorithm. But with an overflow of 100 000 characters, I found that it crashed every time I ran the test. [ChangeLog][QtGui][Text] Fixed potential crash when using QTextOption::ShowLineAndParagraphSeparators. Task-number: QTBUG-69661 Change-Id: I17d1996b883560bacdc7ce114c8aeb2b0108faea Reviewed-by: JiDe Zhang <zccrs@live.com> Reviewed-by: Michal Lazo <xlazom00@gmail.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * | | Refactor wildcard support in QRegularExpressionSamuel Gaist2018-08-161-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The API originally proposed was flawed in the sense that the setter function would use a modified version of the parameter given which would have make it a black box for the user. This patch fixes that by removing that setter and providing a static method that will return the pattern suitably modified to be used by QRegularExpression the same way the escape method does. [ChangeLog][Core][QRegularExpression] Implemented support for wildcard patterns through a static method. Change-Id: I0054bcaffd7525dac569f54fa81f73b7e4544b2e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Add debugging output to help diagnose cause of tst_qspinbox failureMitch Curtis2018-08-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've tried to reproduce the failures in the CI a couple of times now, but it keeps passing. Let's leave some debug output in the test so that if/when it does fail, we might know a bit more about why it does so. Task-number: QTBUG-69492 Change-Id: I5b39ac692e9026ce4b25cd13d342b11e061b777b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Nathan Collins <nathan.collins@kdab.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>