summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Refactor QAccessibleActionInterface.Frederik Gladhorn2011-10-1918-801/+409
| | | | | | | Some refinements done by Jan-Arve Sæther. Change-Id: I99195b3c7273316cfa9c46e451924bbcfddd11a9 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Introduce Q_STATIC_ASSERTJędrzej Nowacki2011-10-192-0/+77
| | | | | | | | | Example of message of failed assert (gcc 4.6, file tst_qglobal.cpp:300): tst_qglobal.cpp:300:92: error: invalid application of ‘sizeof’ to incomplete type ‘QStaticAssertFailure<false>’ Change-Id: Ic1798094f718eaad388d754034115aafbbb6bd5e Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Metatype: Silence MSVC warnings about unused variables.Friedemann Kleint2011-10-191-6/+6
| | | | | | | Turn around if's. Change-Id: Ica6f7f54098a567816ce3918f6fe5d8d2c072e01 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Widgets: Fix a startup crash in QSplashScreen (Linguist).Friedemann Kleint2011-10-191-2/+3
| | | | | Change-Id: I38f5920fb62277f97e9b3b45651527c2475556ac Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix "may be used uninitialized" compiler warning.Morten Sorvig2011-10-191-1/+1
| | | | | Change-Id: I96e9dbf0f3df527785e03661b9c25bd2d214cd44 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Add benchmarks for QMetaType::construct()Kent Hansen2011-10-192-0/+98
| | | | | Change-Id: Ia5883c5712e5d634b0e62189b639209eb3d5cd93 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Provide API for "placement new" construction of meta-typesKent Hansen2011-10-196-21/+827
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By making it possible to specify the place in memory where a type should be constructed, any meta-type can be allocated on the stack, for example. In the QML/JS QObject binding, this makes it possible to call slots and access properties from JavaScript without having to perform any mallocs (e.g. due to QVariant creation) in the C++ <--> JS value conversion, in the best case. In addition to QMetaType::construct() and QMetaType::destruct(), this change introduces QMetaType::typeSize(), which returns the size of a type in bytes. This can be used to prepare a suitable buffer for constructing a type using construct(). Benchmarks indicate that in-place construction is 2-5x faster than normal construction for core and GUI types on linux-g++. Note that there is already a QMetaType::construct() function in Qt 4, which has been renamed to QMetaType::create() in Qt 5. In order to avoid existing usages of construct() in user code to call the Qt 5 construct() (when they really meant to call create()), the third argument ("copy") of construct() is made mandatory. Hence, calls to QMetaType::construct() written for Qt 4 will cause a compile error when compiled with Qt 5, and the user must adapt his code. Task-number: QTBUG-12574 Change-Id: I836f06f6ee1c1c3edbd199a03424c78c942bdd3e Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Widgets: Remove Symbian-specific code.Friedemann Kleint2011-10-1989-21772/+2
| | | | | | | Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Change-Id: Ieee43d6650f5b1968fc7d77e618096701ffef941 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Destroy generic plugins on exit.Laszlo Agocs2011-10-192-0/+9
| | | | | Change-Id: I9037cabae74f9a7d8743630d0f530aaa1593266f Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Sanitize paths in selftest data.Jason McDonald2011-10-1950-174/+174
| | | | | | | | Use a standard path for filenames that appear in the selftest's expected test data. This will make future patches smaller. Change-Id: I04b2e739d261f80d20b834e5b33c5b6e88d26379 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove skipglobal testlib selftest.Jason McDonald2011-10-199-172/+1
| | | | | | | | This test duplicates the skipinitdata selftest and has slightly less informative output. Change-Id: Ifd40e3ef8030059ec8fa0089ce5b2a994624abeb Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove DEPENDS_ON from qtestlib API.Jason McDonald2011-10-1921-655/+3
| | | | | | | | | | The DEPENDS_ON macro didn't do anything and has misled many users to think that they can write test functions that depend on other test functions. Task-number: QTBUG-21851 Change-Id: Ibe65b2d5d88bb81b6a0ebbe0b220f7d409a1446c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Move QTRY_VERIFY/QTRY_COMPARE into testlib.Jason McDonald2011-10-1974-190/+66
| | | | | | | | These functions have lived in tests/shared/util.h for a long time, but they really belong in qtestlib. Change-Id: I60d569d002dea220b51563931d8b7aa77a20b98b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove QTEST_NOOP_MAIN from qtestlib API.Jason McDonald2011-10-193-30/+0
| | | | | | | | | | | | | | This macro is no longer used in Qt's tests and encourages writing tests in a way that makes test reporting less accurate -- remove it to prevent further misuse. If a test can be determined at compile-time to be inapplicable, it should be omitted from the build via .pro file logic. If that is not possible (e.g. there is no suitable qmake variable), the test's initTestCase() function should call QSKIP to skip the entire test with a meaningful explanation. Task-number: QTBUG-21851 Change-Id: Icacc8c5567a700191b6ef3fa94ee52ede94c5b34 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Prefer QSKIP to QTEST_NOOP_MAIN.Jason McDonald2011-10-191-17/+18
| | | | | | | | | Use QSKIP instead of QTEST_NOOP_MAIN so that the user receives a clear indication that this test won't be testing anything until it gets fixed for Qt5. Change-Id: I4fa73883f58d8d4a533a7c21ecd4dd5b3c55b174 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove Sensors and Location related macros/defines from qglobal.h.alex2011-10-191-26/+0
| | | | | | | | | This reduces interdependencies between QtCore and other modules. Individual modules handle this by themselves. Change-Id: I82cb96326b8ccb0b6acb88d899ed811f80f47ec1 Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Prefer QSKIP to QTEST_NOOP_MAIN.Jason McDonald2011-10-192-10/+16
| | | | | | | | Use QSKIP instead of QTEST_NOOP_MAIN so that the user receives a clear indication that this test isn't testing anything when not built for X11. Change-Id: I9e9ef8fe738c06eb86f2ce398f6a515bf17e220a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Cocoa: Add initial accessibility implementation.Morten Sorvig2011-10-1920-4/+2096
| | | | | | | | | | | | | | See qcocoaaccessiblity.h for details. For now only the first level of the hierarchy is made accessible. Also add tools/accessibilityinspector which is an utility for inspecting and debugging the Qt accessibility tree. Change-Id: Iff520bec26b3761feb0c2e00471feb379daaa735 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Prefer QSKIP to QTEST_NOOP_MAIN.Jason McDonald2011-10-191-35/+19
| | | | | | | | | | | | | There is no way for a .pro file to know if QProcess is in the Qt build, so the QProcess autotest cannot be omitted from the build if QProcess is not available. Because of this limitation, the test was using QTEST_NOOP_MAIN when QProcess was not available, making the test appear to pass. This commit changes QTEST_NOOP_MAIN to QSKIP, so that the user receives a clear indication that the test isn't testing anything when QProcess is not available. Change-Id: I79f667b17ff98dfc47eb61fb977365abef8883fb Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Windows platform: Improve Open GL.Friedemann Kleint2011-10-189-71/+155
| | | | | | | | | | | | | - Pass on version to ARB. - Query obtained ARB format more fine-grained depending on version, indicate failures - Fix GDI contexts and introduce gl=gdi to activate the GDI functionality - Adapt window flags after setParent if top level state changes - Remove unused OpenGL flag from integration/context Change-Id: I59ca74ee1fa727bd2bcfd605b3907bc82cca18fa Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QtBase examples: Remove Maemo/Symbian-specific code.Friedemann Kleint2011-10-18501-4019/+26
| | | | | | | | | | | | | | | - Maemo/Symbian are no longer supported and QWidget-based examples are no longer supposed to run on mobile platforms, so, remove any Maemo/Symbian or mobile-specific code from source files and profiles. - Remove Maemo/Symbian vibration examples. - Change Q_WS_MAC/WIN to Q_OS_MAC/WIN where appropriate. Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Change-Id: I488a0adadb98934567aa6416206a80465c9c3a81 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QSurfaceFormat: Use version in comparison and debug, fix setter.Friedemann Kleint2011-10-181-5/+13
| | | | | Change-Id: Id123ca9366b97a172e08a4608ccdffafb7caaf09 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Make some more methods privateLars Knoll2011-10-181-9/+7
| | | | | Change-Id: I0644ee287201866596dccd96e443e7e62fd89360 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* make fromWCharArray() and toWCharArray() inlinedKonstantin Ritt2011-10-182-27/+25
| | | | | | | | | because we may have the size of wchar_t varying, we need to know which is the correct encoding: UTF-16 or UCS-4 Merge-request: 49 Change-Id: Ib5a1e7dea51d0cd8394e686634a36aae984fa072 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Move QShortcutMap to QtGuiLars Knoll2011-10-188-11/+5
| | | | | | | | | QShortcut stays in QtWidgets, what we need in QtGui is only the basic functionality of the shortcut map. QML can integrate directly with the map where required. Change-Id: Ie39e9242f24cbebf824e5c3d2926880325ea4187 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Move the widget dependent code away from the shortcutmapLars Knoll2011-10-184-225/+218
| | | | | | | | | qshortcut.cpp now has the honour of hosting the code that detects whether the a given shortcutcontext is actually valid. Change-Id: I59d299bbd2fd62fca074a51d96e85b81a50ae73c Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Do not call swapBuffers when surfaceHandle is NULL.Laszlo Agocs2011-10-181-1/+3
| | | | | | | | | | Calling swapBuffers with the surfaceHandle of 0 returned by QWindow during application exit causes a crash when using GLX. The patch avoids swapBuffer calls to platformGLContext when there is no surface handle anymore. Change-Id: I09c5bbafd4e7af6648ca54a58ed0267d0a2f343d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Include threads docs from qtdoc, rename old threads to threads-basics.Casper van Donderen2011-10-182-494/+1199
| | | | | Change-Id: Ie603582809e61c2e46566a46cfc81fead4168aad Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Remove stale documentation.Casper van Donderen2011-10-1821-565/+31
| | | | | Change-Id: I85139e0334b648bee0d18129cef9387dcc6c3222 Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Remove Q_WS_ in text codecs.Friedemann Kleint2011-10-1812-34/+34
| | | | | Change-Id: Id27d82f91a21107f31f73d7f2920629a512dc2a1 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* OpenGL: Remove Q_WS_ defines.Friedemann Kleint2011-10-186-76/+0
| | | | | Change-Id: I351a910968ff7f46550af5b3742959cb0cab540d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Prefer QSKIP to QTEST_NOOP_MAIN.Jason McDonald2011-10-183-91/+42
| | | | | | | | | Use QSKIP instead of QTEST_NOOP_MAIN so that the user receives a clear indication that these tests aren't testing anything when the required defines are not defined. Change-Id: I977e24205a1bb7787ecddbdb1ebbeda1f2ded321 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Prefer QSKIP to QTEST_NOOP_MAIN.Jason McDonald2011-10-182-16/+26
| | | | | | | | | Use QSKIP instead of QTEST_NOOP_MAIN so that the user receives a clear indication that these tests aren't testing anything when the required defines are not defined. Change-Id: I8508f50c6264fafa836090c5d6ffa6ce02dda102 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Reduce the runtime of tst_selftestsRohan McGovern2011-10-181-0/+6
| | | | | | | | | | | The addition of testing for multiple loggers greatly increased the total runtime of this test, in fact making it the slowest testcase in Qt. Fortunately this is only due to a couple of slow subtests whose behavior is unlikely to be affected by the loggers. Change it to run these slow subtests just for a couple of loggers, instead of all the combinations. Change-Id: Ie90f6c0ca29470ed6a7c4e2e185f852602a2d162 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fix TouchEnd events not being received on Harmattan.Jocelyn Turcotte2011-10-171-2/+3
| | | | | | | | | TouchEnd is sent when all the touch points have a TouchPointReleased state, and we would clear all touch points on finger release before sending them up the stack. Change-Id: I14e7347090ce9a1865743202f6926ae2fc035bd3 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* Add multipoint touch support for Harmattan to the xcb platform plugin.Jocelyn Turcotte2011-10-178-1/+517
| | | | | | | | | | | Proper multipoint touch support was only introduced in XInput2.1, but Harmattan uses a tweaked version of XInput2.0 that transfers touch data through mouse events. This patch applies on the xcb plugin a subset of the changes that were applied on the Qt 4.7 that was shipped to Harmattan to get similar multipoint touch support. Change-Id: Ifda7ad40de29d7ded1443d4f78b3ec3807303a9f Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* Fix TouchPoint::lastPos() after TouchPointStationary only events.Jocelyn Turcotte2011-10-171-1/+5
| | | | | | | | | | | | | | | | | lastPos is copied from the last point's position, and the position has to be resolved according the the receiving item's transformation. However, if a QTouchEvent contains only stationary points, it won't be delivered, it's pos()/rect() will still be uninitialized, and the touch point of the next event will be delivered with the uninitialized pos() as it's lastPos(). This patch makes sure that the lastPos() won't be filled with a previous incomplete stationary point state even if the platform is sending us stationary-point-only touch events. Change-Id: Ia7d10423c8fbe78348edbb0a89fbfa66d1b8b5d1 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Fix scaled text rendering with the raster paint engine & FreeTypeSimon Hausmann2011-10-171-0/+7
| | | | | | | | | | | | | | | Before commit 070d9c00c488a5ee6811f04170cf488ead79bf80, the raster paint engine used to call loadGlyphs() on the FT engine, which ensures that the glyphs are loaded and (more importantly) that the correct transformation matrix is applied on the freetype face. After commit 070d9c0 lockedAlphaMapForGlyph is called for each glyph, which unfortunately doesn't respect the provided transformation matrix. Therefore when drawing scaled text, it was never actually scaled. This patch applies the combination of the fontengine transform and the requested transform on the freetype face actually used, similarly to loadGlyphs. Change-Id: I0956a9e71784582db6bb90475a001a63800773f4 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Add documentation from qtdoc for modularization of docs.Casper van Donderen2011-10-173-0/+913
| | | | | Change-Id: Ic9c4502f19ff077d8416ccb890678e64490349ca Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Use a QFunctionPointer for getProcAddress()Casper van Donderen2011-10-172-10/+3
| | | | | | | | qdoc does not understand the void (*) syntax, there is a typedef to QFunctionPointer that does work. Change-Id: Idbe9d43d00f8676304d088d72795b6ddb7e4ee72 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Replace Q_WS_WIN by Q_OS_WIN in uic/network.Friedemann Kleint2011-10-173-7/+3
| | | | | Change-Id: I592936859f6932fcd1aa47f0617ba9f8efee86dc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Prefer QSKIP to QTEST_NOOP_MAIN.Jason McDonald2011-10-172-9/+25
| | | | | | | | | | | | | There is no way for a .pro file to know if exceptions are supported in the Qt build, so these tests cannot be omitted from the build if exceptions are not supported. Because of this limitation, these tests were using QTEST_NOOP_MAIN when exceptions were not available, making the tests appear to pass. This commit changes QTEST_NOOP_MAIN to QSKIP, so that the user receives a clear indication that the test isn't testing anything when exceptions are not available. Change-Id: I2facf08ba69e6f985e2da50dd36ad2658246b22e Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add a warning and a return value to xcb's createGLPlatformContextLaszlo Agocs2011-10-171-0/+2
| | | | | | | | | | | | | | | | | There was no value returned previously when none of GLX, EGL, DRI was enabled. Now we show a warning message and return null (resulting in a crash). Previously not returning a value resulted in obscure crashes with strange-looking call stacks, now it will be clear what the problem is. This is particularly important because not having libx11-xcb-dev installed results in silently disabled xlib support which in turn disallows the usage of glx too. The result is an obscure crash in any GL (e.g. QML2) app. Now there will be a proper warning message at least. Change-Id: I15cf3a6c16ca373d4ada7abb6d3c8f7e30c1e03d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Do not fail user time window creation when xcb is using xlibLaszlo Agocs2011-10-172-2/+8
| | | | | | | | | | | | | | | | | | | QXcbWindow::updateNetWmUserTime() creates a new window using the actual window as its parent. This operation was failing when Xlib usage and GLX (or EGL) was enabled because in these cases the real window was created with a different visual using XCreateWindow. For the user time window however we were passing the xcb_screen's root_visual always, and this cannot work when Xlib+GLX/EGL is in use, resulting in a BAD_MATCH (followed by some annoying flicker on the screen on Ubuntu at least, or a full log off (X crash?) on Fedora). The patch saves the visual id used to create the actual window and passes that when creating the user time window. This way the creation of the user time window succeeds with Xlib+GLX too. Change-Id: If3925d9ac1670d385dcc7c2b475c196908569f06 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove qcopchannel autotest.Jason McDonald2011-10-177-265/+0
| | | | | | | The QCopChannel class was removed during Qt5 refactoring. Change-Id: I62914eca1db65c680d90233ce9dad5d891890c4a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Don't build empty tests.Jason McDonald2011-10-173-12/+5
| | | | | | | | | The qgraphicswidget and qgraphicsproxywidget tests are empty if Qt is built without the cleanlooks style, so don't build the tests in that case. Change-Id: I2308e723a9b0abcc3e95b32a562fcb02afe0444d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Only build exceptionsafety_objects test if usefulJason McDonald2011-10-172-5/+4
| | | | | | | | The test appears to be applicable only if building with g++, and even then the test is broken. Change-Id: I9eefb13325a10ec295a59c2bd1111e3c324ff94f Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove Mac accessibility autotest.Jason McDonald2011-10-1718-852/+0
| | | | | | | | This test was empty, the logic having been recently removed because it only applied to the Carbon UI, which will not be supported by Qt5. Change-Id: I2b5d6aba6be4a51eadbac3ca9d19d1a68c4fc1ab Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Tidy qwizard autotest .pro fileJason McDonald2011-10-171-7/+0
| | | | | | | Remove commented out sources and redundant Symbian-specific directive. Change-Id: I7637b4dfc186eeac7f314faf13aa97e8ef1990de Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove QtMD5 autotest.Jason McDonald2011-10-175-117/+0
| | | | | | | | | This test is only valid with obsolete Qt Solutions packages. Any Qt Solutions that are still of value need to be rewritten as Qt5 addons and will be delivered with their own unit tests. Change-Id: I099ef816655cc7de13715f5a4e5f4a06099df2d5 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>