summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | QMap - check if iterator arguments are valid (in debugmode)Thorbjørn Martsum2013-07-122-0/+113
| | | | | | | | | | | | | | | | | | This patch adds a debug-tests in erase, insert (with hint) and insertMulti (with hint) that ensures the iterator-argument is valid (and e.g not from another map) Change-Id: I7920131bc9712543183cabf13c7603bd0e12880d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge branch 'stable' into devSergio Ahumada2013-07-1163-180/+85596
|\| | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/json/qjsonwriter.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
| * Stabilize tst_qguiapplication.Friedemann Kleint2013-07-111-68/+140
| | | | | | | | | | | | | | | | | | | | | | Introduce QScopedPointer for windows or instantiate them on the stack to prevent leaks. Tile all windows within virtual screen to ensure they don't influence each other and are not in the taskbar area. Move cursor away from windows in modalWindow-test. Change-Id: I40343e9f72263e22bdf2560448d7efcc915d17cb Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
| * Test password mask delay and characters on Mac.Mitch Curtis2013-07-111-0/+12
| | | | | | | | | | | | | | Task-number: QTBUG-31498 Change-Id: Iab4a56b94364e3db78070aca40c629f9398ffbb7 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| * Bugfix QDesktopServices on WindowsThiago Macieira2013-07-115-0/+143
| | | | | | | | | | | | | | | | | | It was doing tricks with URLs that it shouldn't be doing... including running QDir::toNativeSeparators on a URL. Task-number: QTBUG-32311 Change-Id: I5b6f640919956998c00dcf507f931045f21a9e53 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * test: Fix tst_qwindow::positioning() on Ubuntu 12.04Sergio Ahumada2013-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | It seems like the left-side menu bar on Ubuntu 12.04 causes some problems when it is not automatically hidden, which is the case in the CI machines. Task-number: QTBUG-31995 Change-Id: I01ff3fe4c09d720b2dd53037c42e59679d8570dd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * Fix dead lock in the Qt event handlingOlivier Goffart2013-07-101-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The deadlock is caused because the QEvent is destroyed while holding the event list mutex. And the QEvent may have a custom destructor that will re-enter the event handlng code. The QScopedPointer that should destroy the event must be created after the MutexUnlocker. Regression introduced by commit f9035587b98ac5dc9491e642b8ec84470ec03f0e Task-number: QTBUG-31606 Change-Id: I6b2cbc2656eacdec61b641886953f00bf5b3ff36 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * test: Replace QSKIP with QEXPECT_FAIL in tst_qwindowSergio Ahumada2013-07-101-7/+3
| | | | | | | | | | | | | | | | | | | | It is better to mark a test as XFAIL so we get an error whenever it gets fixed. Task-number: QTBUG-23059 Change-Id: I0f2f491645c261bf0e735dde6a16d8e90e0b17a0 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * test: Add 5.1.0 bic data for linux-gcc-ia32Sergio Ahumada2013-07-0811-0/+85147
| | | | | | | | | | Change-Id: I342fd2332fb8880b872e4b5862a18db4a673260c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Make the CMake tests run sequentially, not in parallel.Stephen Kelly2013-07-081-0/+2
| | | | | | | | | | | | | | | | Otherwise the output is too intertwined. Change-Id: I6729727b3afcdcbec58e3fa560587dd1fa08f38e Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| * bail out early in QWinOverlappedIoNotifier::waitForNotifiedJoerg Bornemann2013-07-051-1/+0
| | | | | | | | | | | | | | | | Calling waitForNotified on an uninitialized notifier will print a warning and return false. The autotest has been adjusted. Change-Id: I85e18d6d0a8a5462e1a5d451613add941d89b5fb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * Stabilize tst_QApplication::quitOnLastWindowClosed().Friedemann Kleint2013-07-041-9/+12
| | | | | | | | | | | | | | | | | | | | Instantiate widgets on the stack to ensure they are destroyed when the QApplication instance goes out of scope. Introduce waitForWindowExposed() to make sure events are in sync. Task-number: QTBUG-32125 Change-Id: Ia54e2fa9a7c2e279353c4514a6735e326edf35ae Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * benchmarks: Re-enable QFileInfo build by removing canonicalFileNamePerformance.Robin Burchell2013-07-042-15/+2
| | | | | | | | | | | | | | | | | | | | QFSFileEnginePrivate::canonicalized has been gone for a very, very long time now (since d3b152ba1e3cd38dd675c801474105d518bacb44 in Qt 4). This also fixes a build failure in the code on Windows. Change-Id: I81f5e0c1d644b1b4d75644626eb394a663535387 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * QtCore: fix the number precision in QJsonDocument.toJson() againLiang Qi2013-07-041-0/+62
| | | | | | | | | | | | | | | | | | | | | | Need to store 17 decimal digits for binary64, IEEE 754 double formats. Autotest is included. Test cases from TC39 test suite for ECMAScript. Task-number: QTBUG-31926 Change-Id: I546398f21ea7ff5e40e89fc9de8703f628f55df9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
| * Use case insensitive matching for hashes QFileSystemWatcher/Win.Friedemann Kleint2013-07-041-5/+16
| | | | | | | | | | | | | | | | | | | | | | Do not lower case file names to generate hash keys since QString::toLower() converts some characters with context which the Windows file system will not. Task-number: QTBUG-31341 Change-Id: I285bfedef3c1ca9d59083229e61974dd378c72ae Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
| * Merge "Merge branch 'release' into stable" into refs/staging/stableSergio Ahumada2013-07-041-1/+1
| |\
| | * Merge branch 'release' into stableSergio Ahumada2013-07-031-1/+1
| | |\ | | | | | | | | | | | | Change-Id: I982a86e1b99e3ae629e8c5667bc7bdf9f4018b2e
| | | * headersclean: process private modules correctlyOswald Buddenhagen2013-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I51c8ee0db31b35e1d991411fe0b03da6665e9a84 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * | | make split_value_list() even less sane againOswald Buddenhagen2013-07-032-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | contrary to what one may expect, it's actually *not* supposed to remove the meta-characters it interprets. luckily, this function is not used much any more ... Task-number: QTBUG-31877 Change-Id: I2b60f9b173140da78db2b07b596cc2e5f6e6d555 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * | | remove nonsense DEFINESOswald Buddenhagen2013-07-0329-59/+0
| |/ / | | | | | | | | | | | | Change-Id: Ie079c52eb800878983501b9fe2b2f6c27df0cdb1 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * | Add a unit test for testing Qt in its install location.Stephen Kelly2013-07-022-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Qt CI system runs the unit tests after installation, but with the qmake in the build directory. This means that the installed content is not unit tested. Add an additional cmake unit test to test the files in the install location. The new test is marked insignificant for now until the true effect on the CI system is known. Task-number: QTBUG-27315 Change-Id: If9f12e88cfc741946cfabc25dbf789a11a2af4b8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * | remove wait calls in tst_QProcess::simpleStartJoerg Bornemann2013-07-021-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of calling different wait functions on different platforms, we use QTRY_COMPARE to check the process state. Change-Id: I6489cabce9e63f9c8b1036f3cccbf35b52df72e7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
| * | QUrl test: ensure that hostnames with bad non-IDN domains are caught tooThiago Macieira2013-07-021-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Leading and double dots are bad, but trailing dots are fine. The ASCII part of a hostname is supposed to be LDH (letters, digits, hyphen) only, but we accept '_' (underscore) as an exception too. Change-Id: I79957ddec4da78a0e2357fe50c8687db03e1c99e Reviewed-by: David Faure (KDE) <faure@kde.org>
| * | Make the test a bit more sane.Gunnar Sletta2013-07-011-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Unactivating a window is not really supported, nor has it ever really been, so activate another window instead. This incidentally also makes the test work cross platform. Change-Id: I6e593e9b7972dd5c5038c8d18a42be90bf19248c Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * | tst_QIcon: Mark availableSizes() and task223279_inconsistentAddFile() as XFAILSergio Ahumada2013-06-271-0/+6
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-31993 Change-Id: I10e39951fb38b950633805a44ea4c0edaf55635e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>