summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-293-12/+0
| | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* QVarLengthArray: add squeeze functionPeter Kümmel2013-01-281-0/+24
| | | | | | | Add function to move back data to the stack. Change-Id: Ic78a368459bce68629e29602e4eeae2e1afe398b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix MinGW-Warnings in tst_qwinoverlappedionotifier.Friedemann Kleint2013-01-281-5/+8
| | | | | | | Change-Id: I66c4e274c8b686d8a69476ad10751008f256e5a2 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix warning about redefinition of _WIN32_WINNT.Friedemann Kleint2013-01-281-1/+0
| | | | | | | This is redefined by qt_windows.h Change-Id: I6a8cb06c93c4055b166f1a214cba981d61680b9c Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* tst_qfilesystemmodel: Avoid commonly used folders.Friedemann Kleint2013-01-281-23/+32
| | | | | | | | | | | | Use the test's temporary directory instead of QDir::temp() and the documents folder instead of QDir::home(). Split out unrelated test from data-driven sort test. Task-number: QTBUG-29014 Change-Id: I229f0b1c0f1e43b56d19ebd43fd7cc64a85b1222 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix warning about redefinition of M_PI in tst_qwmatrix.Friedemann Kleint2013-01-281-1/+1
| | | | | | Change-Id: Ib5e5fe0f087448b07adfa02984524cbb10c78395 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Fix warning about unhandled enumeration values in tst_sqldriver.Friedemann Kleint2013-01-281-0/+2
| | | | | | Change-Id: I4e750982aab861abbbbabe980a663f8b118cdf54 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Don't emit activated on clicking disabled itemview item.Mitch Curtis2013-01-261-0/+24
| | | | | | | | | | | A itemview item with its flags set to Qt::NoItemFlags is considered disabled, and therefore should not cause the activated signal to be emitted. Task-number: QTBUG-20490 Change-Id: If824505c46f4fcadb9265ad6d1e9337f0cee32cf Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Add toJson() formatting argument to QJsonDocument interfaceJean-Paul Delimat2013-01-261-40/+96
| | | | | | | | | | | | | | | | The writer delegate used by QJsonDocument to produce a Json QByteArray supports generating a human readable Json (with spaces and carriage returns that reflect the Json structure) and a less human readable (no spaces nor carriage returns) but more compact Json. The method toJson() was extended with a format argument to support the compact Json generation. Task-number: QTBUG-28815 Change-Id: I8d13849ab9ab6ed7c645011260251dc14a8629d2 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Debao Zhang <hello@debao.me>
* Add static dotProduct methods to the QPoint(F) classesLaszlo Papp2013-01-262-0/+51
| | | | | Change-Id: I66ac9433b74341a83569a60038ea2f7a025e81b1 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Introducing QWidget::createWindowContainer()Gunnar Sletta2013-01-254-0/+234
| | | | | | | | | | A QWidget that can embed a QWindow. This can be used to embed a QWindow/QOpenGLContext based window or a full QQuickView. Change-Id: I8415b5ae38562fc00b46150fa70b56fd9b19a80c Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Improve QAccessibleApplicationFrederik Gladhorn2013-01-251-2/+30
| | | | | | | | | | | | Add more testing. This uncovers that currently the QDesktopScreenWidget shows up as child of the app. Fixed by not creating QAccessibleInterfaces for QDesktopScreenWidget. Also don't crash in indexOfChild when called with 0. Change-Id: I9fb1e47e8f1f33189e6125f56f274a7b94ecd0dd Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Add an umbrella cmake config file for Qt 5.Stephen Kelly2013-01-244-1/+58
| | | | | | | Change-Id: I96b6e96539a84a5919992afbaee757fa080b7ae0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-01-246-5/+139
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-246-5/+139
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsdialoghelpers.cpp Change-Id: I4ca87d44129fa5c1d8541cd58b8d62bc69080688
| | * Make sure QGraphicsItem notifies changes to focusScopeItem.Andreas Aardal Hanssen2013-01-241-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A glitch in QGraphicsItem's logic made it update the focusScopeItem pointer, but fail to notify the change to QDeclarativeItem through the d_ptr->focusScopeItemChange() virtual function, hindering QDeclarativeItem from emitting focusChanged() correctly for focus scopes that do not have focus. Two lines were moved, and a comment updated to reflect the reason why the "return" is needed at this point. It's clear that the calls to focusScopeItemChange() are unrelated to the return. Task-number: QTBUG-29260 Change-Id: I12ba9161b16d34c3689401a92c86d2047989f7bd Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
| | * QSslConfiguration: toggle on demand loading of root certs properlyPeter Hartmann2013-01-233-4/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make sure we keep track of when we can load root certs and when we cannot (we cannot when the developer set the certs explicitly). This is implemented the same way for QSslSocket already, and needs to be duplicated because we have 2 methods for setting CA certificates: one in QSslSocket and one in QSslConfiguration. In addition, adapt the auto test which checks whether setting a default QSslConfiguration works: There is no way to set on demand loading through the API, so it should be enabled by default. Task-number: QTBUG-29103 Change-Id: I5146128aaa385dfcc0ad1e0ef81a92d9350ec5f2 Reviewed-by: Richard J. Moore <rich@kde.org>
| | * Add autotests for Indonisian and Catalan localesMehdi Fekari2013-01-231-0/+12
| | | | | | | | | | | | | | | Change-Id: Idbf14ee6f0cd83acfdc407408794aac7ad91c054 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Disable only accessibility bridge without dbus on linuxFrederik Gladhorn2013-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keeping accessibility and only disabling the bridge will enable more builds to work. Warning about disabling accessibility disabled is needed because in QStyle it is used to discover semantics about widgets (if a toolbutton is in a toolbar). Change-Id: Iae4e6ab63479743bdd70cba4b1954ec7cf3f88e9 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | | Manual file dialog test: Add showModal().Friedemann Kleint2013-01-242-18/+58
|/ / | | | | | | | | | | | | | | Modal dialogs can now tested by just showing or running exec(). Remove connection of accept() from applySettings(). Change-Id: I5e3c0e6405ce5682f39d10a9c06b9d61be10ed3f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Extend lance-tests for text/statictext to check flipped/negative scaleTor Arne Vestbø2013-01-242-16/+52
| | | | | | | | | | | | Change-Id: I0504a6676f1acaa13ea1826e945d1faa51dd4e48 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: aavit <eirik.aavitsland@digia.com>
* | Added initializer list constructors for Qt associative containers.Roman Pasechnik2013-01-243-0/+82
| | | | | | | | | | | | | | | | | | Affected: QSet, QMap, QMultiMap, QHash, QMultiHash. Task-number: QTBUG-25679 Change-Id: I01f3ecfbca805f4c053a75232188bd2a77fdb1f2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-01-231126-1157/+5210
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-221126-1157/+5210
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| | * Accessibility Linux: Make dbus registration asyncFrederik Gladhorn2013-01-221-22/+8
| | | | | | | | | | | | | | | | | | Change-Id: I74043be04f4ee17089353304fdc007a7f22cdea0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
| | * Make hierarchy of actions in menubars more consistent.Jan Arve Saether2013-01-211-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is an assumption that the interface returned from iface->parent() would have iface as one of its children (thus, parent->indexOfChild(iface) should always return an integer != -1, indicating that it is a child. This is a good assumption, otherwise an hierarchy would be presented differently depending on how it is traversed. However, a QMenu created like this: QMenu *menu = new QMenu("weird parent", mainWindow); mainWindow->menuBar()->addMenu(menu); will have a different ancestor sequence than a menu created like this: mainWindow->menuBar()->addMenu("ok parent"); This is because it will walk up the QObject hierarchy. This patch tries to deal with that by looking at which widgets the action of the menu is associated with before determining which should be the accessible parent. Change-Id: I00dad8a94463f772d7b1f5d66fdb36b2e8d3aea2 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| | * Accessibility: Test for do not crash if the column count is 0Jan Arve Saether2013-01-211-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | This tests the fix submitted in bb5e11b56dd2f5fe2957f151a38 Task-number: QTBUG-28611 Change-Id: I7b15aa6b46be3607bd7079294d8e7d18bd507d1c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| | * QNetworkReply auto test: also test uploading data via HTTPSPeter Hartmann2013-01-181-0/+216
| | | | | | | | | | | | | | | | | | | | | ... and not only HTTP. Change-Id: I1190e07fdacd9bdfb218c8932e0e5e2c0c6fc6ab Reviewed-by: Richard J. Moore <rich@kde.org>
| | * Fix a crash when minimizing a QQuickWindow.Friedemann Kleint2013-01-182-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Send empty expose event and flush queue when minimizing. Task-number: QTBUG-28439 Task-number: QTBUG-26424 Change-Id: I2e921a86660f946ced7af735cdf197fb666e2934 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| | * Update copyright year in Digia's license headersSergio Ahumada2013-01-181124-1126/+1126
| | | | | | | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * QDateTime auto test: stabilize currentDateTimeUtc2 testPeter Hartmann2013-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | ... by trying more often to get dates close enough to each other. Change-Id: I370f7cd61bbb84fbb77ea96ff9fd82c1a6f1f76a Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
| | * tst_bic: Add linux-gcc-ia32 bic data for QtXmlSergio Ahumada2013-01-162-0/+3844
| | | | | | | | | | | | | | | Change-Id: I43670f41f41f465e5684362de64c355b68a1dbf7 Reviewed-by: Janne Anttila <janne.anttila@digia.com>
* | | QImage plugins should report supported mime typesAllan Sandfeld Jensen2013-01-232-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduces the methods QImageReader::supportedMimeTypes and QImageWriter::supportedMimeTypes which corresponds to the similar supportedImageFormats methods, except they return lists of MIME types. Task-number: QTBUG-28177 Change-Id: Ibb0e264a12eaf972a8bfd6bd891dcd9f89efd085 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Fix qstring-literals test for MinGW.Friedemann Kleint2013-01-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test is compiled since QT_UNICODE_LITERAL is always defined on Windows and ref.isStatic()) then fails since C++ 11 is not enabled. Task-number: QTBUG-29014 Change-Id: I357574a493c5191f1463e7ee5851d7db0e569315 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Implement focus handling of child windows for cocoa.Gunnar Sletta2013-01-231-3/+5
| | | | | | | | | | | | | | | Change-Id: I1e05ef39aa67f8febdd27215d8ad05d26ece7caa Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | | Check existence of QProcess feature before using it on Qt autotests.Pasi Petäjäjärvi2013-01-2311-8/+49
| | | | | | | | | | | | | | | | | | | | | VxWorks does not have QProcess support. Change-Id: I20ed479125097d468a1aa50afb18c3749f0fbb98 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | | Make the QtDBus object tree keep a count of active childrenThiago Macieira2013-01-231-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new member variable activeChildren shall contain the number of direct children that are active. This number differs from children.count() because the vector may contain empty entries that haven't been garbage-collected yet (obj == NULL and activeChildren == 0). When this count drops to zero, we know we can simply erase the vector of children. Change-Id: Ia20604d3fac852ea4a6e8862d934fbb936fa5e18 Reviewed-by: David Faure (KDE) <faure@kde.org>
* | | Add a new Q_GLOBAL_STATIC implementationThiago Macieira2013-01-223-0/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike the previous implementation, this implementation is locked: only one initialisation is ever run at the same time. It is exception-safe, meaning that a throwing constructor will restart the process. Also, start using the thread-safe behaviour that GCC has offered for a long time and C++11 requires. Change-Id: I20db44f57d258923df64c0051358fd0d9a5ccd51 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | | Fix testlib-selftest for MinGW.Friedemann Kleint2013-01-221-2/+5
|/ / | | | | | | | | | | | | | | Fix float format and exclude crashing sub-binary. Task-number: QTBUG-29014 Change-Id: I404f971edeb128263122a194f23e2806d6fd3bd0 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | Don't build lance as application bundle on Mac OSTor Arne Vestbø2013-01-222-0/+2
| | | | | | | | | | Change-Id: I23732b4ec0dc45d9d3a2cc5f21dad2cb33af5830 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | QTestLib: improve output when comparing lists fails.David Faure2013-01-225-22/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only QStringList was handled before, now any QList is handled. A specialization for QStringList is still needed though, due to the way template matching works. Example with QList<int>. Before: FAIL! : tst_QTextCodec::threadSafety() Compared values are not the same Loc: [../tst_qtextcodec.cpp(2057)] After: FAIL! : tst_QTextCodec::threadSafety() Compared lists differ at index 0. Actual (res2.toList()): '0' Expected (mibList): '3' Loc: [../tst_qtextcodec.cpp(2057)] Change-Id: If0fdec3236ddb78a679ee549aba569ef5571c395 Reviewed-by: Jason McDonald <macadder1@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Fix cleanup of temporary files in test of QFileInfo.Friedemann Kleint2013-01-221-25/+24
| | | | | | | | | | Change-Id: I0d21fc05a7d816acab5f7284f905bf971a5c04da Reviewed-by: David Faure (KDE) <faure@kde.org>
* | MinGW: Disable tests in tst_qstring that use unsupported formats.Friedemann Kleint2013-01-221-0/+6
| | | | | | | | | | | | | | Task-number: QTBUG-29014 Change-Id: I7dc879c456da8dabe02a2bce07e8628d176ca9d1 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | Reduce invocations of QFINDTESTDATA in tst_qfileinfo.Friedemann Kleint2013-01-211-31/+47
| | | | | | | | | | | | | | | | Introduce variables for the paths used in the test and check in initTestCase(). Change-Id: Ie801266e30cd860e5bdf079c1182fe385f9598c7 Reviewed-by: David Faure (KDE) <faure@kde.org>
* | Fix temporary file leak in tst_qfileinfo.Friedemann Kleint2013-01-211-4/+3
| | | | | | | | | | Change-Id: I0d679638d5a9564f612ae5e70717f164b74aefb0 Reviewed-by: David Faure (KDE) <faure@kde.org>
* | Add support for defining properties from member variables.Gerhard Gappmeier2013-01-191-6/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This associates properties with member variables and avoids writing getter and setter methods manually. The metaCall() method directly accesses the member variable, so additional method calls can be avoided. The metaCall() setter code also supports NOTIFY signals, which means the according signal is emitted when the property gets written. Task-number: QTBUG-16852 Change-Id: I88a1f237ea53a1e9cf65fc9ef2e207718eb8b6c3 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Fix crashes in tst_qthreadpool on Windows.Friedemann Kleint2013-01-181-6/+28
| | | | | | | | | | | | | | | | | | | | | | Qt 4.8 shows frequent crashes in runMultiple apparently caused by the QMutex construction in the free functions by different threads. Use a common QMutex class member instead. Change-Id: I851d4e2d3637a7b4f404ed843f5360c10caa21f5 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Output std error from qmake/make when the test fails.David Faure2013-01-171-1/+1
| | | | | | | | | | | | | | | | This is intended to make it easier to understand what's happening when this test is flaky during CI. Change-Id: I13163c244cb99414d90b5f71c365a4ff2216bc83 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QSaveFile autotest: restore permissions using RAIIDavid Faure2013-01-171-8/+25
| | | | | | | | | | | | | | So that the QTemporaryDir can happen even on error. Change-Id: I728d49eac8bd65e1919fd314a95387949e134de0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QSaveFile: test the case of an existing, but readonly, target file.David Faure2013-01-171-2/+23
| | | | | | | | | | Change-Id: I296d9c2598b8c72e2fd3e6ec80a615364b7eddeb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>