summaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* QTestLib: support explicit bool conversions in QVERIFYGiuseppe D'Angelo2016-05-046-114/+143
| | | | | | | | [ChangeLog][QTestLib] It is now possible to use variables of types with an explicit operator bool in the QVERIFY macro. Change-Id: I2685df164a616f6a065d689867daa9ea1de78e08 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-0316-22/+70
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/3rdparty/double-conversion/include/double-conversion/utils.h src/corelib/global/qnamespace.qdoc src/corelib/tools/qsimd_p.h tests/auto/corelib/io/qfile/tst_qfile.cpp Change-Id: I3ca1007bab5355d251c13002a18e93d81c254d34
| * make extra compiler targets depend on their respective compilerOswald Buddenhagen2016-04-181-1/+1
| | | | | | | | | | Change-Id: I6c04e0188137f6bbfeab243f00860b8ff079f69a Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * Blacklisting autotests that fail on RHEL 7.1 also on RHEL 7.2Milla Pohjanheimo2016-04-156-0/+7
| | | | | | | | | | | | | | | | Blacklisting those autotests that prevent us to get RHEL 7.2 in the CI. The same tests have already been blacklisted for RHEL 7.1. Change-Id: I2aa62647f7bd75681ea9e1d69bc62f9542fda5e2 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-139-21/+62
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/testlib/qtestcase.cpp src/testlib/qtestcase.qdoc Change-Id: Ied3c471dbc9a076c8de33d673bd557e88575609d
| | * tst_QNetworkReply: Commentary fixes on test server workarounds.Edward Welbourne2016-04-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up to commit 6fd205d5: document which version of danted shall make one work-around redundant, document that another work-around is still needed even with that v1.1.19; and remove a comment that referred back to an XFAIL that commit 6fd205d5 removed. Change-Id: I270b662528127c82184bff20b3cecea4f0c41b41 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| | * tst_QNetworkReply: fix mis-guided use of QSKIP().Edward Welbourne2016-04-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | QSKIP() causes the whole test to be skipped, where this work-around for a known quirk of the test server only requires skipping a single Q_COMPARE(); the rest of the test passes fine without it. Change-Id: Ie4612bd428f4cb4b342fad908cc2784fbadf069c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| | * Better error message when trying to load an invalid resourceJesus Fernandez2016-04-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change QFile::errorString function was returning an "Unknown error". Now it will return the typical ENOENT string. Task-number: QTBUG-45259 Change-Id: Ib7634f1aa5d91f77151cf92c58d3956e20a4cc6b Reviewed-by: hjk <hjk@theqtcompany.com>
| | * Fix finding a helper executable in tst_QLocalSocketJoerg Bornemann2016-04-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use QFINDTESTDATA to find the socketprocess helper executable. Now tst_QLocalSocket::processConnection() passes when started from Qt Creator without adjusting the working directory. Change-Id: I97ca3334a381b3cd646647487529bcd90b969528 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Fix crash when using QLockFile in a global destructorDavid Faure2016-04-101-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | (for instance any global object which writes out to a config file in the destructor). If the global cache isn't available anymore, don't use it. Change-Id: I851a6e394d0b073aebf3ffd88b1966d424bfb92e Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Autotest: confirm that QHostAddress obeys RFC 5952 recommendationsThiago Macieira2016-04-091-4/+13
| | | | | | | | | | | | | | | | | | Change-Id: I0c94a5c2846b48c8aea7ffff1435b8a7ccbd4d9e Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
| | * Fix parsing of IPv4 addresses with certain symbolsAlexander Grishkov2016-04-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add some extra checks to the parser to make sure that addresses like "300-05" aren't interpreted as valid IPv4 addresses. Change-Id: I12475eebc9452e060779bb05e2b4ad9512a28281 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| | * tests: fix tst_QFontComboBox on OS XLiang Qi2016-04-082-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | After 909d3f5c7, private families will not be shown in user interface. Task-number: QTBUG-41318 Change-Id: I15ae77cacd2a27c9db4b1a8ffbb582416258988c Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| | * tst_QStringBuilder: add a check for self-assignmentMarc Mutz2016-04-071-0/+5
| | | | | | | | | | | | | | | Change-Id: I78094146bf534163af12d6e265276d987d5ce994 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Add support for PSK on server sideAndré Klitzing2016-05-021-6/+148
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtNetwork][QSslSocket] TLS PSK ciphers are possible in server sockets. Task-number: QTBUG-39077 Change-Id: Iaa854a6f50242deae5492f2e4759c727488995f5 Reviewed-by: Richard J. Moore <rich@kde.org>
* | | QHostAddress: comparator with flexible conversion rulesFelix Braun2016-04-291-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a named comparison method that allows the caller to specify in how far a translation between IPv4 and IPv6 should be performed before comparing. Change-Id: I9aeffcd4539a6c0537c083c4553357b22167df3f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Make QSharedPointer without custom deleters call the correct destructorThiago Macieira2016-04-281-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Where "correct" is defined by what std::shared_ptr does as well as what happens when an intermediate QSharedPointer of the exact type of the constructor behaves That is, QSharedPointer<X> ptr(new Y); Behaves like QSharedPointer<X> ptr; { QSharedPointer<Y> tmp(new Y); ptr = tmp; } Change-Id: Id75834dab9ed466e94c7ffff14455d445f72592b Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Add QLibraryInfo::version() returning the Qt version as QVersionNumberThiago Macieira2016-04-271-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QLibraryInfo] Added QLibraryInfo::version(), which returns the current version of the Qt library as a QVersionNumber object. Change-Id: Ifea6e497f11a461db432ffff1448d4dc84ef57b1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | QTabBar: Add setAccessibleTabName() and accessibleTabName()Dongmei Wang2016-04-241-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, a tab's text is used as its accessibleName. When a tab's text is empty, there is no API to set the tab's accessibleName. The two APIs are added to set and return the accessibleName property of a tab. Task-number: QTBUG-46530 Change-Id: Idf88b5f905fe66c6365ea0eeb650e74211db90e1 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | | Removes spacing when widget is hidden in QGridLayoutKarim Pinter2016-04-211-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes spacing in QGridLayout when the QWidgets inside of the QGridLayout are hidden, by checking if the sibling is empty, thus duplicate spacing can be avoided. Task-number: QTBUG-52357 Change-Id: I45475e7b264f94ef3bec5f9a4b8cbaa1d53ec6dd Reviewed-by: Karim Pinter <karim.pinter@theqtcompany.com> Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
* | | Adding notification feature to SQLite driverKarim Pinter2016-04-211-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This modification enables to use notification feature of SQLite with Qt SQL driver, enables to subscribe for notifications and also to remove notifications. close() is added to destructor to unregister notifications in case it is used in multiple threads. [ChangeLog][QtSql][SQLite] Adding notification feature to SQLite driver Change-Id: I8b98787f5214a406357646a98711a8ff6045a0dd Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
* | | Add support for initializing QSharedPointer from nullptrThiago Macieira2016-04-191-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | std::shared_ptr supports it. To resolve an ambiguous overload when a literal 0 is passed as a parameter, the normal constructors needed to be made a template, like std::shared_ptr. Task-number: QTBUG-52569 Change-Id: Id75834dab9ed466e94c7ffff14451417892d2148 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Implement QFormLayout row removalSamuel Gaist2016-04-141-0/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFormLayout currently allows to remove a row only through takeAt, which doesn't resize the internal structure used to store the layout-related data. The implementation of rowCount uses that structure so it returns a row count that doesn't match what the user sees. The removeRow methods complement that be doing a "real" removal which will also keep the row count in sync. [ChangeLog][QtWidgets][QFormLayout] Added removeRow(), takeRow(). Task-number: QTBUG-15990 Change-Id: I204b219a837887e4bf95d1bc77407f1c53ae9819 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Remove tests/auto/qtest-config.h.Friedemann Kleint2016-04-1217-141/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The header defined a macro QTEST_NO_CURSOR depending QT_NO_CURSOR or obsolete platforms Windows CE and Meego. Replace usages by QT_NO_CURSOR in the tests. Change-Id: I3edac88e684d1f932dd3b721bb1c1b3fe9144237 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | Implement ordered dithering for image format conversionsAllan Sandfeld Jensen2016-04-121-0/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QImage::convertToFormat was ignoring its conversion flag argument, only performing dithering when converting to indexed formats. This patch updates the documentation and implements ordered dithering for other conversions. Change-Id: I807353d61669694185b7e595ef262d80d9fbb3f1 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-04-117-18/+170
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.cpp src/gui/painting/qpaintengine_raster.cpp Change-Id: I74e1779832f43d033708dcfd6b666c7b4f0111fb
| * | Update QDateTimeEdit tests to match data from CLDR v29Konstantin Ritt2016-04-081-8/+8
| | | | | | | | | | | | | | | Change-Id: Ie4c4b2ed927caa95a9e7e11f94f05da2fe4e2860 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * | Re-generate QLocale data from CLDR v29Konstantin Ritt2016-04-081-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * A bunch of fixes and additions to the locale data * Add new scripts from Unicode 8.0 and 9.0 * Map some potentially useful languages and territories [ChangeLog][QtCore] QLocale data updated to CLDR v29 Change-Id: I759ccb27fe19be2722be913c5c2e6aa5f36e5c14 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * | QStringRef: add missing {c,}r{begin,end}()Marc Mutz2016-04-071-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most containers have them in Qt 5.7, so add them to QStringRef, too. Brush up the docs, use the const_iterator typedef in the API, for consistency with QString's docs. [ChangeLog][QtCore][QStringRef] Added reverse iterators, rbegin(), rend(), crbegin(), crend(). Change-Id: I3d2884a1b2faae02c610ab3871552b65bc6e2521 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-074-4/+116
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qftp.cpp src/widgets/itemviews/qheaderview.cpp src/widgets/itemviews/qlistview.cpp tests/auto/network/access/qftp/tst_qftp.cpp Change-Id: I9f928f25d45d8944dd60bb583f649fc1615bc5d9
| | * QFtp: Use UTF-8 encoding.Friedemann Kleint2016-04-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to RFC 2640, FTP uses UTF-8 encoding. Fix the conversions accordingly. Task-number: QTBUG-52303 Change-Id: I615199b3d074fc3861f25df113dda672525766b6 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Richard J. Moore <rich@kde.org>
| | * Remove empty first lines of files.Friedemann Kleint2016-04-061-1/+0
| | | | | | | | | | | | | | | | | | | | | They might upset licensing related tools. Change-Id: I858d21fc418ba16959c88847b559b11bea29ed6b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| | * Make sure QStyleOption is correctly initialized.Hannah von Reth2016-04-051-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensures that QStyleOption is correctly initialized. This prevents possible styling issues due to QStyleOption's reporting version 0, see qstyleoption_cast. This enables users to handle more cases in their QProxyStyle. For now the test is only used for QCommonStyle. Change-Id: I768db00b12b46890343fffe44e4f562762e9cf80 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * network-settings.h: don't crash when running without the test serverMarc Mutz2016-04-051-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't access first() of a potentially-empty QList. Check for QHostInfo::error() first. Also change to constFirst() to prevent a detach. Change-Id: I91fa0bbfb21f62af29abdb23b4869a7f039b259e Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | Tests: Add more QChar::unicode() calls to brush over deprecation warning.Friedemann Kleint2016-04-086-84/+84
| | | | | | | | | | | | | | | | | | | | | Amends change e0ea0f6178c9dbee2a8c888fde84ad1cd9670c6b Change-Id: I19e505b2aac9c26173508d75bbf60a45db825fe4 Reviewed-by: hjk <hjk@theqtcompany.com>
* | | QTest: support nullptr in QCOMPAREMarc Mutz2016-04-086-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows to write QCOMPARE(ptr, nullptr); instead of QVERIFY(ptr); Task-number: QTBUG-49973 Change-Id: I6e1327d4327bcf17bd9b59de4352fdcaae98ac27 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Unify naming of LIBS/CFLAGS for 3rd party librariesLars Knoll2016-04-074-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Most libs use QMAKE_LIBS/CFLAGS, but some have other naming conventions. Unify them into using QMAKE_LIBS/CFLAGS. Change-Id: I39b188adc1f9a223a83b294c5315c3095a9c68de Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | QtWidgets: Remove Windows CE.Friedemann Kleint2016-04-0753-805/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove Windows CE-specific files, #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library, examples and tests. Task-number: QTBUG-51673 Change-Id: I102745aaca9d9737f2108fe7618111743d5ae980 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Always build JPEG and GIF support as pluginsLars Knoll2016-04-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our handling of plugins when Qt is build statically is nowadays good enough, so we don't need to build the JPEG and GIF support directly into Qt for static builds. Let's simply always build them as plugins. Also simplify the logic in configure, and get rid of the no-gif, no-jpeg and no-png config variables. [ChangelLog][Build system] JPEG and GIF image support is now always built as a plugin. Removed -imageformat-[jpeg|gif] arguments to configure. Change-Id: Ic01559ff406c966807b3be8761252e8802adcdf7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | QtTest: Remove Windows CE.Friedemann Kleint2016-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library and tests. Task-number: QTBUG-51673 Change-Id: I552b3fe8d6e0eb7c8c7b3a3d41558e5e21904dd2 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | QChar: optimize comparison with QString{,Ref}Marc Mutz2016-04-051-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of relying on the QString relational operators to implicitly convert the QChar to a QString, add relational operator overloads that compare the QChar without first turning it into a QString, saving one memory allocation per comparison, and allowing to mark the operation as nothrow. Consequently, in tst_QStringBinOps, verify now that all relational operations are noexcept. The added overloads make QChar ==/!= int comparisons ambiguous. De-ambiguate by providing a constrained template that matches int and nothing but int (otherwise, the QChar and the int versions would compete for a QChar::SpecialCharacter argument, and end up creating new ambiguities). This solution may not be perfect, but it can be easily extended should more ambiguities crop up. The existing overload deals with all patterns found in qtbase. Change-Id: I4156d918e9b9134c1da684b8b69e0ee526ad24e3 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/devLaszlo Agocs2016-04-0576-218/+532
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-04-0576-218/+532
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/corelib/ipc/ipc.pro src/plugins/platforms/xcb/qxcbbackingstore.cpp tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp Change-Id: Ia006e10ff1732fe78f90138c41f05b59b49486cf
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-0433-42/+275
| | |\| | | | | | | | | | | | | Change-Id: I35ca979395620e104e50b06366d0869433a4ffc2
| | | * QVariant: Fix flags for type-erased associative iterator keyStephen Kelly2016-04-031-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The flags here are passed to a private QVariant constructor, and they really represent a boolean - IsPointer or not. Because the flag for the key_type was incorrectly populated with the flag for the value_type, memory would be corrupted when using a mapping type whose value_type is a pointer, but whose key type was not, such as QMap<QString, int*> This typo has been there since the concept was introduced in commit v5.2.0-alpha1~807 (Add container access functionality for associative containers in QVariant., 2013-04-05). Task-number: QTBUG-52246 Change-Id: I9ecb13c603015eed2dc2ca43947fa0ecd6be8b5a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | | * QPointer: add a test for const QPointer<X>Marc Mutz2016-04-011-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | People use this, so make sure there's a test for it. I don't expect this test to fail, but static and dynamic checkers should be presented with this use-case, so they have a chance of warning, because certain implementation strategies of QPointer may make this code undefined. Change-Id: I334bd73204ba4e186c4098fc6b7188917407e020 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | | * Autotest: Remove blacklistingsSimo Fält2016-04-018-24/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing blacklistings from tests that are now passing. Change-Id: I00aa1ce286d3e7715fb4bee4a36d0d77049a29ae Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
| | | * Fixup for text labels in lancelot graphics testEirik Aavitsland2016-03-312-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some strings were drawn with a different size or scaling than what the string itself said, causing confusion. Change-Id: I4b187cba6d467cfa0900576bdf451052baa806e6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
| | | * moc: bail out early on missing or invalid options fileJoerg Bornemann2016-03-311-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If moc is invoked with the @ argument and no options file is specified or the options file cannot be read, do not try to parse the empty arguments list. Otherwise QCommandLineParser will print an additional error message that is of no value for the user. Task-number: QTBUG-51847 Change-Id: I9aa1eb20a44097b553123be8bc6fded87473a03a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | | * Fix possible crash in QImage::pixel()Eskil Abrahamsen Blomfeldt2016-03-311-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QImage::pixel() assumed that the color table was valid for the values in the bitmap. This was always wrong for indexed images with explicit no color table set and was wrong for mono images that were constructed from preexisting data. For mono images, we default to a black/white color table, like we do when constructing with uninitialized data. For indexed image, we always default to no color table, but instead of crashing in pixel(), we warn and return an undefined value. [ChangeLog][QtGui][Image] Fixed possible crash in QImage::pixel() for mono or indexed images. Change-Id: Ieaf19c03984badddfd06e1855a7e287b862adc70 Task-number: QTBUG-50745 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>