summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| | * Check existence of QProcess feature before using it on Qt autotests.Pasi Petäjäjärvi2013-01-2811-8/+49
| | | | | | | | | | | | | | | | | | | | | | | | VxWorks does not have QProcess support. Change-Id: I917b769f967e9d71ec5025aae788f3e237b07aeb Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> (cherry picked from commit 416e73a0fcaf31f7c32ba7dcd214b62e6060123c)
* | | Skip tst_QSslSocket::setReadBufferSize_task_250027()Tor Arne Vestbø2013-02-171-0/+2
| | | | | | | | | | | | | | | | | | | | | It's flakey and is blocking integration. Tracked in QTBUG-29730. Change-Id: Ia5b8f952314bf2e1aa6dbb5c5c0a97e32e68d0f6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | | Remove duplicated code for handling OpenGL extensions in QtOpenGLTor Arne Vestbø2013-02-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now re-use QOpenGLExtensions/Functions from QtGui in the same way as QtGui uses these classes. There is still some duplicated logic in qglfunctions.cpp, but this code now at least uses the shared QOpenGLExtensionMatcher class. Change-Id: Ie04008c43d430ae805e6ec1c45e7e363deeb3b8f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | | SSL benchmarks: add benchmark for uploading dataPeter Hartmann2013-02-161-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All Web service APIs like Facebook, Twitter etc. use SSL for uploading pictures etc., so it is good to have a benchmark for that. Task-number: QTBUG-28764 Change-Id: I590f76ac8b6575509f1635c18c35f9fe652fa8f8 Reviewed-by: Richard J. Moore <rich@kde.org>
* | | Filedialog test: Do not set directory if empty.Friedemann Kleint2013-02-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make it possible to test the saving/restoring of directories which is done by default. Task-number: QTBUG-28855 Change-Id: Id16010b6aea9cd78b9bebdbe1b148eb7f5141f8b Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | | Make it possible to use QPointer<const T>Stephen Kelly2013-02-131-0/+7
|/ / | | | | | | | | | | | | | | | | | | | | | | | | This is possible with QWeakPointer, so allow it for migrating code too. In the process, replace the QPointerBase with a member variable for simplicity. The functionality of the QPointerBase is replaced by a TypeSelector template. Change-Id: I3b4c77bdeda2b863cc33e84a3da8a25bae928c8c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | QRegularExpression: print a warning if (?J) is used in a patternGiuseppe D'Angelo2013-02-122-0/+34
| | | | | | | | | | | | | | | | | | (?J) inside a pattern string can be used to allow or disallow duplicated capturing group names in the pattern string itself. Although PCRE supports duplicated names, in Qt we don't yet. Change-Id: I21cd0c41273cd7ef42870ced3a0fad6ba7035cbc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Added QWindow::Visibility convenience API to QWindow.Samuel Rødal2013-02-121-0/+40
| | | | | | | | | | | | | | | | | | | | | | This finally makes it possible to make windows fullscreen etc from QML by doing "visibility: Window.FullScreen". I don't see any reason from not having the API at the QWindow-level instead of at the QQuickWindow-level since this way it can benefit other use cases too. Change-Id: If27344306eb563bc2ccd83296a46b1f2862e2db1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Ensure QDateTime can handle QDate's full range of julian dates.Mitch Curtis2013-02-121-2/+46
| | | | | | | | | | | | | | | | Currently, using QDate::maxJd() in tests will fail. This patch changes some ints to qint64s to prevent overflows where necessary. Change-Id: I61ebf8f233411a7544689fd5bfa9c3abee54e933 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Correctly detect HTML 5 charset attribute in QTextCodec::codecForHtml()Mitch Curtis2013-02-121-8/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTextCodec::codecForHtml currently fails to detect the charset for this HTML: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=9,chrome=1"> <title>Test</title> </head> This patch makes the detection of charsets more flexible, allowing for the use of the HTML 5 charset attribute as well more terminator characters ("'", and ">"). I also added a *_data function for the unit tests. Task-number: QTBUG-5451 Change-Id: I69fe4a04582f0d845cbbe9140a86a950fb7dc861 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
* | qprocess autotests don't need QtGuiDavid Faure2013-02-097-0/+7
| | | | | | | | | | | | | | | | (this isn't true of -all- corelib/ autotests though, e.g. tst_qdatastream uses QBitmap) Change-Id: I314fda5d85d45cb5eece8da74156989b83cf0299 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add support for SHA3 to QCryptographicHash.Richard Moore2013-02-091-0/+67
| | | | | | | | | | | | | | | | | | | | | | This commit adds SHA3 support to QCryptographicHash. Two implementations are provided, one optimised for 32 bit and one for 64 bits. The code has been written to make it easy to add further implementations, for example ones using NEON instructions on ARM. Change-Id: I3be9c45bbd4fcc2771d697e7f7ae74e48a831e8f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | QUrl effective TLDs: update table and split into chunks of 64KPeter Hartmann2013-02-092-1/+7
| | | | | | | | | | | | | | | | | | | | | | The table is there to know which domains are allowed to set cookies and which are not. There are more than 2000 new entries since the list has last been generated. The split to 64K chunks was made because this is the hard limit for strings in Visual Studio. Change-Id: I511aec062af673555e9a69442c055f75bdcd1606 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Added version() and setVersion() convenience API to QSurfaceFormat.Samuel Rødal2013-02-083-0/+111
| | | | | | | | | | | | | | | | | | | | This lets you write code like format.version() >= qMakePair(3, 2), and format.setVersion(4, 2) instead of format.setMajorVersion(4); format.setMinorVersion(2); Change-Id: Ib052091cc12865ea0d5db52e468ed6cd28f14840 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Add qunsetenv(), next to qputenv() and friends.David Faure2013-02-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing tst_qgetputenv shows that qputenv with an empty value doesn't lead to the same result on Windows and on Unix, and there was no way to fully delete an env var on Unix (which is needed for some env vars where not-set and empty are different, such as TZ, see `man tzset`). This is also why qglobal has qEnvironmentVariableIsSet() vs qEnvironmentVariableIsEmpty(), on the getter side. Qt4's ifdefs around unsetenv in qapplication_x11.cpp show that this is needed within Qt too (although this particular startup notification code has to be re-imported into Qt5 still). Change-Id: I631c8cddbcf933d4b9008f11aefc59f5a3c7c866 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QColorDialog manual test: add initial color selectionJ-P Nurmi2013-02-072-2/+74
| | | | | | | | | | Change-Id: I956404af728ef0d70977f6c69b1059b3656edd91 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Dialog testing tool: add missing enableDeleteModalDialogButton() callsJ-P Nurmi2013-02-071-0/+2
| | | | | | | | | | Change-Id: I012dc8c7c07fced69f8b7eda7a1686af1e11033f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | SSL: Implement session sharing and use it from QNetworkAccessManagerPeter Hartmann2013-02-061-0/+77
| | | | | | | | | | | | | | | | This improves performance since a network round trip can be avoided. Change-Id: I1aaff7e48ef9638cb137de0f43942c3a4dd2884a Initial-patch-by: Markus Goetz <markus@woboq.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* | Manual test for QFontDialogJ-P Nurmi2013-02-054-3/+299
| | | | | | | | | | Change-Id: I2bcdd30990e88af45c8d4b2756fcdd48fc2a47d7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Add qDegreesToRadians and qRadiansToDegrees math functionsLaszlo Papp2013-02-051-0/+75
| | | | | | | | | | Change-Id: I6e9fd76f2d2860f46531a72349b46193b8eeaaa7 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | QRegularExpression: add method for extracting the capturing group namesGiuseppe D'Angelo2013-02-052-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It may be useful to know which named capturing groups are defined in an regular expression, and for each of them, what's the corresponding index. This commit adds the needed method to QRegularExpression. Note that extracting the information doesn't happen while holding the mutex in the private -- pcre_fullinfo just reads information from the compiled pattern, so that's thread-safe. Task-number: QTBUG-29079 Change-Id: I50c00ee860f06427c2e6ea10417d5c0733cc8303 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QTreeView::expandToDepth - add missing emit of expanded and collapsedThorbjørn Lund Martsum2013-02-021-0/+9
| | | | | | | | | | | | | | | | | | | | | | Just like other functions this function should emit expanded and collapsed. A part of fixing Task-number: QTBUG-8176 Change-Id: I6d801f61e6f0cb8836634cc52f0be2b610f6c728 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Do not run tst_qfilesystemmodel for MinGW.Friedemann Kleint2013-02-011-0/+1
| | | | | | | | | | | | | | | | Task-number: QTBUG-29403 Change-Id: I91c938d9a6510ae91e54cd53e2d9df0a56b68d50 Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* | Replace SRCDIR-define by QFINDTESTDATA in tst_moc.Friedemann Kleint2013-01-312-40/+38
| | | | | | | | | | | | | | | | Remove srcify() function, which was warned about as unused on Windows. Change-Id: I731d3b6f058d4246e39dcf9a137619ae5087d751 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | QTreeView - emit collapsed in collapseAll()Thorbjørn Lund Martsum2013-01-311-2/+12
| | | | | | | | | | | | | | | | | | | | | | When we call call collapase we emit collapsed. Therefore it should also be emitted on collapseAll() This partly solves: Task-number: QTBUG-8176 Change-Id: I20c1388fcbbb60d12debb4a0b3b0d9fed41e2563 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | QTreeView - emit expanded on expandAllThorbjørn Lund Martsum2013-01-311-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | When we call QTreeView::expand expanded is emitted. For the same reason we should emit expanded on expandAll() This partly solves: Task-number: QTBUG-8176 Change-Id: Ie85e724eec50980c68f626ec47dec5c1e08cc085 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Update roleNames in QAbstractProxyModel if sourceModel resets.Nils Jeisecke2013-01-301-0/+41
| | | | | | | | | | | | | | | | | | | | | | If a sourceModel resets, it's roleNames might have changed. This is most likely the case if sourceModel itself is also a proxy model of which the sourceModel was changed. Task-number: QTBUG-28982 Change-Id: I102788f2c9bf97b4002b350673f9219e32e7a052 Reviewed-by: Nils Jeisecke <jeisecke@saltation.de> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Fix warning about incorrect format in tst_qlocale.Friedemann Kleint2013-01-301-3/+3
| | | | | | | | | | | | | | type is unsigned long, should be %lu. Replace by stream. Change-Id: Ib0346b54a4494910b4a5927d0de45840ca53fbda Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | Manual test for QColorDialogJ-P Nurmi2013-01-304-3/+280
| | | | | | | | | | Change-Id: I4eab3ecfbe5b6e7d663fe92d49af173fd179ba6e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Provide the resetInternalData slot to cleanly reset data in proxy subclasses.Stephen Kelly2013-01-301-0/+138
| | | | | | | | | | | | | | | | | | This was part of Qt 4.8, but Qt 5.0 was branched before that, so the commit was lost. Change-Id: I2a2ab3c75a0943ac734d588ebd74bc158dd6aaaf Reviewed-by: Nils Jeisecke <jeisecke@saltation.de> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | QStringRef: Added a trimmed() function.Keith Gardner2013-01-291-0/+22
| | | | | | | | | | | | | | Change-Id: I67c5d10f29f420e0aea95cf32b5d3c17c141899c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-01-2910-22/+30
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-2810-22/+30
| |\| | | | | | | | | | Change-Id: I12b4d8b99bdccae53b1a978cd6eb8f4ac6fb3c76
| | * Doc: Fix module name formatSze Howe Koh2013-01-258-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation QtCore -> Qt Core QtDBus -> Qt D-Bus QtDesigner -> Qt Designer QtGui -> Qt GUI QtImageFormats -> Qt Image Formats QtNetwork -> Qt Network QtPrintSupport -> Qt Print Support QtScript -> Qt Script QtSql -> Qt SQL QtSvg -> Qt SVG QtTest -> Qt Test QtWebKit -> Qt WebKit QtWidgets -> Qt Widgets QtXml -> Qt XML QtConcurrent -> Qt Concurrent (partial) QtQuick -> Qt Quick (partial) Also, distinguish between "module" and "library" Change-Id: Icb8aa695ae60b0e45920b0c8fce4dc763a12b0cd Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| | * Fixed checking HOME variable return value using isEmpty()Pasi Petäjäjärvi2013-01-251-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return value of the QFile::decodeName(qgetenv("HOME")); is never null if HOME environment variable is not set. So need to check the return value using isEmpty() instead. Task-number: QTBUG-28912 Change-Id: Ic57b1978d63e99b056cde35ca8cb9d2a07ff8ce8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
| | * Stabilize tst_qabstractsliderFrederik Gladhorn2013-01-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When simulating hight load, this test failed 4 times out of 80 runs on my machine. With this patch I could no longer reproduce the failure. Change-Id: I42748de0200b9094c8facf0e33f3794002ec1d01 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | | Add the Qt::ItemNeverHasChildren flag and use it in QTreeView.Stephen Kelly2013-01-291-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | It can be used to determine whether expand() should really expand. Change-Id: If79d8c295a4ca1356e60051682b227524a065126 Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | | Do not execute tst_qfilesystemmodel in parallel.Friedemann Kleint2013-01-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | It may interfere with other file system tests. Task-number: QTBUG-29014 Change-Id: I32dd7428993b0da1a2f70ec3e581050012a4ff32 Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* | | 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>