summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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>
* Make tst_qsql.cpp independent of QtWidgetsDebao Zhang2012-03-112-3/+3
| | | | | | Change-Id: I032902bea6fe2c7d9eb0491886fded7602ae2bcc Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Make tst_qapplication build when QT_NO_SHAREDMEMORY is definedKevin Krammer2012-03-091-0/+4
| | | | | Change-Id: I8cfd0ff2e17e6d5c04b81a042c665bcbbca36256 Reviewed-by: David Faure <faure@kde.org>
* Windows: Fix QStyleSheetStyle autotest antialiasing issuesMiikka Heikkinen2012-03-092-14/+18
| | | | | | | | | | | | | | | Antialiasing of fonts was causing two tests that relied on finding at least a certain number of pixels of certain color to find one or two too few pixels of that color and thus fail. Fixed by increasing the amount of text displayed to make sure enough pixels of correct color would be present. Also removing the test insignification, as the test will now pass completely when run under Windows Classic theme, which CI uses. Task-number: QTBUG-24323 Change-Id: Ic0b614d33e4e4f5df18d53cb72a05db5d8b6b5e7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Make tst_qmouseevent.cpp independent of QtWidgetsDebao Zhang2012-03-092-13/+9
| | | | | Change-Id: I6759c7be44c2d890c1a745effdd70faa3467fe5b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Clean up for some auto tests of the gui/kernel.Debao Zhang2012-03-096-9/+7
| | | | | | | They are not dependent on QtWidgets. Change-Id: Icbc0b0b6f0b72537fd3058cc038a1f5c4bf2aba7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* tst_qimagereader: does not depend on QtWidgetsDebao Zhang2012-03-094-4/+2
| | | | | | | | Both tst_qimagereader.cpp and tst_qimagewriter.cpp do not depend on QtWidgets. Change-Id: I7e8b31c23db203c44ccb4cd4e8e747d18c5d7ed7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QRegularExpression: minor fix to captureIndexForNameGiuseppe D'Angelo2012-03-082-1/+59
| | | | | | | | | | | | Although passing a null pointer to pcre16_get_stringnumber for the compiled pattern should simply make it error out, it's actually an undocumented behaviour, so let's stay safe and add an explicit check. Tests for this codepath are added. Change-Id: Ifd9c87874f6812ba487104ec1a5bbc83c3b16761 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QRegularExpression: improve JIT memory handlingGiuseppe D'Angelo2012-03-082-0/+29
| | | | | | | | | | | | | | | | | PCRE's JIT uses by default 32K on the pcre_exec caller's stack. This is fine for most situations, but in some cases (esp. patterns with lot of recursion) more memory is required. Therefore, if a match execution fails due to exhausting JIT memory, we let PCRE allocate up to 512KB to be used for the JIT's stack. The pointer to the allocated memory is put in thread local storage (so it can be reused from the same thread, if needed, and automatically goes away when the thread dies). Change-Id: Ica5fb7d517068befff88ebb198a603a26ec5d8a7 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* use $$QT_BUILD_TREE instead of $$(QTDIR)Oswald Buddenhagen2012-03-081-2/+2
| | | | | | | it's a "tad" more reliable Change-Id: I7207daa6869d1682719cc357794cf6efff496225 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>