summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
Commit message (Collapse)AuthorAgeFilesLines
* Made QImage::fill(uint pixel) for RGB888 accept QRgb values.Samuel Rødal2012-08-292-3/+20
| | | | | | | | | | | | Previously QImage::fill() for Format_RGB888 expected a BGR value instead of the RGB order defined by QRgb, making it counter intuitive to use related to the 32-bit formats. Fixed the QPixelLayout data for RGB888 and changed the byte order of quint24 based on what the optimized image conversion routines expect. Change-Id: I72926debbc6f5b5cb10b8aa0b2a2a916a04db946 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Make letter spacing APIs in QTextFormat more consistentEskil Abrahamsen Blomfeldt2012-08-271-8/+12
| | | | | | | | | | | | Change d060b6f04f956ab3a6358f826dc6928b3353f5f7 introduced some new properties to QTextFormat which were unfinished and did not match the documentation in the same change. I've updated the API and docs to use the regular QFont enum for letter spacing type instead of introducing bools (which inhibits expansions later) or mutually exclusive properties in the text format. Change-Id: Ife44993b6746c413e421fdaf92ebaaab6ba95977 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Do not consider sign in qIsNull.Mitch Curtis2012-08-222-0/+25
| | | | | | | | | | | | | | | The current implementation of qIsNull only returns true if the value is positive zero. This behaviour is not useful for use cases like QPointF::isNull, where QPointF(-0, -0).isNull() will return false. There doesn't seem to be a reason why the function exhibits this behaviour (-0.0 is not accounted for in the unit tests), and for the case of QSizeF::scale it causes a bug: qIsNull is used to check for division by 0.0 before it proceeds, which fails in the case of -0.0. Task-number: QTBUG-7303 Change-Id: I767e5280bd26614e8e78ae62b274eb9bc4ade385 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Fix freetype font rendering for Windows CEAndreas Holzammer2012-08-202-0/+16
| | | | | | | | | | Windows CE does not have support for GetGlyphOutline. So addGlyphToPath will not work. QML uses it for their distance field rendering. One option to bypass this issue is to use freetype as rendering backend. Change-Id: I965254344945cbdad771a5d505fb61c1cc2087df Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Auto test for passing QTextEdit as QSyntaxHighlighter parentJ-P Nurmi2012-08-182-1/+20
| | | | | | Change-Id: Ia225723de5b0b2085a72a2af26e2a563b65955d8 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove some dead code wrapped in Q_WS_QWS.Stephen Kelly2012-08-033-9/+2
| | | | | Change-Id: Ie1ee8c4af603b924abe40145041357981d174445 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Revert "Move QWindowSystemInterface out of qpa."Paul Olav Tvete2012-08-034-4/+4
| | | | | | | | | | | | | | This reverts commit 784a877d3cd9a1a75aca9c83146389503a966071. Conflicts: src/plugins/platforms/cocoa/qcocoawindow.mm src/testlib/qtestkeyboard.h src/testlib/qtestmouse.h src/testlib/qtesttouch.h Change-Id: Iebfed179b3eb7f30e4c95edcae5a8ad6fd50330e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make tests compile without gui-privatePaul Olav Tvete2012-08-026-14/+45
| | | | | | | | | | | | | Add new qt_handleXXX functions that forward to the QWindowSystemInterface functions, and use those in the testlib inline functions. Remove use of struct QWindowSystemInterface::TouchPoint from the testlib header files (requiring some slight increase in ugliness in the two tests that use that struct). Also remove the qmake hack that adds private headers to all tests Change-Id: Iec23537e55a44802f6e9cd463f7a0f82007c5250 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Set the Qt API level to compatibility mode in all tests.Thiago Macieira2012-08-0176-0/+76
| | | | | | | | | | | Qt 5.0 beta requires changing the default to the 5.0 API, disabling the deprecated code. However, tests should test (and often do) the compatibility API too, so turn it back on. Task-number: QTBUG-25053 Change-Id: I8129c3ef3cb58541c95a32d083850d9e7f768927 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* tests: disable qstandarditemmodel test when building without QtWidgetsRohan McGovern2012-07-301-1/+4
| | | | | | | This test uses QTreeView. Change-Id: I6ba56ad6ec3687a5b90d516be10d6f88e248d53d Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Implement implicit constructors for built-in classes.Stephen Kelly2012-07-271-0/+47
| | | | | | Change-Id: I6b0b104bc1da3252d014615c50b81830de42e722 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QMetaTypeId2::IsBuiltIn: (new) template meta-function to check for built-in ↵Marc Mutz2012-07-261-0/+14
| | | | | | | | | | | | | | | types This allows to check whether QMetaTypeId2::MetaType exists, and can help turn run-time into compile-time expressions, even without constexpr support, or in situations where constexpr can't be used (because you can't overload on it). This was designed for the QMetaType::registerConversion feature, but it's much more widely applicable. Change-Id: Iafa04add04bcb531b3f7fe3e751c7e91ee6a3bc0 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Remove usage of deprecated qWaitForWindowShown(QWidget *) method.Friedemann Kleint2012-07-252-3/+3
| | | | | | | | Remove usages from autotests with the exception of widgets/kernel, widgets/widgets and widgets/graphicsview. Change-Id: I917b2857ed0cd07a6b3dbcd69244f558086c6586 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Deprecate the qWaitForWindowShown(QWindow *) method.Friedemann Kleint2012-07-254-21/+21
| | | | | | | | | | | | | | While the qWaitForWindowShown(QWidget *) is inherited from Qt 4.8, the qWaitForWindowShown(QWindow *) was introduced in Qt 5. As it is identical to qWaitForWindowExposed() and removed already, it can be deprecated in Qt 5. Remove its usages in qtbase. Change-Id: I28788d120ad687a49f02b2b44de6b38a2832fe5c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Split the QGuiVariant test from the Core one.Stephen Kelly2012-07-2552-12/+665
| | | | | | | | | | | This makes development on the meta type system easier because only QtCore must be re-built to run most of the tests. The existing QGuiVariant test needs to be run before pushing anyway, but not so frequently. Change-Id: I1fa66edbd790c957e1a232226847dd550227a477 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* WindowSystemInterface::sendWindowSystemEvents(): Remove unused parameter.Friedemann Kleint2012-07-231-3/+3
| | | | | | | | No need to pass the dispatcher. Get rid of Windows logic to maintain a stack of dispatcher associated with flags. Change-Id: Ic2daad4b6762a46fac3274937effc188af436c9a Reviewed-by: David Faure <faure@kde.org>
* Tests: Replace deprecated QPixmap::grabWidget() by QWidget::grab().Friedemann Kleint2012-07-201-2/+2
| | | | | Change-Id: I5018cf5dd51c1781e7f17c7d205f3f60de7945be Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Implement waitForWindowExposed and friends for widget windows.Friedemann Kleint2012-07-201-12/+7
| | | | | | | | | | | | | | - Implement waitForWindowExposed() for toplevel windows. - Implement waitForWindowShown(QWidget *) and mark as deprecated in line with waitForWindowShown(QWindow*). - Use in tests. - Simplify tests (collapse waitForExposed, setActive into setActiveWindow, waitForActive), remove most hard-coded timeouts. - Stabilize graphicsview tests by using waitForWindowActive. Change-Id: Ic7c061e2745b36f71a715ee4e47c0346b11a91e8 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Replace Q_WS_ in tests by Q_OS_ or check platform names.Friedemann Kleint2012-07-162-11/+9
| | | | | Change-Id: Ica445cf1e83bfaab870ac344d6c02766f047a5cc Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix crash when column is inserted before rowspanned cellEskil Abrahamsen Blomfeldt2012-07-121-0/+29
| | | | | | | | | | | | | | When you're inserting a column in front of a rowspanned cell and this cell is not the first in the rowspan, we would get the wrong logical index of the new cell (putting it in front of the initial cell with the rowspan). If the cell does not span all rows, the table will get into a broken state and trigger asserts in update(). To fix this, we search for the first cell after the insertion point which has a logical index higher than the cell directly before the insertion point. Change-Id: I42e91a20d77b2ba9c5607f6cab23f51ed888cbd3 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* Fix some spelling errorsSergio Ahumada2012-07-111-1/+1
| | | | | | Change-Id: I19d3b2e9a5180b13deb828b55195404ef20be295 Reviewed-by: Daniel Teske <daniel.teske@nokia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Color transparency support in html import/exportAlexey Chernov2012-07-102-0/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Export of color transparency component is added for cases where color is exported to html. New static function colorValue() is added to prepare CSS string representation of QColor. When the color is opaque, it falls down to QColor::name() method which was used previously, otherwise it returns 'rgba()' CSS statement or 'transparent' keyword in case transparency is 0. 6-digit precision is used for alpha value as it's maximum which can be processed properly by Gecko and Webkit engines (http://lists.w3.org/Archives/Public/www-style/2009Dec/0295.html). Import part for rgba() statement was also added to QCssParser. It supports rgba() color values as stated in CSS Color Module Level 3 (http://www.w3.org/TR/css3-color/#rgba-color). Import of undocumented statement 'rgba(int,int,int,int);' was also added to preserve regression test success and to provide compatibility with previous code relying on this behaviour. Test cases added to QCssParser autotest for rgba(int,int,int,float) statement and to QTextDocument autotest for rgba(int,int,int,float) and 'transparent' statements for certain 'color', 'background-color' and 'bgcolor' properties. Change-Id: Id341c4e800249820d52edef8003e50f9a74d062b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* fixed unittest builds for winceBjoern Breitmeyer2012-07-062-5/+2
| | | | | | | | | | removed printsupport tests for wince as there is no print support on wince and removed the special handling for wince from 4.8 on some tests as the dependent modules are not part of qt base anymore Change-Id: I4ffb22da11f98beee1013f775cb5ce4b936d3211 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix division by zero in triangulating stroker.Kim Motoyoshi Kalland2012-07-061-0/+75
| | | | | | | Task-number: QTBUG-15621 Change-Id: I10e0e39e57078507a01e1c2edb59fa52fd932f6c Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Replace insignificant test with QEXPECT_FAIL.Toby Tomkins2012-07-042-2/+1
| | | | | | | Task-number: QTBUG-26403 Change-Id: Id933665a35be056f2b2a6fa2152f324810a7f057 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Avoid load(testcase) for installing test helper appsRohan McGovern2012-07-041-3/+3
| | | | | | | | | | | | Make test projects declare TEST_HELPER_INSTALLS rather than calling a function exported by testcase.prf. load(testcase) may be unsafe, as testcase.prf should be processed after default_post.prf. Fixes silent disabling of various autotests. Change-Id: I56b35ffd653a637ad5ab18d64dd1a1edadfac59f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
* Remove Unicode escape sequence, which MSVC does not support.Friedemann Kleint2012-07-031-15/+1
| | | | | | | | Task-number: QTBUG-25924 Change-Id: I352bb5c674d90891df4103849bf5b5ac5778a2ee Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix capitalization with newline bugYann Bodson2012-07-031-0/+23
| | | | | | | | | We only want to change the capitalization if the QScriptAnalysis flag was Lowercase, Uppercase or SmallCaps. Task-number: QTBUG-17485 Change-Id: Icbecb09b06a9153866ae81d592b3f6779c2dafb5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Move QStandardItem/QStandardItemModel to QtGuiGiuseppe D'Angelo2012-06-298-0/+2814
| | | | | | | | | | | The dependencies on QFont, QBrush, QIcon are all in QtGui, so there's little sense to still have these classes in QtWidgets. This also copies and pastes a version of QWidgetItemData as QStandardItemData inside qstandarditemmodel_p.h. Change-Id: Ibafc5a30748e7ce0b54753309ae6dc4a797fc20e Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Add QGuiApplication::setApplicationDisplayName.David Faure2012-06-271-0/+13
| | | | | | | This is for use in window titles. Change-Id: I0070a08abd379ae2edcfab4413c182bd9e840678 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* tst_qtextscriptengine: make it compilable under MSVC2010Debao Zhang2012-06-261-2/+6
| | | | | | | | | | Source files which contain UTF-8 literals can not be compiled by MSVC with Chinese/Japanese locale. Change-Id: I5daa2e45c5e1ceb86da91e72288c24018c49c0f6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Only quit if there are no visible widgets or windows.Stephen Kelly2012-06-121-0/+63
| | | | | | | | | | | | | | We need to let the QGuiApplication determine whether quitting is appropriate based on whether there are visible top level QWindows after the last top-level QWidget was closed. This solves the issue raised here: http://thread.gmane.org/gmane.comp.lib.qt.user/1880 The transientParent is the QWindow equivalent of parentWidget on QWidget, so the test in QGuiApplication::shouldQuit is similar to the one in QApplication::shouldQuit. Change-Id: I500eff8d5887f24415180134b3a4be3c630a896f Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Update the Unicode Text Breaking Algorithm implementationKonstantin Ritt2012-06-101-3/+1
| | | | | | | | | | | | | | | | | | to make it conformant to the Unicode 6.1 specifications #14 and #29. The most important changes are: * The implementation has been reworked from scratch to fix all known bugs; * Separate-out the grapheme and the line breaking implementation to eliminate an overhead due to calculating unnecessary breaks; * Stop using deprecated SG class in favor of resolving pairs of surrogates; * A proper support for SMP code points; * Support for extended grapheme clusters (a drop-in replacement for the legacy grapheme clusters as of Unicode 5.1); * The hardcoded tailoring of UBA has been eliminated which breaks the 7 years-old lineBreaking test. Some later, we'll investigate if such a tailoring is still needed. Change-Id: I9f5867b3cec753b4fc120bc5a7e20f9a73d89370 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QZip: improve reading of zip files, fix some edge cases in writingKonstantin Ritt2012-06-081-1/+1
| | | | | | | | | | This supercede https://codereview.qt-project.org/#change,25111 and fixes some more cases; The autotest crash is fixed as well (but the test itself omitted due to .pro file misconfiguration) Change-Id: I4a3adde18b4f9a8ac9822f700eee71d2a12b9c2c Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
* Make qfont autotest build without widgetsKent Hansen2012-06-082-4/+11
| | | | | Change-Id: I2ab344d44cb2aa8c59c1c28f7368784849d4b74d Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make qicon autotest build without widgetsKent Hansen2012-06-082-1/+6
| | | | | Change-Id: Ic6176404076bac956d00d57c99e0bbf0ac78beca Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Shift positions for lineBreakTypeKonstantin Ritt2012-06-071-4/+4
| | | | | | | | | | | | | | | | | | | to keep them consistent with positions for all other flags. This changes the internal behavior so that attributes[0].lineBreakType now means "break opportunity at start of the text (before the first character in the string)" and is always assigned with HB_NoBreak to conform rule LB2 (see http://www.unicode.org/reports/tr14/#LB2). The current implementation is based on the sample implementation from tr14 that aimed to be as simple as possible rather than to be optimal. From now, we can use pieces of the attributes array "as is" without having to adjust some positions. Or we can analize some long text by chunks (e.g. paragraph by paragraph) and consume less memory. This introduces a minor overhead that will be eliminated shortly. Change-Id: Ic873a05a9d5203b1c3d5aff2e4445a3f034c4bd2 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make qtexttable autotest build without widgetsKent Hansen2012-06-072-1/+8
| | | | | Change-Id: Id5f93dee0c4b5978c473838559f586ced35a2981 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make qpixmap autotest build without widgetsKent Hansen2012-06-072-2/+11
| | | | | Change-Id: Iabf1e6815a2af79d9da84c0e2bb9c2de52cb698f Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make qpicture autotest build without widgetsKent Hansen2012-06-072-1/+8
| | | | | Change-Id: Id2047dace7b3087f1c7b83545f5e122ab936d33c Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make qmovie autotest build without widgetsKent Hansen2012-06-072-1/+10
| | | | | Change-Id: Ie53b183e99de08c3cc35f4932b7aabf4bf5b0940 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make gui tests build when widgets aren't availableKent Hansen2012-06-071-0/+4
| | | | | Change-Id: I5b75116d148f84ae2f96dd6b573d14952c4b601c Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Make qpainter autotest build without widgetsKent Hansen2012-06-072-2/+31
| | | | | Change-Id: I4e05871e44f7a69aaa9cd5d876c249c7dd9d86e8 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Make qtextdocumentlayout autotest build without widgetsKent Hansen2012-06-072-1/+8
| | | | | Change-Id: Ib767f9cac5fc3274ed16e87f0c4da68102147645 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make qtextobject autotest build without widgetsKent Hansen2012-06-072-1/+8
| | | | | Change-Id: I9ea79b62d22faeccc07d8c21a0d8f032b40abef0 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove insignificant_test for tst_qwindow on Mac OS XBradley T. Hughes2012-06-062-6/+6
| | | | | | | | | | | | | | tst_QWindow::positioning() still fails on Mac OS X, and it does so in several places. Skip this test for now as it causes isActive() to fail as well. With positioning() QSKIP()ed, all the other test functions pass: Totals: 19 passed, 0 failed, 1 skipped ********* Finished testing of tst_QWindow ********* Task-number: QTBUG-23059 Change-Id: I58d036120c0121f515813cd20955ab3b82f81fe1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Cocoa: do not send multiple window activation eventsBradley T. Hughes2012-06-061-3/+0
| | | | | | | | | | | | | | When switching the active window within the same application, Cocoa sends us an NSWindowDidResignKeyNotification for the old activated window, then an NSWindowDidBecomeKeyNotificationfor the newly activated window. Our handling of this would first set Qt's active window to zero, then immediately reset it afterwards. Avoid this by checking the key window when handling the deactivation event, and don't set the active window to zero if a new window has become active. Task-number: QTBUG-24322 Change-Id: I8719fc501049eeaaebb75e9ea03261b2209458b6 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Added QScreen::setOrientationUpdateMask().Samuel Rødal2012-06-061-0/+13
| | | | | | | | | | | | It might be too expensive to always have an accelerometer sensor running, so introduce API so that the application has to explictly ask to get the orientation updates it's interested in. Change-Id: Ib7dc5ad8807718409f744ebef53f4476aa05175d Reviewed-by: Ian Monroe <ian.monroe@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Kevin Ottens <kevin.ottens.qnx@kdab.com>
* Use QPointer instead of QWeakPointer.Stephen Kelly2012-06-051-2/+2
| | | | | | | | The use of QWeakPointer for tracking QObject pointers is to be deprecated. Change-Id: If460ca7f515db77af24030152f4bd56e1a5fae7c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Marked expected failures in tst_qtextlayout on WindowsRohan McGovern2012-06-011-0/+14
| | | | | | Task-number: QTBUG-25924 Change-Id: I24a8ab6a695bf76f19e9082e1d8b11d8ec03fc4f Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>