summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* remove obsolete DEPENDPATH assignmentsOswald Buddenhagen2012-12-175-5/+0
| | | | | | | | qmake now add CONFIG+=depend_includepath by default, making manual DEPENDPATH setup unnecessary. Change-Id: Ie57cf05c369e21b5b9e099b6ce9be4f75da1508f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* remove some unnecessary CONFIG additionsOswald Buddenhagen2012-12-178-9/+3
| | | | | | | | qt is already added by spec_pre.prf, warn_on and depend_includepath by default_pre.prf. Change-Id: Ic00e0ba496d698ed9659c476f2ca99fc0f86a093 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix possible crash in tst_QThread::quitLock() testPeter Kümmel2012-12-171-7/+9
| | | | | | | | Don't read member variable of deleted Job object. Change-Id: I71a6565c4932427e9cbab744c2e472b62ea98ca2 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Compile.Morten Johan Sørvig2012-12-172-5/+20
| | | | | | | Update painting code with retina support. Change-Id: Iebdfaaaaf98ed69f4ecb3cef5ca96b4e4ddb09dd Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Fix focusproxy-relayed crash in QGraphicsItem destructor.Andreas Aardal Hanssen2012-12-171-0/+2
| | | | | | | | | | | | | | | | | | | | Makes tst_qgraphicsitem::tst_focusProxyDeletion not crash. valgrind reported the error when running tst_qgraphicsitem. The crash was very real; when deleting an item that has another item as a focus proxy, the proxy still had a reference to the deleted item's focusProxy pointer. I'm not a huge fan of whitebox testing but thought this crash justifies a modification of the test to make it fail, instead of just passing silently with a warning only given by valgrind and friends. FTR the reason the test doesn't crash hard is that the memory is freed but not reused within the scope of the test. So the access to the pointer d_ptr->focusProxy succeeds, it just accesses memory that might as well have been reclaimed. But this is quite undefined... Task-number: QTBUG-28321 Change-Id: I2624631f5e5c2a8aa8bd4efe1fc128eba6c61f56 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Call QAccessible::updateAccessibility when caret moves in QTextEditJosé Millán Soto2012-12-161-0/+2
| | | | | Change-Id: I3b9e5d8e67b4928558b642a4d23aa60ae9dfde60 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Remove the timestamp info in genarated filesLiang Qi2012-12-15102-206/+103
| | | | | | | | | | | | | For moc, rcc and uic, then it's friendly for tools like ccache. ccache is using md5 to check file modification, but the different timestamp info will cause different md5 for same meaningful contents, it will disabled ccache. Updated the autotest for uic and rcc. Task-number: QTBUG-26589 Change-Id: I9f1dcf6cd826ad9603af6e183757bcd748c32bd1 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fixed invalid memory read in SSSE3 image blending code.Samuel Rødal2012-12-141-0/+20
| | | | | | | | | | We need to do bounds comparison on the actual offset we're going to use with _mm_load_si128 to read 16 bytes from memory (even though we won't use the trailing bytes in the end). Task-number: QTBUG-28324 Change-Id: Id0d6094da796ca67338d8ad225fa6b2f309bbe6e Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* SQL: Fix autotests for MinGWKai Koehne2012-12-142-0/+4
| | | | | | Change-Id: Ib05a120db16f65d9833663445c028971d4de3d29 Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Remove MSVC2012-optimization for the QMetaType-test.Friedemann Kleint2012-12-141-2/+7
| | | | | | | | | As otherwise compilation takes hours. Task-number: QTBUG-28611 Change-Id: I0ad73bf6ea4d7d4594e902c101bf52969daca341 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Add missing uuid lib for qaccessibility testJonathan Liu2012-12-141-1/+1
| | | | | | | | | | IID_IAccessible requires linking with the uuid lib. Change-Id: Ic34d5c9bdb6168df7d2447c8aebf1bc519e5f7cd Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* tst_QDBusXmlParser: make XML attribute order deterministicDavid Faure2012-12-141-0/+7
| | | | | | | | Avoid QHash randomization so that the order of the XML attributes is stable This was causing intermittent failures. Change-Id: I4cc0dba4b0c2ec36601f3b06fb17ff80005cc9fb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix empty window title regression, add application display name to window titleDavid Faure2012-12-141-15/+3
| | | | | | | | | | | | | | | This increases consistency a lot: all windows and dialogs from a Qt application will show the app display name in the caption, on Windows and X11. This helps identifying which app a dialog belongs to, which is especially useful when the dialog is very generic and shows up unexpectedly. For compatibility reasons, the app name is added to the caption only if setApplicationDisplayName() was called -- or if the caption would be completely empty. The standard Qt4 case (setWindowTitle + no display name) is unchanged. Change-Id: Ib284c62c1f4c0bc923e5bc2d10247d95e9aa76c1 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Mark QAbstractTextDocumentLayout test as insignificantEskil Abrahamsen Blomfeldt2012-12-141-1/+1
| | | | | | | | | | | This test fails on some setups and a pending critical change causes the existing bug to trigger in CI. To avoid blocking other changes because of this bug, it's been marked as insignificant until such a time when it can be fixed. Change-Id: Ide41f7b1c76209f9c05f95f996b2364d5dea5e67 Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Added missing detach() to QJsonObject::take()Denis Dzyubenko2012-12-131-1/+16
| | | | | | | | | We also need to detach() the taken value in case the compaction triggers and modifies the underlaying data. Change-Id: Idcdeba4236b8e208d107d41be2decbdfc5721300 Reviewed-by: Bjørn Erik Nilsen <post@bjoernen.com> Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
* Mark QGlyphRun and QStaticText tests as insignificant on LinuxEskil Abrahamsen Blomfeldt2012-12-132-0/+3
| | | | | | | | | | These tests have been failing on certain setups for a while, but some new critical changes causes the failure to trigger on the CI system as well. We mark them as insignificant until they can be fixed. Change-Id: I467e7030c55d6f23515275b4062c17068d2b688c Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* QMenu: Do not set snapToMouse if a caused-widget exists.Friedemann Kleint2012-12-121-4/+37
| | | | | | | | | | | | When clicking at the bottom-right corner of a menu in a menu bar, it appears at the wrong position. Add test and stabilize RTL-tests by making sure the layout direction is cleared should they fail. Task-number: QTBUG-28031 Task-number: QTBUG-2596 Change-Id: Ibc5ae916388753908e9f3ee98e8859faaa0c8723 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Accessible: Improve value interfacev5.0.0-rc2Frederik Gladhorn2012-12-121-0/+3
| | | | | | | | | The stepSize property was missing in Qt 4 and is a sensible addition to the value interface. Change-Id: I7571800d50ee7e4194c09c4db40300809a1ce45a Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* test: Skip tst_QMdiArea::nativeSubWindows() on Windows/ANGLE.Friedemann Kleint2012-12-121-1/+4
| | | | | | | | Task-number: QTBUG-28545 Change-Id: Ifa698b9efe38654c8f8fbcc184db5d176df7ba47 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* QGraphicsView - fix rubberband to expand on wheel eventThorbjørn Lund Martsum2012-12-111-7/+14
| | | | | | | | | | | | | | | | | In SHA 51914375b615ddcac711171ac31779fea01b4323 the rubberband selection was fixed, so it followed the scene-point on mousemove. However wheelEvent could move the view - but avoid update of the rubberband (that would not be updated until next mouse-move). This patch fixes that (and generally improves rubberband behavior) since QGraphicsViewPrivate::mouseMoveEventHandler is called by replayLastMouseEvent, which is called from various places, where we need to update the rubberband (e.g scrollContentsBy). Change-Id: I1b78c27edaaecea797a2319086d7a11d437d2bd3 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* remove bizarre jsc source referenceOswald Buddenhagen2012-12-111-2/+1
| | | | | | | | | it compiles just fine without it. if this was meant to inject a newer version of JSC than what is in QtScript, it can be redone without creating a bizarre hybrid. Change-Id: I61fe60bfa6a9bdb6423e8a7135250e332a5835ec Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* centralize headersclean testOswald Buddenhagen2012-12-114-166/+2
| | | | | | | | | so other modules can actually re-use the code without referencing qtbase sources. Change-Id: Id66f07b476e539273dd32455e7642a17d7e5d0ef Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* don't use testlib for headersclean testOswald Buddenhagen2012-12-113-68/+11
| | | | | | | | | this is a compile-only test, and it's not even marked as a testcase in the autotest system. Change-Id: I9b48ddad3c8e3e953d0e6fcfa010bab73289bc6f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* QMetaType: remember whether a type was registered with Q_DECLARE_METATYPEMarc Mutz2012-12-114-0/+161
| | | | | | | | | | | | | | | | | | | | There are two ways to register a type: using Q_DECLARE_METATYPE(T) and using qRegisterMetaType<T>("T"). Doing one thing in one translation unit and another thing in another TU constitutes an ODR violation, because the value of QMetaTypeId<T>::Defined will differ in the two TUs. By adding the information whether a type was declared with Q_DECLARE_METATYPE to the typeFlags(), such a use will trigger the existing binary-incompatibility failure that checks for equality of the incoming type flags with the stored ones (if any). I had to encode the type as a defaulted function argument in order to avoid the linker merging instantiations of the function templates and therefore rendering the detection moot. Change-Id: I82017caf300458b411cc8ac2f6653536fac64117 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* test: Remove CONFIG += testcase from manual testsSergio Ahumada2012-12-117-7/+0
| | | | | | | | Manual tests are not supposed to be run by "make check" Change-Id: I0539b94f5286e89ddad2edf487d4b0d82fc2f374 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Simo Fält <simo.falt@digia.com>
* Generate the introspection string during parsingKevin Ottens2012-12-112-29/+72
| | | | | | | | | | | Commit 0696071316b3dacb8d1ca15a269e4f4215642b9d moved away from QDom but also lost the ability to fill the introspection field of the created QDBusIntrospection::Interface instances. This commit now generate the string again as we proceed with the QXmlStreamReader based parsing. Task-number: QTBUG-26668 Change-Id: I8f406e1f4e9d3e667a8557db69da36cac369ba4f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* SQL: Change in QSqlResultPrivate::positionalToNamedBinding()Caroline Chao2012-12-104-0/+177
| | | | | | | | | | | | | | | | | | | | | | | | With the change cff46983a, prepared queries can now store a named paramater to be used more than once. When using ?, thus positional binding, there is no named parameter, thus there is no need to store it. When prepare is called from a query with ?, it currently causes an error when the feature QSqlDriver::NamedPlaceholders is true. Because holders values are called while holders is actually empty. QSqlDriver::NamedPlaceholders is true for QOCI plugin only but the problem is independant of the plugin used. Adding a test case with a test driver to make the test runnable without Oracle installed. Change-Id: I6d7491f7e09a7b62d2d4d216b40fedd67e927e27 Reviewed-by: Matt Newell <newellm@blur.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Move a Q_DECLARE_METATYPE higher up in the file.Stephen Kelly2012-12-101-1/+2
| | | | | | | Having it low in the file causes ODR violations. Change-Id: I6267c7c1b043e77b251a88cb8940a9f063160891 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Removed requestOrientation() API from QWindow.Samuel Rødal2012-12-061-4/+0
| | | | | | | | | | | There are no proper implementations of this API, and as it stands it only acts to confuse anyone who stumbles across it. It will be better to revisit the full cross platform orientation API story for 5.1. Change-Id: Iff7054a32c6e5e4ad0cc0493a5e4ecc35a6ec4f3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Don't pass invalid strings to strcmp()Peter Kümmel2012-12-061-1/+1
| | | | | | | The address behind a string doesn't point to a string. Change-Id: Ic54f652ae781fea278f60cc49d219c1c610ba29f Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* QPluginLoader: fix loading of plugins with a relative file nameDavid Faure2012-12-044-6/+30
| | | | | | | | | | | This makes QT_PLUGIN_PATH / QCoreApplication::libraryPaths() actually work, as a search path for plugins, when apps look for a specific plugin by name. To make it possible to write portable code (unlike the current QPluginLoader unittest), let QPluginLoader figure out the extension, too. Change-Id: I895d597d7cb05ded268734bc5f313f32d8d12cb9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix some typos in QProcess and QSslSocket unit tests.Stephen Kelly2012-12-042-3/+2
| | | | | | | | The QSslSocket one is both wrong and redundant as there is a Q_DECLARE_METATYPE for it already. Change-Id: I63d065abfb3d0e3d82a8b1f29a6752b7676db847 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* remove pointless QT.<module>.sources referencesOswald Buddenhagen2012-12-044-5/+5
| | | | | | | | there is no point to use this for in-module references. cleaning it out in an attempt to purge the constants entirely. Change-Id: I1da4d70e3778257dd43eda0bdfc71eaec1124732 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* remove pointless zlib includesOswald Buddenhagen2012-12-042-2/+0
| | | | | Change-Id: I352f6f9626c012c39ac97163ac83b3e24a9e9c7a Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* properly syncqt-ize harfbuzz headersOswald Buddenhagen2012-12-046-8/+1
| | | | | | | | | we were already installing them into QtCore/private, so turn them into proper private headers to start with. this cleans up our project files. Change-Id: I0795f79e03b60b5854de9e4dc339e9b5a5e6fd87 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* qregexp benchmark needs exceptionsOswald Buddenhagen2012-12-041-1/+1
| | | | | Change-Id: I3833345a09e49899c256b4410783b6a08111c4a0 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Clear focus of GraphicsItem focus scopes and their children.Andrew den Exter2012-12-041-0/+39
| | | | | | | | | | A focus scope has effective focus if one of its children is the focus item, clearFocus() should remove effective focus from an item and its children not just from the focus item. Task-number: QTBUG-28328 Change-Id: I62a292eff000151e50b2f5221e22f326a380fc3a Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Stop using the name "Trolltech" in QSettingsSergio Ahumada2012-12-036-16/+16
| | | | | | | | | Also change Trolltech for QtProject in other places Task-number: QTBUG-23269 Change-Id: Ie4e344f23cab77c575562d18b481b3369ce30491 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [QTBUG-27420] Make Q{Box,Grid,Form}Layout::takeAt() unparent a nested layoutMarc Mutz2012-12-023-0/+70
| | | | | | | | | | | QStackedLayout doesn't have support for QLayout, only QWidget, so the issue doesn't arise there. Reported-by: Johannes Schaub Task-number: QTBUG-27420 Change-Id: I71f8d10a036918c16d8f8c9197a2ec61cd76cf01 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix wrong string lengthPeter Kümmel2012-12-011-2/+2
| | | | | Change-Id: Ic10aed6fc59d2518583caf78848711bdc97b4665 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Improve auto-test of QFile.Friedemann Kleint2012-12-011-158/+166
| | | | | | | | | | | | | Execute the test in a temporary directory, purge remaining files except the special readonly-files in cleanup(). Avoid repeated invocation of QFINDTESTDATA() by assigning to member variables. Do more checks in rename(), check on contents of file. Generally, use more QVERIFY2, print error messages. Task-number: QTBUG-3570 Change-Id: Ibd0e11a361208a716ea3efbcca76adeda70e061a Reviewed-by: David Faure (KDE) <faure@kde.org>
* Basic high-dpi "retina" support for Qt 5.Morten Johan Sørvig2012-12-017-3/+400
| | | | | | | | | | | | | | | | | | | | | | | | | | Bring Qt 5 on par with Qt 4, prepare for more comprehensive support later on. Introduce device independent pixels (dips), device pixels, and devicePixelRatio. Add high-dpi support to QPainter, QGLWidget, the cocoa platform plugin, mac and fusion styles. Dips are similar to CSS pixels, Apple points and Android density-independent pixels. Device pixels are pixels in the backing store/physical pixels on screen. devicePixelRatio is the ratio between them, which is 1.0 on standard displays and 2.0 on "retina" displays. New API: QImage::devicePixelRatio() and setDevicePixelRatio() QPixmap::devicePixelRatio() and setDevicePixelRatio() QWindow::devicePixelRatio() QScreen::devicePixelRatio() QGuiApplicaiton::devicePixelRatio() Change-Id: If98c3ca9bfdf0e1bdbcf7574cd5b912c9ff63856 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* QWidget windows have fullscreen button by default; manual test for itShawn Rutledge2012-12-013-6/+13
| | | | | | | | | | It's again possible for QWindows and widget windows to go into fullscreen mode on the Mac. Change-Id: I7b304a135838394ef0392f89be4f225f2949fad3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* QGraphicsView - fix rubberband to stay right on scrollThorbjørn Lund Martsum2012-12-012-0/+103
| | | | | | | | | | | | | | We should consider the scene-position when we are expanding moving a rubberband. If the user does some auto-scroll (Qt should support that itself, but that is another matter) then the rubberband should not keep the (old) local position to calculate the rubberband extension, but instead use the scene-position that was actually clicked. Change-Id: I04a2df6a1edae8b3587e1ac2104c7fe4ccfb7762 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Added explicit threading API to QtOpenGL.Samuel Rødal2012-11-302-17/+91
| | | | | | | | | | | | | | | | | | | | | | | | Since QtOpenGL/QGLContext is implemented in terms of QtGui/QOpenGLContext which has stricter requirements about how it's supposed to be used, we need to apply these requirements to QGLContext as well. This change adds QGLContext::moveToThread(QThread *) and documents it as a necessity for making a context current on another thread. Also introduces QGLPixelbuffer::context() to access the QGLContext of a pixelbuffer, and made QGLWidget::context() return a non-const QGLContext, since there's no good reason why it shouldn't, and it leads to less const_cast clutter. We could have introduced a backdoor in QOpenGLContext instead, making it loosen its requirements, but that would have made it harder / impossible to fully support threaded OpenGL in all the platforms. Task-number: QTBUG-22560 Change-Id: Ibb6f65f342e7c963e80cc42ab5664c5f1cab30b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Fix connecting to a functor with 3 argumentsOlivier Goffart2012-11-301-1/+52
| | | | | | | Task-number: QTBUG-28285 Change-Id: I07bd870c093482035728aa783d0ecbc8aa8670d2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Style auto tests: kill QWindowsStyle dependenciesJ-P Nurmi2012-11-282-46/+51
| | | | | Change-Id: I135fe2b0aae81c73c1cca6272f71db07ecb3fa6b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* tst_QLayout: use QStyleFactory instead of QWindowsStyleJ-P Nurmi2012-11-281-2/+2
| | | | | | | QWindowsStyle is soon to become an internal class. Change-Id: I25ac344d349d07db94e2fbc9ef943e09c399f913 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* tst_QWidget: use QStyleFactory instead of QWindowsStyleJ-P Nurmi2012-11-281-8/+8
| | | | | | | QWindowsStyle is soon to become an internal class. Change-Id: I75424d6fc2f36fb0faace86c960d78a4ba305658 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* GV auto tests: kill QWindowsStyle dependenciesJ-P Nurmi2012-11-275-26/+19
| | | | | Change-Id: I6236b7ca23897c5075bef21f5e62fe01f4cfc611 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>