summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* tst_QDnsLookup: Update to match the new zone for test.qt-project.orgThiago Macieira2015-03-051-4/+8
| | | | | | | | | | | | This commit updates the NS records and disables the lookup for ptr-single.test.qt-project.org, as the new provider does not support adding PTR records outside of the in-addr.arpa zone. This commit reverts f9c70128bbb45ea4b206920dda7c330afa74916a, which was a reversal of 24c52bd44b700725d4feec0d2e05a7e382e59c4e. Change-Id: Ia0aac2f09e9245339951ffff13c7cab530a41515 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix another crash when converting format of buffer-created QImageEirik Aavitsland2015-03-041-3/+9
| | | | | | | | | | | | | | | | | This continues 68762151dbf45fbb44e140ac2ad13dbe8d357352 When doing format conversion, the optimized inplace codepath did not check if the image data was external, i.e. if the QImage had been created by the constructor taking an existing external buffer. The previous commit fixed the readonly case. But in the case of the QImage constructor taking non-const uchar*, data will be read-write, but still external. This would of course crash if the converter tries to realloc it. Task-number: QTBUG-44610 Change-Id: I94d275d464e8af221682b538fc3e4897a59c061e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* tst_QNetworkDiskCache: Stop using actual web serversThiago Macieira2015-03-041-4/+4
| | | | | | | | | | | | | | | | | www.example.com is a reserved domain (RFC 6761), but IANA is running a web server there. As for www.foo.com, that also exists, is a real website and is often content-filtered in corporations (it triggers a firewall warning for me -- "You attempted to visit a site that is in violation of Intel acceptable use guidelines"). So use a localhost instead, since we don't actually need to connect to the servers to do the work. And since we don't need to connect, I chose port 4 as it's extremely unlikely someone is running an HTTP server there (/etc/services lists it as unassigned). Change-Id: Ia0aac2f09e9245339951ffff13c82439c6d5f945 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Fix drawing of background for multipage QTextTable cellsJoni Poikelin2015-03-021-0/+115
| | | | | | Task-number: QTBUG-31330 Change-Id: I0103919ee2864b7cd8bed41e6d6fe4ac5b84142e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Revert "Update the DNS and name-resolver tests to the official zone"Thiago Macieira2015-03-013-7/+7
| | | | | | | | | | This reverts commit 24c52bd44b700725d4feec0d2e05a7e382e59c4e and makes the Qt unit tests requiring DNS zones to use the temporary test zone in macieira.org (Thiago's domain). Change-Id: Ia0aac2f09e9245339951ffff13c6d3752c83b773 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
* Fix crash when converting format of QImage created from bufferEirik Aavitsland2015-02-261-0/+13
| | | | | | | | | | When doing format conversion, the optimized inplace codepath did not check if the image data was readonly, i.e. if the QImage had been created by the constructor taking an existing external buffer. Task-number: QTBUG-44610 Change-Id: I085ff8da427bc4ee392f548dffd2418b63148965 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Autotest: fix existence check after c8c68ec.David Faure2015-02-241-6/+3
| | | | | | | | | The files were moved to a qrc resource, so the string is never empty, we need to use QFile::exists to make sure they exist. And the error message was wrong, pointing to current dir. Change-Id: I532bda9f6221fb5c69b779b8b48baac9ede90eba Reviewed-by: Rainer Keller <rainer.keller@theqtcompany.com>
* Disable tst_qaccessibilitylinuxFrederik Gladhorn2015-02-241-1/+1
| | | | | | | | | | | | | This test accidentally causes the screen reader (in newer Gnome environments) to be launched. This messes up the CI machines enough that nothing works afterwards. Disable the whole test until I write the proper fix. We don't lose anything because it was marked as insignificant anyway. Task-number: QTBUG-44434 Change-Id: I410e80580977178ea99a370c6c0909d1fb49a71c Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* Timezones: Fix handling of offset-from-UTC QTimeZonesThiago Macieira2015-02-231-0/+12
| | | | | | | | | | Those QTimeZones failed to convert to other timezones because the data() virtual function was never overridden and reimplemented. That meant all QUtcTimeZonePrivate objects were *really* UTC, with no offset. Task-number: QTBUG-44600 Change-Id: Ia0aac2f09e9245339951ffff13c5294bb783c674 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QVector: fix use of invalid iterators in removeAll()Marc Mutz2015-02-221-0/+7
| | | | | | | | | | | | | | | | | | The c2m() function which converts a const_iterator into an iterator is a broken concept for an implicitly shared container such as QVector, because the act of calling begin() as the starting point already detaches and invalidates the c2m argument. This could be fixed in c2m, but the bug wasn't even in c2m, but in removeAll(), which called end() before c2m, so the c2m argument was already invalidated when entering c2m. The solution is to store the positions as indices instead of iterators before calling the first detaching function. Task-number: QTBUG-44592 Change-Id: I66cf4f1277e71148a4d5b5bbfb6a3369ad02db68 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Make sure there's a scene before using itAlbert Astals Cid2015-02-171-0/+11
| | | | | | | | | | Fixes crash hovering links in quassel Task-number: QTBUG-44509 Change-Id: I77d8d9118ad185ed70a46e91445e2960200e562b Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix crash in QAccessibleTextWidget::attributes()Jan Arve Saether2015-02-171-0/+1
| | | | | | Task-number: QTBUG-44006 Change-Id: I79d7d84206a3e4abcd49c7c6e5e91b7c9c753dd6 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Make sure the QSplashScreen isn't closed instantly when calling finish()Andy Shaw2015-02-172-0/+82
| | | | | | | | | | | | Most of the time the widget passed in to finish() will not yet have a window handle so it would just call close() straight away. This way it ensures has a window handle. Task-number: QTBUG-35757 Change-Id: I2e212a2ea496cc4e4bba57a8c2d0d127afc43e48 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* bic: Add 5.{1,2,3,4}.0 bic data for linux-gcc-amd64Sergio Ahumada2015-02-1466-167900/+358023
| | | | | | | | | Remove the ia32 data since there are no linux x86 machines in the CI system (which makes the data useless from an automated testing point of view) and most people use x64 these days anyway. Change-Id: Ifdf8850767869eb2706e2a9d6396314d1fb25500 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* re-enable more QWidget testsJoerg Bornemann2015-02-131-5/+1
| | | | | | | | | Re-enable tests that were skipped because of open, now closed, bugs. Change-Id: Ic7dbe0a9cf74df1e69550536d5923a62e2186b6f Task-number: QTBUG-26424 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Fix path to examples part of tst_GuiAppLauncherSergio Ahumada2015-02-131-112/+112
| | | | | | | | Task-number: QTQAINFRA-323 Change-Id: I178cb788531c500051a7738512d8e19e1d7e7ad8 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* Document and further test that QJsonObject::keys() is sorted.Mitch Curtis2015-02-111-0/+2
| | | | | Change-Id: I6b145c1240cce85ad3fea6fb90ddbed629487f83 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fixed crash when adding items with spansJan Arve Saether2015-02-091-0/+18
| | | | | | | | | | | | | | This only occurred if the item added was the only item in the last row/column, since then the the internal grid failed to expand (in this case it would always call expand(0, 0), which would not create the extra row/column). [ChangeLog][QtWidgets][QGridLayout] Fixed crash that sometimes happened when adding items with spans that spanned to the bottom/right edge. Task-number: QTBUG-38052 Change-Id: Iba95f6d9d9356b4d1c84c7b93f4af9b4ea0cf714 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Fix reported build failure with VS2010 on windows 8.1.Richard J. Moore2015-02-091-3/+3
| | | | | | Task-number: QTBUG-44321 Change-Id: I885e3dab52193f7dfd245345fde53f6bb3420430 Reviewed-by: Peter Hartmann <peter-qt@hartmann.tk>
* Don't crash with invalid QModelIndex or when QTreeWidgetItem is NULL in ↵Maks Naumov2015-02-062-0/+19
| | | | | | | mimeData() Change-Id: I0a9abaa05cf136eadf222d3e7d102930719b84ff Reviewed-by: David Faure <david.faure@kdab.com>
* SSL NPN negotiation: Do not abort on unmatched protocolsPeter Hartmann2015-02-051-0/+29
| | | | | | | | | | | | | | | | | ... but choose HTTP/1.1 and continue connecting anyhow. According to the NPN spec, actually we should choose SPDY: "In the event that the client doesn't support any of server's protocols, or the server doesn't advertise any, it SHOULD select the first protocol that it supports." However, some tested servers did not advertise anything and did not support SPDY, so blindly trying the newest protocol would fail. We are conservative in that case and choose HTTP. Task-number: QTBUG-40714 Change-Id: Ia8aaf01fea74e13d9e4416306f85f1890b25559e Reviewed-by: Richard J. Moore <rich@kde.org>
* Do not close popup widgets when showing a widget embedded into QGraphicsView.Friedemann Kleint2015-02-051-0/+39
| | | | | | | | | Disable top-level widget code path for embedded widget in the show helper. Task-number: QTBUG-43780 Change-Id: I574e07130e5e68a019a426cee3fde982f3883720 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Correct inplace conversion methods from RGBA8888 formatsAllan Sandfeld Jensen2015-02-031-2/+5
| | | | | | | | The methods for inplace conversion from RGBA to ARGB was misplaced by one step causing conversion to RGB16 to get an invalid method. Change-Id: I3b2b4cffe993705c48613eec7d9b7c6213f57fc2 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* QHeaderView: check that length is correct and fix restoring Qt4 state.Arnaud Bienner2015-02-031-0/+31
| | | | | | | | | When multiple sections were grouped together, sectionItem.size was the total size of grouped sections, not the size of one section. Length is supposed to be equal to the section items length, but the state saved might be corrupted. Task-number: QTBUG-40462 Change-Id: I401a1583dd30880ccf5b4c105a237d6563f212e8 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Suppress Ctrl/Ctrl+Shift keypresses in line/text edits.Friedemann Kleint2015-02-033-20/+55
| | | | | | | | | | | | | Ctrl/Ctrl+Shift should not cause any characters to be input (as opposed to AltGr(Alt+Ctrl) as used on German keyboards). Extend the tests in QLineEdit and QPlainTextEdit to check the modifiers, remove test from QTextEdit since it is handled by QWidgetTextControl. Task-number: QTBUG-35734 Change-Id: Ie0004fac68cf840c68247f27547e84b021355cd2 Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
* Add qopenglconfig test.Friedemann Kleint2015-02-023-1/+234
| | | | | | | | | | Add some parts of the qtdiag tool as a qtbase test to output the graphics configuration to the CI log and to verify that Open GL can be initialized for platforms on which the qopengl test is marked as insignificant (for example, ANGLE). Change-Id: Id445e57928e0307ad38cd433c52a62501f1097c6 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Fix QGraphicsWidget window frame section logicDyami Caliri2015-02-021-0/+29
| | | | | | | | | CppCat detected duplicate sub-expressions in the code that checked for BottomLeftSection and BottomRightSection. It was fairly obvious to see what the values should be. Change-Id: Id45ca5bbd26c92b800c60867fef5170578216eee Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* Merge remote-tracking branch 'origin/5.4.1' into 5.4Frederik Gladhorn2015-01-2925-9/+90
|\ | | | | | | Change-Id: Idadb5639da6e55e7ac8cc30eedf76d147d8d5d23
| * Use qt.io rather than qt-project.org for network testsShawn Rutledge2015-01-283-3/+3
| | | | | | | | | | | | | | | | | | Mainly because of a change in certificates which is causing failing tests. This patch is cherry-picked from https://codereview.qt-project.org/104619/ Change-Id: I8304e5ac4107428a250b71be5df7b5399a811017 Reviewed-by: Richard J. Moore <rich@kde.org>
| * Fix QXmlStreamReader parsing of files containing NULsThiago Macieira2015-01-2418-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to a flaw in the internal API, QXmlStreamReader's internal buffering would mistake a NUL byte in the input stream for EOF during parsing, but wouldn't set atEnd == true because it hadn't yet processed all bytes. This resulted in an infinite loop in QXmlStreamReaderPrivate::parse. So, instead of returning zero (false) to indicate EOF, return -1 (but in unsigned form, ~0, to avoid ICC warnings of change of sign). In turn, this required enlarging a few variables to avoid ~0U becoming 0xffff, which is a valid QChar (could happen if the input is a QString, not a QIODevice). Task-number: QTBUG-43513 Change-Id: If5badcfd3e4176b79517da1fd108e0abb93a3fd1 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * QTemporaryDir: Remove directories on failureEskil Abrahamsen Blomfeldt2015-01-221-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating a temporary directory but failing to set its permissions, we need to remove the directory we created to avoid leaving 256 empty, unused directories in the destination folder. This happens on Android if you try creating a QTemporaryDir in the download path on the sdcard. Task-number: QTBUG-43352 Change-Id: Ic88fb7572f1abd65e5c7d8882b59c95f4b22ed72 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QSortFilterProxyModel: fix a regressionGiuseppe D'Angelo2015-01-221-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bec1854cc023fb705319c582a636d5f484adafcc introduced a regression: when sorting a tree model, children items would not follow the sorted parents any more (they wouldn't be remapped correctly), resulting in crashes. So, the fix needs more reasoning; let's revert the fix, but leave the original test around for any subsequent attempt, and introduce a new test which looks for the right behavior when sorting trees. This commit partially reverts bec1854cc023fb705319c582a636d5f484adafcc. Task-number: QTBUG-43827 Change-Id: Ic83ac53aef639f870f6c36a8b4b2992f5b485b13 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Volker Krause <volker.krause@kdab.com> (cherry-picked from qtbase/e9ad46ed412987e3e46c5a641e5f30408b97ac90)
| * tst_qstring_mac: Correct memory management.Morten Johan Sørvig2015-01-201-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The NSStrings return by QString::toNSString are autoreleased; manually releasing them is not correct. The test still works (no leaks or double deletes) since there is no autorelease pool in place when running it. We don't want to encourage incorrect usage: remove the release call an add an autorelease pool. Change-Id: Ic566fd3a8efd6cbc0eb6db850248a68bfc8fed0b Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
| * Merge 5.4 into 5.4.1Oswald Buddenhagen2015-01-1640-85/+685
| |\ | | | | | | | | | Change-Id: I78d848c0bb396584a205a8066d253f2bcac8da56
| * | Swallow wheel events while a popup widget is open.Friedemann Kleint2015-01-121-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wheel events should not cause a popup widget parented on a scrollable widget to be closed or moved to correctly reflect the system behavior on OS X and Windows. Task-number: QTBUG-42731 Task-number: QTBUG-40656 Change-Id: I4ef75aa8331390309c251316ac76db2cf9ec51f7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | | Enter/Return should cause an edit inside an itemview on OS XAndy Shaw2015-01-232-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was available before but was protected with the wrong define for OS X, so this is changed to the right define. Task-number: QTBUG-23696 QTBUG-23703 Change-Id: I669a6cf2ff7c01020693adff9f04a4b8b9404d02 Reviewed-by: David Faure <david.faure@kdab.com>
* | | Diaglib: Fix compilation with Qt 5.3.Friedemann Kleint2015-01-233-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | QDebug does not have noquote() in Qt 5.3. Task-number: QTBUG-44021 Change-Id: If35b926d6b1e5bb9ad3534357630533dfcecd076 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | | Android: Fix some tests for QCompleterEskil Abrahamsen Blomfeldt2015-01-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | When checking for completion on the file system, we need to check for directories that actually exists. Change-Id: Id83e3802abcd40355dcd8cd47f2d55061eacd117 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | | Autotest: Make mimedatabase testdata resourcesRainer Keller2015-01-224-10/+17
| | | | | | | | | | | | | | | Change-Id: Ia410d6b0cdece248651213dbbb035c951e5f6983 Reviewed-by: David Faure <david.faure@kdab.com>
* | | Fix QUdpSocket's emission of readyRead()Thiago Macieira2015-01-221-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation says that QUdpSocket emits readyRead() only for one datagram and that if you don't read it, the class will not emit again. That should be implemented by disabling of the socket notifier once we have the datagram already read, but was broken. In turn, that breakage caused a live-lock of the event loop: since we didn't disable the notifier nor read the pending datagram, the event loop would fire every time for the same datagram. The re-enabling of the notifier was already working. Task-number: QTBUG-43857 Change-Id: Ic5d393bfd36e48a193fcffff13bb32ad390b5fe8 Reviewed-by: Peter Hartmann <phartmann@blackberry.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* | | Do not include accessibility.pri twiceFrederik Gladhorn2015-01-211-0/+1
| | | | | | | | | | | | | | | Change-Id: Id4b312a57b098ad893ba08e7a3c7f1a0fb891eef Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | Accessibility: Fix selection change notifications on LinuxFrederik Gladhorn2015-01-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The selection update is not implemented on other platforms (if needed at all). Task-number: QTBUG-39440 Change-Id: I8eb8c4eb1c23ba2d246bc95f1c77dc9da9e22495 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | | Fix QSharedPointer::create and QEnableSharedFromThisThiago Macieira2015-01-211-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | We forgot to initialize the tracker if create() was used. Task-number: QTBUG-43696 Change-Id: Ic5d393bfd36e48a193fcffff13b740931ff2204b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Windows: Fix coordinate offset when positioning the taskbar on the left.Friedemann Kleint2015-01-201-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For windows that do not have WS_EX_TOOLWINDOW set, the WINDOWPLACEMENT API uses workspace/available aera coordinates. Introduce a helper function to return the offset and use that. Task-number: QTBUG-43872 Change-Id: I329c640f180524699b45b855b4583f447c4a0987 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | | Fix QVERIFY() in tst_qwidget.Friedemann Kleint2015-01-201-35/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | Replace by QCOMPARE where applicable; introduce message to generate output for failed comparisons with QVERIFY2(). Task-number: QTBUG-43872 Change-Id: I09c8f9fd31ceed224e441f253049f68907ca0d7a Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | | Autotest: Use QFINDTESTDATA to find test dataRainer Keller2015-01-192-5/+4
| | | | | | | | | | | | | | | | | | Change-Id: Ie6c659f6d8e8b3eeaf2453f0cba6189d56f86581 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* | | Android: don't report xfailBogDan Vatra2015-01-191-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: I2998632cffc29161eb26421b07cf51a4138fcad3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | | Add test for QColorDialog initial colorJoni Poikelin2015-01-191-0/+10
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-43548 Change-Id: I9410072e5bf837933148d48c4f9d6797337485f5 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | windowflags test: Fix showing which flags are setSérgio Martins2015-01-191-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The text edit that shows which flags we have set should be updated in PreviewWindow::setWindowFlags() and PreviewWidget::setWindowFlags() but QWidget::setWindowFlags() isn't virtual so only the base class one was called. Change-Id: I5c9d47d003d5701dde1ab63df0d349f641d66f44 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | Fix a crash in QPlainTextEdit::documentChangedPierre Rossi2015-01-191-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The layout for an invalid block is very likely to be null, it shouldn't be accessed without checking the block's validity first. We can make the check a bit more conservative and simply check that the block isn't empty. Change-Id: Ic1459a6168b1b8ce36e9c6d019dc28653676efbe Task-number: QTBUG-43562 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>