summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fixed QTextStream "stdin" auto testsBernd Weimer2013-07-303-13/+9
| | | | | | | | On some platforms (like BlackBerry) qDebug doesn't write to stderr, so we directly write to stderr with fprintf. Change-Id: Ib86211c98cf4da1fa2dbea4600a78e2013dc1a5a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* moc: add unittest for --ignore-option-clashesDavid Faure2013-07-302-0/+96
| | | | | | | Based on tst_Moc::frameworkSearchPath(). Change-Id: I4f44f98d62acc1a2a92739cceba731dcb5f661b6 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Avoided zero devision in cube root approximationBernd Weimer2013-07-291-5/+9
| | | | | | | | Halley's method to get a better approximation is omitted, if it would include a devision by zero (INFINITY/NaN is worse). Change-Id: Ida09326e2b5892d7cb21bcb956631c289e5b56ba Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix fillRect on RGBA8888 imagesAllan Sandfeld Jensen2013-07-291-5/+55
| | | | | | | | | The fill color was not correctly converted before being filled into RGBA8888 images. This patch adds a function with convertion and adds tests for it to tst_qpainter. Change-Id: If8b0e6db38b2794a60301842e25f377eb7216796 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Implement move-ctor and move-assignment-op for QScopedPointerGiuseppe D'Angelo2013-07-282-0/+156
| | | | | | | | | | | | | | | | | | | | | It makes sense for a QScopedPointer to be movable, for instance for allowing instances to be returned from a function. Ownwership of the managed pointer is still tied to one (and one only) QScopedPointer instance. Moreover, a move assignment operator makes sense as well, as it implementing the equivalent of this->reset(other.take()); only when other is a rvalue and not a lvalue (so either it's a temporary or it's getting explicitly moved in with std::move). This makes QScopedPointer API's a bit closer to std::unique_ptr's one. Task-number: QTBUG-29754 Change-Id: If1ac0c688327a67af4ad5b7ad45b439b022ed1c6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrl: add matches(url, options) method.David Faure2013-07-261-0/+58
| | | | | Change-Id: I534f494aecc48cc2accfcfcb692f35046250b493 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Re-enable tests tst_qgraphicsproxywidget, tst_qgraphicswidget.Friedemann Kleint2013-07-241-2/+2
| | | | | | | | Task-number: QTBUG-25294 Task-number: QTBUG-20778 Change-Id: I6b6e19e812d5527465c6162e2df2e4807cf160da Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-07-2423-37/+350
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-07-2323-37/+350
| |\ | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp Change-Id: I18a9d83fc14f4a9afdb1e40523ec51e3fa1d7754
| | * Don't check for the existence of private include directories.Stephen Kelly2013-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some packagers don't want to install the private headers. Check the existence of private headers only if the 'Private' component is specified when finding the package. Task-number: QTBUG-32466 Change-Id: I1fdbfb25e8ce485cd051564b937f766b2733741a Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| | * Ensure that the user codecs are listed in QTextCodec::availableCodecsThiago Macieira2013-07-211-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | Codecs registered by creating new QTextCodec instances should be listed there. Task-number: QTBUG-32500 Change-Id: I56c00e0d6bbfef55a6cbd571bcf9aa2cf333ef3a Reviewed-by: David Faure <david.faure@kdab.com>
| | * Expect tst_QEasingCurve::setCustomType() failing on 32 bit Ubuntu 11.10Simo Fält2013-07-202-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently tst_QEasingCurve::setCustomType() is always failing on CI when ran on 32 bit 11.10 Ubuntu. Task-number: QTBUG-32432 Change-Id: Iaf346c14985f14716692fe996714b7040fb70930 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
| | * Ignore or suppress warning and debug messages in tst_QLocalSocketThiago Macieira2013-07-201-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The one in tst_QLocalSocket::writeToClientAndDisconnect just needed proper ordering: that's what waitForDisconnect is for. At the same time, we need to make sure we get the same message from all three implementations of QLocalSocket::waitForDisconnect (and without the useless space at the end). Change-Id: I21364263cf908df022df814a6a39fcb5783e84e6 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
| | * Fix incomplete override of QIODevice::open in QProcess and QLocalSocketThiago Macieira2013-07-202-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rule for a new override is that it must still work if the old implementation is called. The catch is that any class that derives from QProcess and isn't recompiled will still have QIODevice::open in its virtual table. That is equivalent to overriding open() and calling QIODevice::open() (like the tests). In Qt 5.0, QProcess::start() called QIODevice::open directly, not the virtual open(), so there's no expectation that a user-overridden open() be called. With that in mind, simply fix QProcess::start to not call the virtual open at all. Similarly with QLocalSocket, the calls to open were always non-virtual. Task-number: QTBUG-32284 Change-Id: I88925f0ba08bc23c849658b54582744997e69a4c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| | * Add a test for QLocalSocket::openThiago Macieira2013-07-201-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | This should have been done in the commit that introduced open (953255abab0f99afe7559da93ba18a876805d78d), but was missing. Change-Id: I1c2de4ad5fa42aa5b90646e7d4d7d1b1570a0f87 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| | * Add manual test for UNC pathsGatis Paeglis2013-07-194-1/+107
| | | | | | | | | | | | | | | Change-Id: I25949b6fb04dc4bb976f4daea96cbab2897e15af Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| | * Make *ItemBoundingRect modes work with custom shapes.Mitch Curtis2013-07-161-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, calling QGraphicsScene::items(QPointF(0, 0), Qt::IntersectsItemBoundingRect) or QGraphicsScene::items(QPointF(0, 0), Qt::ContainsItemBoundingRect) will exclude items whose shape does not contain QPointF(0, 0). This is because QGraphicsSceneIndexPointIntersector::intersect() also checks if the point is contained within the shape, instead of just checking if it is contained within the bounding rect. Task-number: QTBUG-19036 Change-Id: Ie701af2a5694d40cf9b3c9c19adbb09a53a4e398 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
| | * Fix QDBusAbstractInterface::isValid() for peer connectionsAlberto Mardegan2013-07-161-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not attempt to lookup the service owner on peer connections (it will fail). Make QDBusAbstractInterface::isValid() return a sensible result on peer connections, instead of always returning false. Task-number: QTBUG-32374 Change-Id: I1b02feaffb3b255188f8d63306f89f5034a32f22 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Detect popup window correctly in modal window blocked handling.Friedemann Kleint2013-07-161-0/+1
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-32433 Change-Id: Ida8f6237a383311bc2e231de90fd54b90ebd1508 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| | * QGuiApplicationPrivate::updateBlockedStatus(): Recurse over children.Friedemann Kleint2013-07-161-2/+7
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-32242 Change-Id: Ia43257a998507b9a367f41dc2395ab92cc89a118 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| | * tst_QIcon: Fix availableSizes() and task223279_inconsistentAddFile()Sergio Ahumada2013-07-158-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Copy some needed files into a local folder when QtWidgets is not available. Task-number: QTBUG-31993 Change-Id: I93b65bda198c22a60e979c119de8de683a78bb53 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| | * test: Mark tst_QNetworkReply::backgroundRequestInterruption() as XFAIL on OS ↵Sergio Ahumada2013-07-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | X 10.8 Task-number: QTBUG-32435 Change-Id: Ibc4495126b066c17e6a4477f403677b9fc9da453 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| | * test: organize tst_qnetworkreply .pro file a bitSergio Ahumada2013-07-151-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Don't run this test in parallel - Remove redundant QT=-gui - Place the insignificant_test marks together Change-Id: I078fa29a4dccef9af8798792d06d51835b4b8934 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | Add the RFC2822Date formatKevin Ottens2013-07-243-0/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDateTime can now be converted to strings compliant to RFC 2822. Additionally, it supports RFC 850 and RFC 1036 during parsing. By having them all together, all type of dates found in exchanged messages on the internet (including USENET) get supported. Change-Id: I771066c23f409d20b31b7d802f37852ea68ca2a0 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | | Support RGBA image formatAllan Sandfeld Jensen2013-07-232-1/+69
|/ / | | | | | | | | | | | | | | | | Support the byte-ordered RGBA format which is used by OpenGL, and many endian neutral byte formats. Task-number: QTBUG-32201 Change-Id: I77cffb4c30c69545fa96ded2f537b2ebd9351acb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* | Prevent QLineEdit from emitting edited signal (QTBUG-27347)Ivan Komissarov2013-07-211-0/+6
| | | | | | | | | | | | | | | | edited() signal should not be emitted when QValidator fixups text in a lineedit. Change-Id: Iccef45c4b858a65fd5097dc9e5033cefb09ad889 Reviewed-by: David Faure <david.faure@kdab.com>
* | TestLib: align the colons so the "actual" and "expected" align tooThiago Macieira2013-07-2117-39/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: FAIL! tst_testcase::testcase: Compared values are not the same Actual (actual): F0O Expected (expected): FOO Now: FAIL! tst_testcase::testcase: Compared values are not the same Actual (actual) : F0O Expected (expected): FOO Change-Id: I6f0768e4ef53e065b85a56879cecbad06fa34aef Reviewed-by: Jason McDonald <macadder1@gmail.com>
* | QUrl: let StripTrailingSlash remove multiple trailing slashesDavid Faure2013-07-201-0/+2
| | | | | | | | | | Change-Id: Ic4c8f70bb729630d9110ed6766dd9e40f9ab4d80 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QUrl: add fileName() method. Complements QUrl::RemoveFilename.David Faure2013-07-201-0/+39
| | | | | | | | | | Change-Id: Ieda43364214c3b7aee43040e176e29ad48c14271 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Make QUrl store the first bad IPv6 character in the error stringThiago Macieira2013-07-201-0/+2
| | | | | | | | | | Change-Id: I9a0a521ff5c3188ba6f862e2b91369cb61787359 Reviewed-by: David Faure (KDE) <faure@kde.org>
* | Make QIPAddress::parseIp6 return the first bad characterThiago Macieira2013-07-201-2/+2
| | | | | | | | | | | | | | In case of undetermined error, returns end. Change-Id: Ic5d16bab5fc56ad24f19da25f73f9b844ce11d3f Reviewed-by: David Faure (KDE) <faure@kde.org>
* | QUrl: Uppercase the version number in IPvFutureThiago Macieira2013-07-201-1/+1
| | | | | | | | | | | | | | | | | | We don't know what it might be used for. The RFC for URI says it's an HEXDIG, and since we uppercase all other HEXDIGs already (in percent-encodings...). Change-Id: I56d0a81315576dd98eaa2657c0307d79332543a5 Reviewed-by: David Faure (KDE) <faure@kde.org>
* | Make the URL Recode function to fix bad input in FullyDecoded mode tooThiago Macieira2013-07-201-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | So far, this function hasn't been used for input coming in from the user, so it wasn't necessary. But we may want to do it, or we may already be doing it accidentally somewhere that isn't triggering the failed assertions during unit testing. So let's be on the safe side and allow it. And test it too. Change-Id: Ib63addd8da468ad6908278d07a4829f1bdc26a07 Reviewed-by: David Faure (KDE) <faure@kde.org>
* | Fix IPvFuture use in QUrlThiago Macieira2013-07-201-0/+64
| | | | | | | | | | | | | | | | | | We have no idea what it might contain, but test it anyway to make sure it works. Turns out there were a few bugs the unit tests have now caught. Change-Id: I0a6c868365feec31c2360b3c341c8ca6944f4352 Reviewed-by: David Faure (KDE) <faure@kde.org>
* | Fix QUrl parsing of IPv6 hosts with encoded colonsThiago Macieira2013-07-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Registered names and IP addresses can only contain unreserved characters (letters, digits, dots, hyphens, underscores) and the colon, which is a gen-delim. For registered names and IPv4 addresses, we can simply use the default config -- if anything that remains percent-encoded, it means it's not a valid hostname anyway. For IPv6, we just need to decode the colon. Change-Id: If8083d47f6e5375f760e7a6c59631c89e4da8378 Reviewed-by: David Faure (KDE) <faure@kde.org>
* | Make the Mach-O size checking a little more robustThiago Macieira2013-07-203-3/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not necessary to check at every point if we know the minimum file size: it must contain at least the header, one segment (__TEXT) and one section (qtmetadata). Most files have more than one segment and more than one loader command, so this check does not mean we can eliminate the checks further down. Also be more resilient against corruptions in the header data: check not only the additions, but the values themselves. For example, an offset + size addition could be smaller than the file size when the addition overflows in 32-bit. Another thing is that the cmdsize fields could be corrupt too. Change-Id: I7968a769c1cbe9150270c91823cafc4f8f833876 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Add a Mach-O decoder to the QPluginLoaderThiago Macieira2013-07-206-2/+289
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already had an ELF decoder, which helped us greatly to find the metadata and that catches most Unix systems (Solaris, QNX, HP-UXi, and all of the free Unixes). On other Unix systems, aside from Mac OS X, we simply scanned the entire file for the signature. On Windows, even without a COFF-PE decoder, we use a LoadLibrary trick to load the plugin without loading the dependent libraries. In most cases, that works. Unfortunately, on Mac OS X we didn't have a decoder and nor could we do the file scan: because Mac OS X binaries could be fat binaries, we wouldn't know which architecture's signature we had found. No more. This adds a full Mach-O decoder to QtCore. It is also capable of finding the boundaries of the architecture's binary, but that functionality is disabled since all Qt 5 plugins have plugin metadata sections. Change-Id: I2d5c04c5ecf024864b8a43f31ab6b7e6c5eae9ce Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix compilation of the tst_qnetworkreply benchmark test with QT_NO_SSL.Friedemann Kleint2013-07-191-10/+10
| | | | | | | | | | | | | | | | | | preConnectEncrypted_data() is called by preConnect_data(). Change-Id: I9a3fad294d88e4cb4d2f6132cf7a87945373bb7d Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Sérgio Martins <sergio.martins.qnx@kdab.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | API-cleanup: Add QPlatformFontDatabase::registerAliasToFontFamily().Friedemann Kleint2013-07-162-7/+3
| | | | | | | | | | | | | | | | Unexport free function qt_registerAliasToFontFamily() and Make it a static member of QPlatformFontDatabase instead. Change-Id: I1df49a8e37a24b3961f92288d67b6f1108a7d520 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-07-157-35/+56
|\| | | | | | | Change-Id: I0218a1f08b89f2d56757ab35eec06799d2a1492f
| * Fix domain in manual test qhttpnetworkconnection.Friedemann Kleint2013-07-121-2/+4
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-32390 Change-Id: Ic56640087d1f07edeca5f5fc36acac9dddc79c73 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Peter Hartmann <phartmann@blackberry.com> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
| * Remove Nokia-domains in commented-out test code.Friedemann Kleint2013-07-124-27/+21
| | | | | | | | | | | | | | Task-number: QTBUG-32390 Change-Id: Ida7d54aba9cde5c472ff6bb2696d1201ba4f2199 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
| * Use QFINDTESTDATA in tst_qfontdatabase.Friedemann Kleint2013-07-112-6/+12
| | | | | | | | | | | | Change-Id: I851dbe18cd3ba9a07ddac71d23e04f5211b2db17 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * Windows font database: Resolve aliases for extra fonts.Friedemann Kleint2013-07-111-0/+19
| | | | | | | | | | | | | | | | | | Ensure QFontDataBase::hasFamily() deals with aliases. Task-number: QTBUG-31689 Change-Id: Ia59bfcb93362ac9343c6d30dab1091a4db482dfa Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | QUrl: add NormalizePathSegments to UrlFormattingOptionsDavid Faure2013-07-131-0/+11
| | | | | | | | | | | | | | | | | | This is a bit like QDir::cleanPath(), but for URL paths. The code is shared with QDir::cleanPath(), by extracting the common parts it into a helper, qt_normalizePathSegments(). Change-Id: I7133c5e4aa2bf17fba98af13eb5371afba64197a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QVarLengthArray - check if iterators arguments are valid (in debugmode)Thorbjørn Martsum2013-07-122-0/+77
| | | | | | | | | | | | | | This add checks on iterators on insert and erase. Change-Id: I41d96e038d74668cc1df10b6d42cde4b82f8a696 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QSet - check if iterator argument is valid (in debugmode)Thorbjørn Martsum2013-07-122-0/+64
| | | | | | | | | | | | | | This adds a check on erase that the iterator is from the set. Change-Id: I9f4e127d53a5b1f5f8c70652604f1f5574c73688 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QHash - checks if iterator argument is valid (in debugmode)Thorbjørn Martsum2013-07-122-0/+86
| | | | | | | | | | | | | | This checks if the iterator argument in erase is valid in debug mode. Change-Id: I8768f4263d1464ff78986a1a30702e210e561dc1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QList - check if iterators arguments are valid (in debugmode)Thorbjørn Martsum2013-07-122-0/+72
| | | | | | | | | | | | | | This adds a check of the iterator values in erase and insert. Change-Id: I78403dcbd24fd7c6beb86d3c827a8e233963e770 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QVector - check if iterators arguments are valid (in debugmode)Thorbjørn Martsum2013-07-122-0/+77
| | | | | | | | | | | | | | This adds a check of the iterator values in erase and insert. Change-Id: I28e660153dbfc5f0054a5b25cba2c5725c678a81 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>