summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2013-06-271-2/+11
|\ | | | | | | refs/staging/stable
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-251-2/+11
| |\ | | | | | | | | | Change-Id: I4c0ae2ac1c10d4d50c03625c802d981b7850ed6f
| | * Fixed testbuild with QT_NO_CURSORBjoern Breitmeyer2013-06-251-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed the QCursor entry from the list of types if QT_NO_CURSOR is set. Change-Id: I6b8e925acedec75ed6e46b2e3fe34d0011667c91 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | | tst_qfilefialog: Fix leaking temporary directories.Friedemann Kleint2013-06-261-28/+16
|/ / | | | | | | | | | | | | | | The test currently leaks 2 directories QFileDialogTestDir, QFileDialogTestDir4SelectFiles in /tmp. Change-Id: I396f0b069572a680d81206dd0f1ddf606cbbe9e4 Reviewed-by: David Faure (KDE) <faure@kde.org>
* | Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2013-06-252-5/+22
|\ \ | | | | | | | | | refs/staging/stable
| * | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-202-5/+22
| |\| | | | | | | | | | Change-Id: I94bb158562ae6b80a87b40139d7302ea7b9b9aa8
| | * fix QFileSystemEngine::createDirectory race conditionv5.1.0-rc1Shawn Rutledge2013-06-141-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During a call to QDir::mkpath(), the same path could be created by another process, in which case the OS mkdir will fail with EEXIST. But the docs for mkpath() state that it's not an error if it already exists, whereas for mkdir() it is an error. So QFileSystemEngine::createDirectory should accept the EEXIST error silently if it occurs while creating the sequence of parent directories and the final leaf directory, but should fail if EEXIST happens when it was called from QDir::mkdir(), which is when the createParents parameter is false. We assume the operating system mkdir() and CreateDirectory() are atomic, so there should be no race condition in QDir::mkdir(). It's not necessary for mkpath() to call stat() at each level, only to check whether an existing entry is a directory or a file. Also added to the autotest to verify that if the path is an existing file, creating a dir with the same name will fail in either mkdir or mkpath. Task-number: QTBUG-30046 Change-Id: I926352f10654fdf3b322c8685bb85ad8b8844874 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| | * Let QTemporaryDir::stressTest() run in temporary directory.Friedemann Kleint2013-06-121-4/+5
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-31618 Change-Id: I60aaa4f57710816cd0e22ea9b097c7e85466fd0c Reviewed-by: David Faure (KDE) <faure@kde.org>
* | | Fixed qrawfont auto testBernd Weimer2013-06-251-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Number literals are always interpreted as double. This lead to errors on platforms that define qreal as float. Change-Id: I838f690c33bb97e39a2cca2cfd3bdfb9482bc2b2 Reviewed-by: Peter Hartmann <phartmann@blackberry.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | | Test for activation and palette on QWindowContainer's parentGunnar Sletta2013-06-251-0/+10
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-31775 Change-Id: Ib8ec5508f7bf53f9e3ce502367a3dca1a760289f Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | | Further followup to Q_OS_MACX changes.Jake Petroules2013-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Flip !Q_OS_IOS conditions to Q_OS_MACX where it seems appropriate, remove a redundant condition in qtextcodec_p.h. Change-Id: I21c8c0c490f1eb4a9337a7f2f3e907c125489438 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | | test: Skip tst_qmake::include_dir() when -no-widgets is usedSergio Ahumada2013-06-241-0/+4
|/ / | | | | | | | | | | | | | | Only run this test case when the widgets module is present, skip it otherwise. Change-Id: I84f48b670b967af3bf0701ceba5a192f33989034 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | If a QWidget is ignored for auto-quit, ignore its corresponding QWindow.Stephen Kelly2013-06-191-0/+25
| | | | | | | | | | | | | | | | Unit test by Friedemann Kleint <Friedemann.Kleint@digia.com> Task-number: QTBUG-31569 Change-Id: I526d33d4f88a41f6ac349098476bc45af6c841b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Ensure we don't repeat QTBUG-30931 in Qt5Konstantin Ritt2013-06-181-0/+14
| | | | | | | | | | | | | | | | | | | | The issue is already fixed in 5.0 but let's be nice and ensure the issue won't be reintroduced later. Task-number: QTBUG-30931 Change-Id: Ia6944acaf6e7217f8d0f1fa75d0e9977db11d892 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | BlackBerry: fix tst_qlistviewRafael Roquetto2013-06-181-0/+8
| | | | | | | | | | | | | | | | Because fonts are bigger on BlackBerry than those assumed when the test was written, explicitly adjust the font size on this platform. Change-Id: I6a23c28c2d32edf744dd5de09ea0a97fd5f9b6d6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Fix tst_qlistview for full screen platformsRafael Roquetto2013-06-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | Some test cases rely on the fact that show() is not fullscreen, which may not be true for some platforms. Explicitly make use of showNormal() to avoid full-screen show on these platforms. Change-Id: Ie62fe21bf0f466c561a27cffda99d0201b4a45af Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
* | Fix tst_QWindow for fullscreen platform pluginsRafael Roquetto2013-06-181-2/+9
| | | | | | | | | | | | | | | | | | Some tests assume that QWindow::show() behaves like QWindow::showNormal(), which is not true for platforms in which the show is fullscreen, forcing QWindow::showNormal() to be explicitly called. Change-Id: Ib5f23a4d01bc6a3a2973f57488996c8c198c45f3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2013-06-151-1/+1
|\ \ | | | | | | | | | refs/staging/stable
| * | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-121-1/+1
| |\| | | | | | | | | | Change-Id: If29ca1b27da4592d40a7678837c359f75dac1209
| | * use qtconcurrent instead of qtgui in test codeOswald Buddenhagen2013-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | this works with -no-gui, and doesn't interfere with our upcoming ANGLE hackery. Change-Id: I2985cc0acd1fbf185b8967ffe58606b1b7dd9d1e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | | Add basic conversion functions from QVariant(QJsonValue).Jędrzej Nowacki2013-06-141-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | There is a mismatch how QML and C++ converts QJsonValue. This patch unifies conversions by adding QJsonValue support in QVariant::convert(). Change-Id: I8a1db3d77c517945ef48064b4b66ba03aa4f2fd0 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | | Add object names to QGLWidget-reparenting test.Friedemann Kleint2013-06-141-0/+4
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-31762 Change-Id: I213b4f17aa04cc99df7183df547a52c2c2a68626 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | | QDockWidget: Keep position when undocking.Friedemann Kleint2013-06-121-0/+8
|/ / | | | | | | | | | | | | | | Initialize undockedGeometry to roughly the current position. Task-number: QTBUG-31044 Change-Id: I03cbe280d1215bb58ab721b60e29b45359cde76d Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2013-06-102-67/+2
|\ \ | | | | | | | | | refs/staging/stable
| * | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-102-67/+2
| |\| | | | | | | | | | Change-Id: I89c251999ae2a82522b40471fd13f2e06b00ece8
| | * QEventLoop: Remove the test that checked throwing from an event handlerThiago Macieira2013-06-081-67/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt 5, we declared that throwing from event handlers is undefined behavior. So stop testing this. We will try our best to capture and pass along std::bad_alloc, but even that might not work, depending on compiler settings. In particular, after the upgrade to MinGW/GCC 4.8 with DW2, this test stopped working. Task-number: QTBUG-31615 Change-Id: Ibf5fb2ce0c48b983549096bf7aac434b6ed3ac2e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * test: Mark tst_qopengl as insignificant on Win7 + AngleSergio Ahumada2013-06-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This only marks tst_qopengl as insignificant on Windows 7 32bit with the Angle configuration. Task-number: QTBUG-31611 Change-Id: I1876b6fdc32fef93edf34c2bd61d03cc9ba11135 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
* | | BlackBerry: fix tst_QLocale::emptyCtor()Rafael Roquetto2013-06-102-0/+70
|/ / | | | | | | | | | | | | | | | | | | | | | | BlackBerry OS does not allow for explicitly controlling the locale through the "LANG" environment variable. Locale is controlled by the underlying PPS Service instead. Change-Id: I22154e39f81a9467ad7fdb90a042396390398b1b Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Mehdi Fekari <mfekari@blackberry.com>
* | tst_QUrl: check that prohibited characters in hostnames are not validThiago Macieira2013-06-081-0/+15
| | | | | | | | | | | | | | | | qt_nameprep is tested by tst_qurlinternal. We just need to be sure that QUrl handles them correctly. Change-Id: Ic563004870d2cf2fa7a31ce49fff7280d5ffb5f3 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | tst_qfilesystemmodel: Fix warnings about comparing int/bool.Friedemann Kleint2013-06-081-5/+12
| | | | | | | | | | | | | | | | | | | | warning C4804: '<=' : unsafe use of type 'bool' in operation Remove outer loop and replace ugly ROW_NAME macro by inline function. Change-Id: Id7e4ef047adaf8017b8c21621d19c151993cc6dd Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | tst_qmessageauthenticationcode: Fix warning about character conversion.Friedemann Kleint2013-06-081-1/+1
| | | | | | | | | | | | | | warning C4309: 'argument' : truncation of constant value. Change-Id: I54e9b515d065c1a89bf790fb214c335e852ce5ac Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | tst_qguivariant: Fix warnings about double / float conversion.Friedemann Kleint2013-06-081-2/+2
| | | | | | | | | | | | | | warning C4305: 'argument' : truncation from 'double ' to 'float' Change-Id: If9bf2f79592d305e767d2a8c38e577c5dff51129 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | tst_qdom: Fix warning about character conversion,Friedemann Kleint2013-06-081-2/+2
| | | | | | | | | | | | | | warning C4309: 'argument' : truncation of constant value. Change-Id: I04262dcb71b916abeab27e7b8bc2ca6c875794d2 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | tst_qglthreads: Fix warnings about unused variables.Friedemann Kleint2013-06-081-1/+2
| | | | | | | | | | Change-Id: I6bc95e8335474753d6506db5e8119710797f4f1b Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | tst_qjson: Fix MSVC C4293 warning about shift operation.Friedemann Kleint2013-06-081-24/+24
| | | | | | | | | | | | | | | | warning C4293: '<<' : shift count negative or too big, undefined behavior. Change-Id: I858dd08f16ea0e00f2384491fc735b7367c6925d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | QUrl stringprep: fix handling of U+0080: it's prohibitedThiago Macieira2013-06-081-0/+5
| | | | | | | | | | | | | | | | Edge case: a > that should have been >=. Without it, we never ran the rest of the IDN nameprepping. Change-Id: I2276d660de3a70d0c561bb18816820d9a0f47e77 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | QUrl stringprep: fix handling of prohibited charactersThiago Macieira2013-06-081-27/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC 3454 says about prohibited characters (section 2, "Preparation Overview"): 3) Prohibit -- Check for any characters that are not allowed in the output. If any are found, return an error. This is described in section 5. In other words, we mustn't simply strip the output of prohibited characters. We must generate an error if they are present. We do that by clearing the data. We already had tests for prohibited output, but they were indistinguishable from being stripped. So instead add some extra characters so that we can tell whether the label was cleared. Change-Id: I2d95217c27be5e2d54deed0036cb009e3b7f4886 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | Unix: fix tst_QFile when run as rootRafael Roquetto2013-06-071-0/+7
| | | | | | | | | | | | | | | | Because tests are usually run as root on some setups, it does not make sense to test for the right permissions of a readonly file. Change-Id: I484f88722d3a9ce7123edc0fb57acae528fa194e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Use QFINDTESTDATA on tst_QStyle instead of SRCDIRRafael Roquetto2013-06-072-5/+5
| | | | | | | | | | | | | | | | Update the test code to match the current Qt idiom for finding test data (and fix it on QNX). Change-Id: I63e7c97b717722e4e6859a12f329d56b26584ce6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Cocoa Accessibility: fix ignoring of objectsFrederik Gladhorn2013-06-075-1/+419
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Mac it's expected that some elements are filtered out of the a11y hierarchy. We do this with the shouldBeIgnored function. The problem is that we would ignore some objects and then return them in the child attribute function. This is inconsistent and leads to voice over not working. For example having a plain QWidget with other widgets as children would cut off all of these widgets, since the plain QWidget would be ignored. Change-Id: I5f6c26b272e5ca57d59c1ed1ef47e9a2b1181295 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | tst_qnetworkproxyfactory: Fix warnings about unused variables.Friedemann Kleint2013-06-071-0/+5
| | | | | | | | | | Change-Id: I6fa08353ebea5cdd7fc7a0c982bf1b9d34bbc077 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | Update the DNS and name-resolver tests to the official zoneThiago Macieira2013-06-073-7/+7
| | | | | | | | | | Change-Id: I02feb8029461383f38bcbdca138789b119a58b5a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix tst_qcombobox::itemListPosition.Friedemann Kleint2013-06-051-4/+6
| | | | | | | | | | | | | | | | Add font combo to top level via layout and position top level instead of the (child) font combo. Change-Id: I0f754c37c009d1ed83615b800d6f2467e858c047 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | QDnsLookup: test multiple TXT answers tooThiago Macieira2013-06-041-48/+54
| | | | | | | | | | | | | | | | | | | | | | | | The TXT record is particular because each RR can contain multiple text strings. So we need to join each RR's texts too. To make it easy, I've made everything be QStrings. Change-Id: Ia0506544b913585e7be860c81077cff8e0dab547 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QDnsLookup: test MX and SRV records that can change orderThiago Macieira2013-06-041-4/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DNS protocol changes the order of the RRs in each reply it sends, in an effort to balance the load in servers. For most tests, to ensure that we get always the same result, we simply sort it back. For MX and SRV, we can't sort because we also need to test that QDnsLookup sorted correctly according to priority. So instead allow that test to have multiple alternatives. Change-Id: I5c119f907b31789de5c9cf2471cc82ecd140d06f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix typoFrederik Gladhorn2013-06-031-1/+1
|/ | | | | Change-Id: I0983f12759fdb806e4fc89f4abefb9088502208d Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Made sure items with preferred width of 0 could also stretchJan Arve Saether2013-05-271-0/+12
| | | | | | | | | | | | | | | | | | If no stretch factors were specified, we used the preferred size as a stretch factor. Obviously, that didn't work if the preferred size was actually 0. This patch works around this by actually setting the stretch factor to 1.0 if this is the case. This should work fine in most cases, except for the case where there are also other items with a preferred size close to 0. In this case, the item with preferred size 0 will just grow faster than an item with e.g. preferred size 0.1. Task-number: QTBUG-31217 Change-Id: I966455da0bdd00308591c7f7cfbc4e134d423e57 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>