summaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* Bootstrap qdbuscpp2xml.Stephen Kelly2012-03-185-0/+326
| | | | | | | | | This involves invoking the Moc classes directly and using the data structures it provides instead of invoking the moc exectutable and parsing the generated code. Change-Id: Ia5c654e8ef58d52d0d3376252c13e13885f80da3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* moc: test signature with (void)Olivier Goffart2012-03-162-0/+4
| | | | | | Change-Id: Id63ed21e9f5e7447ced877ec19a2786d20f439f0 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Merge master into api_changesKent Hansen2012-03-1632-433/+506
|\ | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qmetatype.cpp src/gui/kernel/qplatformsurface_qpa.cpp tests/auto/corelib/tools/qtimeline/qtimeline.pro Change-Id: Iff3fff34eeeb06f02369767ddfce44cfde505178
| * Revert "Disable 'check' target generation for network autotests for Windows."Shane Kearns2012-03-151-2/+2
| | | | | | | | | | | | | | | | | | | | Too broad disabling, will disable more selectively This reverts commit 3efb0d50e590f6a1e8d67d0136a648cd3b97c37d. Change-Id: I29e25816646194b6a4b7d8ff69e0c0d074ac2a19 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Fix QDnsLookup autotest failure in CI environmentShane Kearns2012-03-151-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The DNS server can legitimately include NS and A records for the authoritative name server in addition to the DNS records that were requested. These are now ignored when checking the reply (we only check results that match the query, rather than failing if a result is for a different host name than the query). Task-number: QTBUG-24698 Change-Id: I327f31d58cdca50c7df6b32b275d7f28b56405f0 Reviewed-by: Jeremy Lainé <jeremy.laine@m4x.org> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
| * QSqlTableModel::removeRows() enforce edit strategyMark Brand2012-03-151-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For OnFieldChange and OnRowChange, we don't want more than one row in the cache with uncommitted changes. This could happen if deletion in the database fails while other changes are pending. Chosen solution is to return false if other rows have pending changes. Also, we only allow 1 row removed at a time. Updated test, changes and documentation. Change-Id: I68baf6d221789b4754e891535070011c759a2155 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
| * QSqlTableModel::setData(): no longer autosubmit for OnRowChangeMark Brand2012-03-152-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The model can never do a good job of knowing when user moves to a new row in the view. Faking it by detecting when another row is changed was not a good solution because it cannot detect when the last edited row is left. Either the view should automatically submit when the user leaves a row or the application should provide a way to submit. This change made it possible to reuse the logic of flags() in setData(). Change-Id: I2550e5b113bceba1a852fc21203babeca07c5748 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
| * QSqlTableModel: disallow insert if changes are pendingMark Brand2012-03-151-0/+4
| | | | | | | | | | | | | | | | For OnFieldChange and OnRowChange, inserting rows should not be allowed if there are pending changes in cache. Change-Id: Ia794332959a35a1de87e798ba1a74ace3dfae68f Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
| * QSqlTableModel::setData()/setRecord(): fix incorrect rowMark Brand2012-03-151-4/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For OnFieldChange and OnRowChange, before submitting new changes, setData() and setRecord() attempt to submit pending changes and revert them upon failure. However, they fail to consider that reverting pending insertions removes rows from the model. As a result, the new change can be applied to a row higher than intended. One possible solution would be to adjust the targetted index for the removed rows, so that the intended row is affected by the new change. But this still causes the strange editing experience as rows jump up just as they are being edited. It does not seem right in the first place for the model to initiate reverting changes. It should be up to the application to decide what to do when data cannot be committed. In particular, setData() and setRecord() should not have the side effect of reverting already pending changes. The chosen solution is simply to refuse new changes that don't make sense for the edit strategy. For OnFieldChange, flag() will indicate read-only when editing is blocked by a pending change. Since setData() and setRecord() submit data immediately for OnFieldChange, it no longer makes sense to resubmit changes automatically before a new change. For OnRowChange, setData() keeps the behavior of automatically submitting a pending row before starting on a new row. This is historical behavior and is probably motivated by the fact that QTableView does not automatically call submit() when editing leaves a row. The obvious shortcoming of this is that the last row to be edited will not be submitted automatically. It also prevents us from flagging rows other than the pending row as read-only. For OnRowChange, setRecord(), being row-oriented by nature, should submit the change immediately rather than waiting for the next call to setRecord(). This makes setRecord() consistent with insertRecord(). Change-Id: Icb4019d8b7c53a7ee48f8121a7a525e8bc35d523 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
| * UTF8-Codec test: Fix compilation with g++/C++0X.Friedemann Kleint2012-03-151-5/+5
| | | | | | | | | | Change-Id: I704f8d1b07ca371c36e4eecc52c80ac783e3da3c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * tst_qsharedpointer: Fix auto test fail under Windows 7Debao Zhang2012-03-152-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tst_QSharedPointer generate another Process to test some invalid codes, and it expect that the prcoess will crash and return a non-zero value. The process which is a console application was linked to windows subsystem, and QProcess seems can not get its return value. This cause the unit test fail. In addition, when the process crash under debug mode, a debug error report-dialog will appear, which is very annoying, so I suppress it too. Task-number: QTBUG-24160 Change-Id: Ia1c872d4515c83b0aa516bcfe3783f59797d2d49 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| * Verify expected warnings in QSettings autotest.Jason McDonald2012-03-151-2/+13
| | | | | | | | | | | | | | | | Use QTest::ignoreMessage() so that the warnings don't appear in the test output and so that the test will fail if the warnings are not produced. Change-Id: I418d78819fc9dbfd7da2a8b6c0a1ebfa967347e2 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Remove unmaintained and broken VNC platform pluginJohannes Zellner2012-03-154-174/+1
| | | | | | | | | | | | | | Change-Id: Ie0a07c3a6822870b095a20d997b63fb1635f20be Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Robert Griebl <robert.griebl@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
| * headersclean: omit -Wcast-align also on MIPSRohan McGovern2012-03-151-2/+4
| | | | | | | | | | | | | | | | These issues are permitted to go unfixed for ARM and MIPS, for the time being. Change-Id: Ibdf33dc42e3de19ef20e9dc50f12f451ea6dbf23 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Mark tst_qtimeline as insignificant on WindowsRohan McGovern2012-03-151-0/+1
| | | | | | | | | | | | | | | | This test has been repeatedly unstable. Task-number: QTBUG-24796 Change-Id: I603965c0189ad6da0cdf48527c4919c55e1918b4 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
| * QTableView: call model->submit() on row changeMark Brand2012-03-151-0/+27
| | | | | | | | | | | | | | | | | | QTreeView already does this in the exact same way. It's necessary to call submit() so edit strategy OnRowChange in QSqlTableModel will work as expected. Change-Id: Ib430143e8a71f3b0bcd842fcc772cc7ee4525f0a Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Cocoa: Improve basic window handling.Morten Johan Sorvig2012-03-145-24/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor NSWindow creation into createNSWindow and setNSWindow. This is necessary to support QMacNativeWidget where we re-use an already created window. Implement popup window handling. Make sure the window is displayed correctly and closes when it should. Take control over window activation in order to prevent infinite loops involving the QtCreator "cmd-k" window. Activation events are for now not sent to popup-type windows. There is now a different set of test failures: add and remove some QEXPECT_FAILs. Change-Id: I229761b59f90c9815b968eacc2cbc9c20cc5047e Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
| * QHeaderView - renaming functions in Qt5Thorbjørn Lund Martsum2012-03-142-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch renames the functions in Qt5 according to the notes. It also renames resizeMode to be consistent. The old functions are both marked with both QT_DEPRECATED and '### Qt 6 - remove' All usage of the function within the qtbase are also changed to use the new functions. Change-Id: I9e05fa41d232e9ca43b945fcc949987017f3aedd Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| * Unify QMetaType::TypeFlags detection.Jędrzej Nowacki2012-03-141-19/+29
| | | | | | | | | | | | | | | | | | Duplicated code was removed. As an side effect: - one runtime flag check was replaced by a compile time check. - is enum flag can be used together with built-in types. Change-Id: I54173e7b07ce7e487d3cc21ba24dcccd28b5d049 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Uncomment disabled code in QResourceEngine autotest.Jason McDonald2012-03-141-1/+1
| | | | | | | | | | | | | | Resource files are expected to be readable. Change-Id: Ife2b624e69b58e2fb996bc3e210a6e6c5c6852fe Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Tidy the QSettings autotest.Jason McDonald2012-03-141-86/+62
| | | | | | | | | | | | | | | | | | | | | | - remove unnecessary includes - remove undefined private functions - remove commented-out test function - fix indentation - clarify why part of tst_QSettings::setValue() is commented-out Change-Id: I09e1a33896536e702f7ba65f266415536b4f9e0b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Remove commented code from qtconcurrentmap autotest.Jason McDonald2012-03-141-9/+0
| | | | | | | | | | | | | | | | | | The removed code was already commented out when the test was added to the Qt repository and does not compile when uncommented as it calls non-existant overloads of QtConcurrent::FunctionWrapper1::operator(). Change-Id: I5a02efae4b89e2815b077474aa7cd0192dcb2730 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Print all accessibility event strings.Frederik Gladhorn2012-03-131-47/+1
| | | | | | | | | | Change-Id: I2488fe86fb2c154a8b7d91c6e4f2cd9c9e7b9ecb Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
| * Clean up test, check radio button and checkbox.Frederik Gladhorn2012-03-131-3/+8
| | | | | | | | | | Change-Id: I4dcfa2014256aee10feb08146ae6fc3f402ac8fb Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
| * Autotest details of QAccessibleEvent.Frederik Gladhorn2012-03-131-16/+23
| | | | | | | | | | Change-Id: Ieec33c23e7b18cfedf061088d6561203a5e7ac39 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
| * QSqlTableModel::isDirty(): new overloaded methodMark Brand2012-03-121-0/+162
| | | | | | | | | | | | | | | | | | | | | | Checks if model has any changes to submit. Includes new test covering isDirty(index) as well the new overloaded function. Task-number: QTBUG-3108 Change-Id: I0ccbda45d5d9f06434cf1e1c037a9efb76d0cc37 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
| * Trailing comma should result in an error during JSON parsingAlexei Rousskikh2012-03-121-0/+13
| | | | | | | | | | | | | | | | | | 1. QJsonParseError::MissingObject defined 2. QJsonDocument::fromJson() will result in defined error after parsing of something like "{ 'key':1 , }" or "[ {'key':1}, ]" Change-Id: I8e6234a03b8aca4e5ad6180f273f91066b86d7a1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * Move tst_qshortcut.cpp to QtWidgetsDebao Zhang2012-03-125-1/+1
| | | | | | | | | | | | | | | | QShortcut belongs to QtWidgets instead of QtGui. Change-Id: I9715399bb372a6ea4bd76109f87ba31a1e30a7e6 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | Fix invalid read, detected by valgrindJoão Abecasis2012-03-151-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 3fe1eed0 changed the QVERIFY in line 1354 to QCOMPARE. This was done to work around a (not yet understood) compiler issue. That however was wrong, as char pointers in QCOMPARE are assumed to point to '\0'-terminated strings and will get dereferenced. In this case the intent was to compare the actual pointer values, as the pointers point past the end of the array and should not be dereferenced. Explicitly casting to (void *) and using QCOMPARE will not only keep the intent, it will hopefully also provide meaningful output on failures. As such the fix was applied throughout the test. Change-Id: Ib0968df492ccc11d7c391bb69037cd7241e55493 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* | QRegularExpression: support for QString overloadsGiuseppe D'Angelo2012-03-151-27/+83
| | | | | | | | | | | | | | | | Added support for QString overloads taking a QRegularExpression. Change-Id: I8608ab0b66e5fdd2e966992e1072cf1ef7883c8e Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QRegularExpression: QMetaType and QVariant supportGiuseppe D'Angelo2012-03-143-0/+29
| | | | | | | | | | | | | | | | | | Removed the Q_DECLARE_METATYPE in favour of first-class support inside QMetaType and QVariant. Change-Id: I904236822bfab967dc0fbd4d4cc2bcb68c741adc Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Silence 'narrowing conversion' warning in testJoão Abecasis2012-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | Seen with gcc 4.6: tst_qarraydata.cpp: In member function 'void tst_QArrayData::grow()': tst_qarraydata.cpp:1445:29: error: narrowing conversion of 'i' from 'size_t {aka long unsigned int}' to 'int' inside { } [-fpermissive] Change-Id: Iad55659554b64ee34655640d606153f058a8cd05 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge "Merge remote-tracking branch 'origin/master' into api_changes" into ↵João Abecasis2012-03-12170-800/+1866
|\ \ | | | | | | | | | refs/staging/api_changes
| * | Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-03-12170-800/+1866
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp Change-Id: I884afc3b6d65c6411733a897a1949e19393573a7
| | * Implement QSystemTrayIcon for Windows.Friedemann Kleint2012-03-121-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No longer base the implementation on a QWidget which is not necessary when all that is required is a message window listening to task-tray messages. Export a service function creating a message window from the Windows native interface and use that. Task-number: QTBUG-20978 Change-Id: I01d0faeac777df4eee802c51d2bc722fce814080 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| | * Move the auto test of QPixmap::grabWidget() from QPixmap to QWidgetDebao Zhang2012-03-122-43/+75
| | | | | | | | | | | | | | | | | | | | | Change-Id: Id565fa1eb8fe13c62a93a5afa39a5701ce7b20ea QPixmap::grabWidget is deprecated, which calls QWidget::grab() at present. Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| | * tst_exceptionsafety_objects: add virtual ~AbstractTesterMarc Mutz2012-03-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC complained about undefined behaviour when deleting subclasses of AbstractTester through pointers to AbstractTester, and it's doing so correctly... Change-Id: Ie641281d8aafe32c5c9784e8aa39672ff0b699c7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| | * Use QAccessibleEvent in test.Frederik Gladhorn2012-03-121-20/+20
| | | | | | | | | | | | | | | Change-Id: I4f9c0f503543caa5704a29c8ccd7c4134b455625 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
| | * Fix indentation of QWaitCondition autotest.Jason McDonald2012-03-121-352/+351
| | | | | | | | | | | | | | | | | | | | | No functional changes - cosmetic change only. Change-Id: I7332eaab31720776c70a7ef813d55db44bab83f7 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| | * Remove gcc 3.x-specific code from QtConcurrent and its tests.Jason McDonald2012-03-122-28/+0
| | | | | | | | | | | | | | | Change-Id: I4dd0ce50b70a47a0a00f4c7ec18077a1bcbe5705 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| | * Move tst_qprinter.cpp to QtPrintSupportDebao Zhang2012-03-1210-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | QPrinter and QPrinterInfo belong to QtPrintSupport. Change-Id: I0c146e0c717be365e752c1eaf7dbe6765fb72da2 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| | * Clean up some auto tests of guiDebao Zhang2012-03-1210-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | These unit tests do not depent on QtWidget. Change-Id: I95526125c563885c0531da7ebfee06bca9a87b1c Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| | * Update accessibility StateChange by custom event.Frederik Gladhorn2012-03-121-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | Subclass QAccessibleEvent to give details what changed in the state change. Change-Id: I9005d311e85a3c8bfa6e062833fa6a8a7dc6a4a4 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
| | * Move tst_qicon.cpp and tst_qpixmapfilter.cpp to QtWidgetsDebao Zhang2012-03-1226-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | QIcon and QPixmapFilter belong to QtWidgets instead of QtGui. Change-Id: I6d82811e04046edb0cc67c55970c161612e86d3f Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| | * Remove outdated assumption from QVariant autotest.Jason McDonald2012-03-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The test was assuming that "data()" is a special function in autotests, but that hasn't been the case since early prototypes of testlib. Change-Id: Ic24cf5dc539b55d12eba0a6ab17173e2ed698f21 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| | * Fix compile warnings in QCoreApplication autotest.Jason McDonald2012-03-121-17/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Use const_cast to avoid "deprecated conversion from string constant to 'char*'" warning when building argv arrays from string literals. - Use Q_UNUSED to avoid warnings on unused local variables. Change-Id: Idd2c8279adc102b6ebc6af7486ba26fe9ed4e7c1 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| | * Remove redundant and incorrect comment from QList autotest.Jason McDonald2012-03-121-6/+0
| | | | | | | | | | | | | | | Change-Id: I3187d0d8ace120181a4c49bbc68f421ddf5acbe0 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| | * testlib: Improve formatting of QCOMPARE failure messages.Jason McDonald2012-03-1221-122/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the various versions of the failure message align consistently so that it's a little easier to compare the actual and expected values. Of course, the value won't align nicely unless the "actual" and "expected" strings are the same length, but at least this commit makes that consistent across all versions of the message. Change-Id: If9ce231df3b5d279a06f6458fdb5da0aa4586068 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| | * Add Q_IS_ENUM(), and provide as flag in QMetaType::typeFlags()Glenn Watson2012-03-112-0/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Q_IS_ENUM() macro to determine if a given type is an enumeration. Use information from that in QMetaType::registerType() to store whether custom registered metatypes are enums or not. This information can then be accessed by calling QMetaType::typeFlags(int type). This is used by the declarative code to determine whether a custom type in a variant can be safely cast to an integer, which is required to allow passing non-local enums as signal/slot params. Change-Id: I9733837f56af201fa3017b4a22b761437a3c0de4 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| | * Crash fix in QMetaType::typeFlags.Jędrzej Nowacki2012-03-111-0/+6
| | | | | | | | | | | | | | | | | | | | | The function is public, so it should validate input instead of crashing Change-Id: Id67463b0b61ab74a76c1ede7f052bdbed37822b6 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>