summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* QFlags: use unsigned int when the enum's underlying is unsignedMarc Mutz2012-09-281-2/+16
| | | | | | | | | | | Replace storage and operator int() return types with unsigned int if the enum is unsigned. This fixes a number of exisiting warnings, in particular with Qt::MouseButton under GCC. Change-Id: Ia12d36212329aec3e9d62a5fbd38809a6c2b36d0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Include qexception.h instead of qtconcurrentexception.hMarc Mutz2012-09-282-2/+2
| | | | | Change-Id: I9a54412b77596aa74af7a513c33b10eb52257db2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QFutureSynchronizer back to QtCoreMarc Mutz2012-09-284-2/+2
| | | | | | | This class, too, belongs with QFuture. Change-Id: I41a532ca66c156f1631e4b22ffc1a5879c854488 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QFutureWatcher back to QtCoreMarc Mutz2012-09-285-1/+1
| | | | | | | | This belongs with QFuture. Change-Id: I555cd01c1d3890fbbaca4fd8a9170292ea4eb0fb Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QFuture from QtConcurrent to QtCoreMarc Mutz2012-09-287-6/+6
| | | | | | | | | This class belongs to QThreadPool/QRunnable more than to QtConcurrent, so move to QtCore, where QThreadPool awaits it. Change-Id: Ibf20288a986593bf779453427c2dae8db1e1423a Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QtConcurrent::ResultStore as QtPrivate::ResultStore to QtCoreMarc Mutz2012-09-285-36/+34
| | | | | | | | | | No compatibility header needed. While this wasn't marked as private API, it wasn't documented, either. This is a prerequisite for moving QFuture to QtCore. Change-Id: I8e986e6e2a22fbe5cf08d0600ec39ae9ae993e20 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QtConcurrent::Exception as QException back to QtCoreMarc Mutz2012-09-284-24/+24
| | | | | | | | | Leave the old name as a deprecated typedef; adapt users. This is a prerequisite for moving QFuture back to QtCore. Change-Id: I81dcee2c7e6eb234c16f3f42e2415ca0da3dc4f8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QDateTimeEdit: cleanup whitespace & follow Qt coding styleJ-P Nurmi2012-09-281-76/+31
| | | | | Change-Id: Iae04cd0c9ac6ea85621b293f2ce184d673548e9b Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Update the NaN tests to deal with non-conformance betterThiago Macieira2012-09-281-15/+16
| | | | | | | | | | | | ICC apparently optimises 0 * anything directly to zero, even when it should be doing a multiplication to conform to IEEE requirements. GCC in fast-math mode does the same, but that also makes the rest of the function unreliable, so we try to turn off fast-math mode if we can. Task-number: QTBUG-22340 Change-Id: I0e3c5f4927b0a6bcb3189bb156c18843fc4b29b9 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Run application main run loop in color/font dialog testTeemu Katajisto2012-09-272-24/+46
| | | | | | | | | | | | | | | | | | In cocoa the timers are associated with main run loop but the way font and color dialog tests are executed the modal dialog run loop is only run in cocoa. This causes timers to not to fire and test cases to hang. Unfortunately this does not completely fix the test failure because the QTest::keyClick is not working with cocoa native dialog helpers and therefore the tests are marked with QEXPECT_FAIL. Task-number: QTBUG-24320 Task-number: QTBUG-24321 Change-Id: I88740a20ad2b794b6ca15e1b6455f436ffd39335 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Fix drag and drop with native widgetsjian liang2012-09-271-1/+26
| | | | | | | | | | | | | | | Task-number: QTBUG-27336 Don't check 'widget != m_widget' in QWidgetWindow::handleDragEnterMoveEvent() since the current window's parent widget may be the actual drop target. I replace it with a check '!widget->isWindow()' to prevent we pass through a top level window. I also change 'widget->mapFrom(m_widget, event->pos())' to 'widget->mapFromGlobal(m_widget->mapToGlobal(event->pos()))' since m_widget may not be widget's parent. Change-Id: Ia4f10f85ccdf1e27223ddc51afabd98b5d16f2fb Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Test: Enable tst_QWMatrix::operator_star_qwmatrixCaroline Chao2012-09-271-7/+2
| | | | | | | | | | Expecting results were not correct. The test is passing. Task-number: QTBUG-22362 Change-Id: Ie41c262019f76aace9062d7897d7934dc7437c3a Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Test: Split tst_QVarLengthArray::oldTestsCaroline Chao2012-09-271-46/+48
| | | | | | | | | | | | | | | The entire test is currently skipped while only the last part is causing problems. Move the out of memory test code to its own test function and skip only this function with the appropriate bug number. By allocating too much memory this test is causing a crash. Task-number: QTBUG-27361 Task-number: QTBUG-22342 Change-Id: Ia308099b7f12cf2c567b62063a7bbcc6fb38515b Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* tst_QLabel: remove QSKIP, wrap Q_OS_MACJ-P Nurmi2012-09-271-3/+5
| | | | | Change-Id: If67dbb07900bfa8f1bcf55aa457bd90ef0550900 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* tst_QMenu: remove QSKIP's -> wrap Q_OS_WINCEJ-P Nurmi2012-09-271-6/+10
| | | | | Change-Id: If8cb4a7dc0630aca83e4796bffb46f547abc4b6f Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* tst_QMainWindow: remove QSKIP, wrap Q_OS_MACJ-P Nurmi2012-09-271-4/+4
| | | | | Change-Id: Ided3c4cbdc7508a36e96351b5f60d79532bb7f26 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* tst_QAbstractButton::keyNavigation(): QSKIP -> XFAILJ-P Nurmi2012-09-271-3/+7
| | | | | | | Task-number: QTBUG-22286 Change-Id: If2c0e9181f2d954f3487dbb4c3f440d26a38adb6 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* remove no-op test from tst_qfileJoerg Bornemann2012-09-271-23/+0
| | | | | | | | | | According to the repo history the tailFile was introduced with the S60 port but the functionality it's testing was never implemented. Task-number: QTBUG-22341 Change-Id: I16e8e43bbd799f05f8b136925cb0add0b918289e Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* tst_QCommandLinkButton: cleanup whitespaceJ-P Nurmi2012-09-271-17/+11
| | | | | Change-Id: Ia1aab643f7b93b0532a38b27d7777fbcf5f489bc Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Remove CDE and Motif styles from qtbaseJens Bache-Wiig2012-09-276-53/+24
| | | | | | | | | | | | | | | | | It is time to clean up some of our legacy code. These styles have not been actively maintained for a long time and I think it is safe to say that they should no longer belong as part of the default distribution of Qt. We dont support any platforms based on CDE with our source packages. Note that even if we are removing these styles from the default distribution of Qt, applications that depend on them will still be able to bundle the existing (and unmodified) styles along with their own source code as we are not breaking compatibility. Change-Id: I1709630c20ba8e8088cd01628628d86856db57a4 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* tst_qcheckbox: remove duplicate codeJ-P Nurmi2012-09-271-8/+0
| | | | | Change-Id: Ic5d7694251e42a6d5ad7fea19137b71bc499ac94 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* QtWidgets auto tests: revise clipboard related testsJ-P Nurmi2012-09-273-85/+20
| | | | | | | | Use PlatformClipboard::isAvailable() and omit relevant test cases when QT_NO_CLIPBOARD is defined. Change-Id: I7e7b20a0a18f1a82987564f0e5e6c76d9207bc4b Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Revise QClipboard auto testsJ-P Nurmi2012-09-273-24/+33
| | | | | | | | Use PlatformClipboard::isAvailable() and fix build when QT_NO_CLIPBOARD is defined. Change-Id: I18c3af42fe39cf7618c2530723149848a10db985 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Auto tests: add PlatformClipboard::isAvailable()J-P Nurmi2012-09-271-0/+69
| | | | | Change-Id: Ie04060c2cae61ff8268644e9cd8001a1f5745f31 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* tst_QDialog: fix Q_OS_WINCE & QT_NO_SIZEGRIP usageJ-P Nurmi2012-09-271-9/+23
| | | | | Change-Id: I443381ef4f10492eeda0fc681c390e0cd4d4125e Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* tst_qsidebar: remove duplicate codeJ-P Nurmi2012-09-271-6/+3
| | | | | Change-Id: I8ee59022199fda7ea56891a2f924954cb4aefa42 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* QMetaType build fix with Q_NO_CURSOR and friends.Jędrzej Nowacki2012-09-271-1/+1
| | | | | | | | | | | | QMetaType has a way to "switch off" some types from the build. QtMetaTypePrivate::TypeDefinition<T>::IsAvailable is defined as false for all unaccessible types. Sadly that information was never used by gui and widget handlers. The patch implements it. Change-Id: Ie5835be4c88cfbbca8a4e9199e31ddfc20cae190 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jing Bai <jing.bai@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QMessageBox: fix Q_OS_MAC usageJ-P Nurmi2012-09-271-3/+5
| | | | | Change-Id: I1a3c1c88956d85343e693588ca0522c4b7d62072 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix QScreen::orientation() not always being updated after changing the ↵Simon Hausmann2012-09-261-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | update orientation mask The back-end might report screen orientation changes at any point and we record it in screen.d->orientation. However QScreen::orientation() returns the orientation filtered according to the mask. Changing the mask sends a notification to the back-end, which might send another update as a result of a possible subscription to system services (accelerometer). However on platforms where no subscription is required, where the platform plugin ignores the mask and always sends the latest orientation, we should "simulate" the update by updating the filtered orientation according to the new mask. The function is cheap to call as it won't emit any signals unless the orientation actually changes. This patch also adds missing flush() calls after handleScreenOrientationChange calls in the tests to ensure that the (synthetic) window system events are actually delivered to QScreen/QGuiApplication. Change-Id: Iebdd050f947e658ff5bc388629aa4cb31ab497fe Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Laszlo Papp <lpapp@kde.org>
* Fix events being processed on application startSimon Hausmann2012-09-262-1/+74
| | | | | | | | | | | | | | | | | | | | | | | Commit ef2efafcc6b28791df6258fa1c5d565090a9577a introduced a call to QWindowSystemInterface::sendWindowSystemEvents() in QGuiApplicationPrivate::init(), which in its implementation ends up calling sendPostedEvents() before flushing and processing any pending (internal) window system events. This patch changes the call in init() to use QWindowSystemInterface::flushWindowSystemEvents() instead, which is more gentle in that regard. The provided unit test verifies that no posted events are processed during the execution of the QGuiApplication constructor while at the same time verifying what the original changed tried to do: Allow a generic plugin to provide window system specific defaults that are implemented using the event queue of QWindowSystemInterface. Task-number: QTBUG-26886 Change-Id: I129a907c00d947df60fe1a02efc67857580fce24 Reviewed-by: David Faure <faure@kde.org>
* [QTBUG-27308][QTBUG-21534] Don't mouse-wheel-scroll QScrollBar when disabledMarc Mutz2012-09-261-0/+19
| | | | | | | | | | | | | | | | | | | | | | | This fixes a regression introduced in Qt 4 commit e855b199319c932f2e9500235775f961bc32e41a. The problem was that by handling the wheel event in event() instead of wheelEvent(), we lack the guard clause in QWidget that doesn't even call the handler if the widget is disabled, and the code didn't handle this itself. Fix by reimplementing wheelEvent() instead, which we can now do because we can break BC. This commit just moves the code. Another commit will clean up the implementation of wheelEvent(). Task-number: QTBUG-27308 Reported-by: chenjiexin Task-number: QTBUG-21534 Reported-by: Martin Koller Change-Id: Ibe6b89a81fe889f839c205b859a1492b39a4ddc3 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QtPrintSupport: allow slight deviations from pre-defined paper sizes in testsTeemu Katajisto2012-09-261-4/+4
| | | | | | | | | | CUPS paper sizes may differ from Qt paper sizes slightly and thus fail the strict comparison in qprinter tests. This is needed for the followup patch which initializes the cupsplugin with CUPS/PPD defaults. Change-Id: Ie66f77ead0204de0fc7c7913005fa516d57d34eb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Auto tests: remove PlatformQuirks::isAutoMaximizing()J-P Nurmi2012-09-268-68/+15
| | | | | | | | | | Use QStyleHints::showIsFullScreen() where necessary. Notice that QWidget::show() already calls showFullScreen() if appropriate, and Qt::X11BypassWindowManagerHint doesn't do anything in the XCB platform plugin. Change-Id: Ib8f61188c075170d646894388561cbb3f72daee8 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Fix MinGW/gcc warning about NOMINMAX being redefinedKai Koehne2012-09-263-3/+3
| | | | | | | | | Commit 5230d62fe added a #define NOMINMAX, which conflicts with a NOMINMAX definition in the MinGW headers. Just use the same definition as in MinGW to fix the gcc warning. Change-Id: Ib21dd323ebbdca5d143e394c7631303e0c72541a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Test: tst_QFile::writeLargeDataBlock() unstable failure as XFAILCaroline Chao2012-09-261-2/+10
| | | | | | | | | | | | While the large data block can be written to a file, the test is also showing instability while reading back the written block. Adding another expected failure to address this instability. Task-number: QTBUG-26906 Change-Id: I9704d441cf2bd6d7ef0f9023240ea61bb89561b6 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* If accept fails, stop accepting new connections and emit error signal.Jonas M. Gastal2012-09-261-0/+21
| | | | | | Task-number: QTBUG-24778 Change-Id: I6c5b685b3f861a0fafc1475c41bb35cede17d712 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Misc. updates to the lancelot autotest frameworkaavit2012-09-269-158/+900
| | | | | | | | | | Moving more logic into the protocol and framework, easening the burden on the autotest implementation. Implementing several new features in the server and report, like fuzzy matching and static baselines. Change-Id: Iaf070918195ae05767808a548f019d09d9d5f8c0 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Fix qstringlist autotest build for WinCE.Janne Anttila2012-09-261-0/+13
| | | | | | | | | | WinCE does not have setlocale, used SetUserDefaultLCID correspondingly as it is done in qstring autotest for WEC7. Change-Id: I7866bf0f365c7c6efbf3b439cdd9a281c6a1b2e0 Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* test:Remove QSKIP from tst_QPainterSergey Hambardzumyan2012-09-261-2/+0
| | | | | | | | Removed QSKIP ("currently broken... ") from tst_qpainter.cpp. Change-Id: I2a5af009198d26015779ca368ef82188ddf1b060 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* QFileSystemModel: fix permission manglingMarc Mutz2012-09-262-0/+148
| | | | | | | | | | | | | | | | | | | The old code masked out write flags before returning permissions from permissions() or data(FilePermissions) in order to force QFileDialog to disable the rename and delete actions. This was to fix Task 143519, but introduced QTBUG-20503. Instead, revert to the pre-143519-bugfix code and do the necessary check in QFileDialog directly. Also add a testcase for 143519. Reported-by: Gilles Pascual Task-number: QTBUG-20503 Task-number: 143519 Change-Id: I140109341c0ed40722e3aac4327c2a740fb014c2 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Remove duplicate words and punctuation from documentation.Mitch Curtis2012-09-266-7/+7
| | | | | Change-Id: I5550c62d412510bc2c5acceb2cae7d2f2ef6a8d3 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QCharAttributes: add wordStart/wordEnd flagsKonstantin Ritt2012-09-261-1/+63
| | | | | | | | | | | | | | | A simple heuristic is used to detect the word beginning and ending by looking at the word break property value of surrounding characters. This behaves better than the white-spaces based implementation used before and makes it possible to tailor the default algorithm for complex scripts. BIG FAT WARNING: The QCharAttributes buffer now has to have a length of string length + 1 for the flags at end of text. Task-Id: QTBUG-6498 Change-Id: I5589b191ffde6a50d2af0c14a00430d3852c67b4 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* test: Mark tst_QMdiSubWindow failures as XFAILSergio Ahumada2012-09-251-5/+37
| | | | | | | | | | The test has lots of failures, so mark these with QEXPECT_FAIL and remove the QSKIP. Task-number: QTBUG-22310 Task-number: QTBUG-27274 Change-Id: I0d38cedb581741b6edae5d1c3f4410714099a7fb Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Test: Remove QSKIP from tst_QWidget::raiseCaroline Chao2012-09-251-3/+0
| | | | | | | | | | Remove QSKIP("Not yet sure why this fails."), the test is passing on Mac. Task-number: QTBUG-22321 Change-Id: I5f09d067b1cc837c5e3ada5bbd34091fe1fd723d Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Test: tst_QFile::writeLargeDataBlock() unstable failure as XFAILCaroline Chao2012-09-251-1/+1
| | | | | | | | | | The current check is not enough to catch the unstable failure. Update the test to catch the failure in all cases. Task-number: QTBUG-26906 Change-Id: I2e37a1f6513df768cd410df7c91a9fd843150e57 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Test: Remove QSKIP from tst_QLineEdit::taskQTBUG_7395_readOnlyShortcutCaroline Chao2012-09-252-5/+1
| | | | | | | | | | | The test is passing on Ubuntu 11.10. Adding qWaitForWindowExposed after the line edit show() call to ensure the line edit is actually shown on the screen. Task-number: QTBUG-24518 Change-Id: I2af65bef76d171b36032120738dfbd7cfff51d7f Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix default-constructed QFileSystemEntryJoão Abecasis2012-09-251-0/+41
| | | | | | | | | | | | | | Member variables for lastSeparator, first and lastDotInFileName are now initialized to -1 (non-existing), where the previous value of zero would mean a separator/dot at that position and resulted in path() returning '/', instead of '.'. Tests were expanded for better coverage of empty state and default-constructed instances. Change-Id: Ie27547886b52224d38b5be0b4f920c9927fd440f Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Test case for moc handling definesLars Knoll2012-09-253-0/+161
| | | | | | | | | Added some test cases that check that moc correctly expands #defines Change-Id: I7fe6eed129d46ca9281d73064571cae43b32410d Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QSqlTableModel::selectRow(): fix failure on uncached rowsMark Brand2012-09-241-0/+45
| | | | | | | | | | | | | | | | | | | | This method was originally intended for refreshing rows after submitting changes. It should also work for refreshing rows that are unchanged (i.e., not cached), but did not because constructing the primary values depended on the cache. As a consequence, the WHERE clause for the query was not created. Fixed by deriving primary values for uncached rows from the query record. Note that the cache is still authoritative for rows it holds. This is important because the prmary values there may differ from the original query record due to changes to columns of the primary key. Includes new test. Change-Id: I41cca2cbf26019d4b495ffa6d876e2b55ec57803 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Add a manual test for QMacCocoaViewContainerAndy Shaw2012-09-244-0/+286
| | | | | | | | Added a test for QMacCocoaViewContainer which will enable the testing of the fixes coming Change-Id: I73e9540bc58411634f0da7d398eca4b7ffafba8e Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>