summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Windows: Fix compilation of qdir test.Friedemann Kleint2011-12-011-1/+1
| | | | | | | Introduced by 3385fb91e1e55e1bfa1f78dfb8ce2e9f3fdaedef. Change-Id: If47a9874cccb7b64840e77b1f654ba8e1cf372e0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Improve Q_CONSTRUCTOR_FUNCTION and Q_DESTRUCTOR_FUNCTION macros.Jędrzej Nowacki2011-12-0110-49/+40
| | | | | | | | | | | | | By adding anonymous namespace and static linkage we are reducing visibility of implementation of these macros. This patch also fixes warning about a declared but unused variable which was issued by gcc 4.6 for Q_CONSTRUCTOR_FUNCTION. Change-Id: I2cb70ad4c93f6f77e5518420abcce6fd4cadccfa Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Fix image format use in cocoa pluginGunnar Sletta2011-12-012-2/+2
| | | | | | | | | | | | The screen should be opaque. It is used to create the default pixmap data which should be RGB32 on mac. The backing store uses premultiplied in the resize but initializes with non premultiplied. Unify this to all premultiplied Change-Id: I7d17d492fcff30b555a768da852ff9be0a9d96aa Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add QRawFont from data support to Mac font dbJiang Jiang2011-12-012-0/+24
| | | | | Change-Id: I02f1c4b35b9ed585e72aa4bad9b75d3c098f8e62 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Set supporting writingSystem correctlyJiang Jiang2011-12-011-1/+2
| | | | | Change-Id: I963aa7b69a48441619c5885c443ae2620fcc4e57 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Polish QWinEventNotifier.Friedemann Kleint2011-12-012-7/+6
| | | | | | | | Fix docs, remove redundant Q_DISABLE_COPY. Change-Id: I8398fb71bced5ac6f7eb8613cd2f8d10c325f056 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Added rotation animation to paintedwindow example.Samuel Rødal2011-12-013-23/+141
| | | | | | | This serves as a useful test case for the QScreen orientation API. Change-Id: I009ebd8b6d345453620420d84f3ff9d2d2e2663e Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* opengl: Do not crash when programGuard is a nullptrHolger Hans Peter Freyther2011-12-012-2/+2
| | | | | | | | The rest of the code is checking programGuard for nullptr, do it here as well to prevent a segmentation fault. Change-Id: I38a03f74d493b8f731157be1739707b39904f7ba Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Added QPA window system interface handler for logical DPI changes.Samuel Rødal2011-12-015-3/+37
| | | | | | | | Logical DPI is independent from geometry and physical DPI. Change-Id: Ice487f61e1bda9e6791e2adf6998ebf61cdbaef2 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Mark tst_qfilesystementry as private test on Windows.Rohan McGovern2011-12-011-0/+3
| | | | | | | On Windows (only), this test depends on some Q_AUTOTEST_EXPORT symbols. Change-Id: I3b2ef8dcd56b8860f02fc28f45823b889e794909 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* testlib: add QFINDTESTDATA macro for finding testdata filesRohan McGovern2011-12-0114-2/+386
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Automated tests often need to load some data from external files. Currently, a wide variety of approaches for this have been used in Qt autotests, including: - embed the source directory into the test binary at compile time, and find the testdata relative to that; this fails when the source tree is no longer available (e.g. when the tests are deployed to a device). - use a path relative to the current working directory, and trust that the caller always sets the current working directory such that the testdata can be found; this fails when the caller uses a different working directory than expected. - use a path relative to QCoreApplication::applicationDirPath(); this fails when source tree != build tree (since testdata is not automatically copied into the build tree). - compile the files into the binary using the Qt resource system; this should work, but does not allow for testing of code which genuinely needs external files. It seems that there is not a simple method for determining the testdata path which can be reliably used in all circumstances, so various tests have reinvented the testdata location method in different ways. Therefore, this is a good candidate for an addition to the testlib API. The current implementation of QFINDTESTDATA is able to find testdata in all three of (build tree, install tree, source tree), in that order. Change-Id: Ib2fed860723ccf437240da3b00db22dfe1a6b56c Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fixed installation of corelib testsRohan McGovern2011-12-0184-762/+497
| | | | | | | | | | | | | | | | | In .pro files, removed wince/symbian-specific DEPLOYMENT cases and replaced them with TESTDATA where appropriate. In .cpp files, removed SRCDIR and relative paths to testdata and replaced them with the QFINDTESTDATA macro where appropriate. Modified test helper apps/libs to install themselves under the test they relate to. This change allows corelib tests to be correctly installed, along with their testdata, via `make install'. Change-Id: I5e202e2f3b577af7e39072d5c9fe13e0ca125304 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* engineData should be cached solely based on QFontDefJiang Jiang2011-12-014-11/+11
| | | | | | | | | | | | | | | | | | | | Each QFontPrivate points to a QFontEngineData instance, which is essentially a mapping from different scripts to QFontEngines. Let's say we have QFont("Waree") and trying to use that for one text in Thai and another text in English, there should be only one QFontEngineData: [ QUnicodeTables::Common -> QFontEngineMulti(1), QUnicodeTables::Thai -> QFontEngineMulti(2) ]. If we cache QFontEngineData using QFontCache::Key (which includes QFontDef, script and screen) as the key, then we will create two QFontEngineData: [ QUnicodeTables::Common -> QFontEngineMulti(1) ] and [ QUnicodeTables::Thai -> QFontEngineMulti(2) ], so it will be pointless to have QFontEngineData at all. This bug was introduced in a 2005 refactoring (512f0e8c in history repo). Change-Id: I14677507e97682472cde9a0e1b594e903ec9e718 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fix compilation of Benchmark tests on Windows.Friedemann Kleint2011-12-014-5/+6
| | | | | | Change-Id: I92186f916792d110f22b23525b673ef006e19046 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Improve QString autotest.Jason McDonald2011-12-011-8/+7
| | | | | | | | | | | | | | | The QString autotest shares test data between the remove() and replace() tests because those functions are very similar. Unfortunately, when an integer overflow bug was found in remove() the regression test was not shared with replace(), which prevented the same integer overflow bug from being discovered in replace(). This commit improves the test by sharing the overflow test data between both functions, thus demonstrating the remaining bug. Task-number: QTBUG-22967 Change-Id: I2778249800f74799d890eefa9227ca8ddd8fbaa3 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Minor improvement to QByteArray autotestJason McDonald2011-12-011-28/+23
| | | | | | | | | | | | | | | | Rename the qUncompress test to make clear that the test only deals with uncompressing corrupted data and add a message making it clear that this test will produce some warning messages. Don't skip creating the test data, as that prevents the test output reporting exactly what is skipped. The expected output is the same for every row (an empty QByteArray), so don't bother storing that in the data table. Change-Id: I59f1cc91a941bcaadacb2a613dd5eca2564961c1 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Make QWinEventNotifier part of the public APIDebao Zhang2011-12-019-23/+110
| | | | | | | | | | | | QWinEventNotifier is an essential class if you're using native Windows Overlapped IO and need to convert it to Qt signals. However the header is marked private. Task-number: QTBUG-68 Change-Id: I22e9a84da97f969ddb82e9ba15e604a01abd80d0 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Merge QObject::tr*() and QCoreApplication::translate() overloadsBradley T. Hughes2011-11-305-61/+11
| | | | | | | | These were marked as TODO items for Qt 5. Do them now. (The TODO item was added when plural support was added back in the early Qt 4 days.) Change-Id: I3be50bc657582db730401103d691234695784340 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix QHostAddress::operator==(QHostAddress::SpecialAddress)Shane Kearns2011-11-302-0/+6
| | | | | | | | | QHostAddress(QHostAddress::Any) was not equal to QHostAddress::Any because only one of the operator== overloads was handling this. Task-number: QTBUG-22898 Change-Id: Ifd36947a50e8c36362b4e850fd8d5105ee0925ff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Made more QScreen properties NOTIFY and added average DPI properties.Samuel Rødal2011-11-303-14/+90
| | | | | | | | | The physicalDotsPerInch() is the average of the horizontal and vertical physical dots per inch, and likewise logicalDotsPerInch() is the average of the horizontal and vertical logical dots per inch. Change-Id: I18aa610dc9a63efe062f78c823ba29f90b2712f4 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Support for up to 6 arguments in the new connection syntaxOlivier Goffart2011-11-303-3/+140
| | | | | | | For compilations without variadic template support Change-Id: I78af4f6022ad7a0923e5c5788a34eb7d834f50f3 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Document the new connection syntaxOlivier Goffart2011-11-303-25/+42
| | | | | | | | It is already documented in the QObject API documentation, but Also update the overview Change-Id: I92f44a50222738530928e3f4e6e463b3210d3a29 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Mac Core Text font database for QPAJiang Jiang2011-11-308-11/+434
| | | | | | | | | | | | | | Add Core Text fontdatabase for Mac and use it as default. It also reenabled Core Text font engine for native font rendering on Mac, though it's not used in declarative UI (by default declarative will still use scenegraph, which will only use this font engine for retrieving font metrics and outlines). With the new fontdatabase it's now possible to load all the fonts installed in the system as well as adding application fonts. Change-Id: I0d2aa1420019adf6d0f70dd147a9d71b2684d3f1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fix sqlite driver memory eating due to close failureHonglei Zhang2011-11-302-0/+56
| | | | | | | | | | | | | | If an ongoing query is not finalized before close function is called, sqlite driver still tries to close the connection to sqlite. In this case, sqlite reports an error to sqlite driver which is not reported to the client. The failure in close causes connection to sqlite unclosed and memory is not freed. This fix tries to finalize all queries before close function is called. The close function should succeed. Task-number: QTBUG-16967 Change-Id: I2f10a2a9017446a9d44b693b00464a89625e3602 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Include qglobal.h first in qnsview.mm compilation unit.Zeno Albisser2011-11-302-0/+4
| | | | | | | | | | If cocoa headers are being included first, this messes up the defines MAC_OS_X_VERSION_MAX_ALLOWED and MAC_OS_X_VERSION_MIN_REQUIRED when compiling with clang. Change-Id: I07177d07a0ac7c5f7e72b04f42d6343e689e0d33 Reviewed-by: Ali Akhtarzada <ali.akhtarzada@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Fix casting. Casting is now done through the virtual interface_cast.Jan-Arve Saether2011-11-3018-104/+112
| | | | | | | | | Change interface_cast to return void* to avoid using virtual inheritance. Get rid of the magic Q_ACCESSIBLE_OBJECT macro. Change-Id: I94b824aef53f2ba657d39d406b387c8681d47ee4 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* mkspec win32-msvc2003 moved to unsupportedJoerg Bornemann2011-11-302-1/+1
| | | | | Change-Id: Idabdd08a033f3e77dae2de21b6544f57893abd59 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Moved integrationtests/* into other/Jo Asplin2011-11-30182-41/+38
| | | | | | | | | | | | | | | Currently there seems to be no precise definition of what an integrationtest is in the context of Qt testing. To avoid confusion, the tests under integrationtests/ are moved into other/ (which is effectively where we keep tests that don't clearly fit into any other category). Tests can be moved back into an integrationtests/ directory at a later point, should an unambiguous definition be established. Change-Id: I3bb289be2dc2aca11b51a8ce8fcc5942f06d6c5c Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Cleanup corelib autotestsJason McDonald2011-11-3021-130/+84
| | | | | | | | Remove references to the old bug tracker. The data from the old bug tracker is no longer accessible, so these markers are meaningless. Change-Id: Ib9d029d52b70fd0a512b9532d65f03763eabfe57 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Benchmark the new signal slot connection syntax.Olivier Goffart2011-11-301-18/+74
| | | | | | | | | | | | | - Added emition of a slot connected using the new syntax, as well as a functor - Replaced the old connect_disconnect_benchmark by a new one. The old one was of little interest as it tried to connect to every signal, producing a lot of similar results. The new test tests different ways of connecting and disconnecting Change-Id: I3c04c24027252308f8942bcd9562110104cdb4e9 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Fix Qt::QueuedConnection when signal has a return valueOlivier Goffart2011-11-302-2/+61
| | | | | | | | | | For queued connections, the args[0] is set to null as it make no sens to forward the return value to the signal. So we need to check in the operator, that the pointer is not null. (container.data is args[0]) Change-Id: I80bde66f1ec19de0f4962c80e5b2797d2819075c Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Fix a deadlock in QMetaType.Jędrzej Nowacki2011-11-291-8/+12
| | | | | | | | | | | QMetaType should unlock all mutexes guarding custom types data before calling an user code. Task-number: QTBUG-22930 Change-Id: I501d011d6cbd467d8f22402d668e84aa848061b8 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QByteArray: Fix MSVC warning.Friedemann Kleint2011-11-291-2/+2
| | | | | | | | Warning C4308: negative integral constant converted to unsigned type. Change-Id: Ibdb14ad2ceebd56715fda861151e92f6dc10f955 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Accessible debug stream: don't print details for invalid objectsFrederik Gladhorn2011-11-291-11/+15
| | | | | | | Print "invalid" instead of the details. Change-Id: I785a896b680fad9e9bb81769d9e3361542fbaafe Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Support Qt::UniqueConnection in the new connection syntaxOlivier Goffart2011-11-293-13/+124
| | | | | | | | | | This commit also improves the related documentation a bit. The test is copied from the test with the old syntax, but all the connection statement are changed to use the new syntax Change-Id: Ia5630ca4335b9f8ca6d724ae3c8750d6f0804d8e Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Reduce code dupplication in QObject::connectOlivier Goffart2011-11-291-29/+22
| | | | | | | | | Move from each implementation of QObject::connect to QObjectPrivate::addConnection the code that adds the QObjectPrivate::Connection* to the sender's list. Change-Id: I665af016d5e6673eb0e9c06965e5deed50454b28 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Initialize the return value of signalsOlivier Goffart2011-11-292-1/+237
| | | | | | | | | | Before, the constructor was called for complex objects, but POD were left unitinialized. Now, they are zero-initialized. Also add test for return values Change-Id: Iff9bf6687589d7b7395a71fb6f650ab8aa2b6bd1 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* QObject::disconnect with new syntaxOlivier Goffart2011-11-295-13/+249
| | | | | | | | | | | | | | | | | | | | | This add an overload to disconnect which is symetrical to the new syntax of connect. It is possible to diconnect connection like this: QObject::connect( sender, &Sender::valueChanged, receiver, &Receiver::updateValue ); QObject::disconnect( sender, &Sender::valueChanged, receiver, &Receiver::updateValue ); This overload only work with pointer to member function, and not static functions or functors. The test is copied from tst_QObject::disconnect(), just changed the syntax of the connection and disconnection Change-Id: Ia8f819100cb12098e32877522b97b732b1e676a8 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Install CMake config files from Qt.Stephen Kelly2011-11-2921-0/+947
| | | | | | | | | This includes a BSD licenced file Qt5CoreMacros.cmake which is adapted from Qt4Macros.cmake in the CMake source tree. Change-Id: I54326b808795535490a0489659b351a8da72cdbb Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* mkspec win32-borland moved to unsupportedJoerg Bornemann2011-11-292-0/+0
| | | | | Change-Id: Ie34157318733a700214ff68708db8127644f65ba Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Add deprecated headers support to syncqtKent Hansen2011-11-291-1/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | When renaming classes, or when moving classes from one module to another, it's useful to have a simple way of supporting the old API/location for some time. To this end, syncqt shall now recognize a "deprecatedheaders" section in sync.profile. It looks like this: %deprecatedheaders = ( "QtDeclarative" => { "qquickcanvas.h" => "QtQuick2/qquickcanvas.h", "qquickitem.h" => "QtQuick2/qquickitem.h", "QQuickCanvas" => "QtQuick2/QQuickCanvas", "QQuickItem" => "QtQuick2/QQuickItem", } ); In the above example, syncqt would generate a header called qquickcanvas.h for the QtDeclarative module; when included, this header will issue a warning and include <QtQuick2/qquickcanvas.h>. And so on, for the other entries. Deprecated headers are installed along with the module's normal headers. Change-Id: Ie2518b42275c2b2ff44216f07d376ccf5be6dc45 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Prevented Xlib sequence errors in xcb plugin.Samuel Rødal2011-11-291-0/+1
| | | | | | | | | | | | | | Prevent Xlib errors of the form "Xlib: sequence lost (0x2716a > 0x1717c) in reply type 0x11!" from being printed. We know the cause of these is because we're manually calling the XESetWireToEvent handlers since those are not handled by XCB, and this confuses Xlib since it's then seeing events with old sequence numbers. We simply set the sequence number to the latest sequence number and the errors go away. Change-Id: I2a9e7a7cfd0ba8692e43ce61f796a8189305e0d3 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
* Remove QPlatformPrinterSupport usageJohannes Zellner2011-11-292-9/+0
| | | | | | | QPlatformPrinterSupport seems to not exist anymore. Change-Id: I142ce99877620e0b678fd6693bc72257ca230e4f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Added screenChanged() signal and handle screen destruction in QWindow.Samuel Rødal2011-11-292-2/+28
| | | | | | | | It can be useful to get a signal when the QScreen changes, for example when having bindings to QScreen properties in QML. Change-Id: I919dd12c656485b28b393aec5eedac4c01593afc Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Make the default ssloptions testable.Richard Moore2011-11-293-2/+12
| | | | | | | | | Centralise the specification of the default ssloptions to make the code clearer and more testable. Change-Id: I4f4bae72736dd063ee4cd64c6375e82d0600a105 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Redefinition of QVariant::Type.Jędrzej Nowacki2011-11-291-60/+58
| | | | | | | | | | QVariant::Type is redundant, it copies QMetaType::Type enum. In long term it might be removed completely, but it wouldn't be a source compatible change. Change-Id: Ibe79ca0ab43918b4cf767cd7a5040f865abbf03f Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix linking of autotests on Windows.Friedemann Kleint2011-11-299-9/+9
| | | | | | | | | Partial revert of 94fc8750797ffd3ef867d0cdc7849492cfee2c23. All dependent modules need to be specified in the QT variable, except core and gui, which are there by default. Change-Id: Ie8ffed56de03a37da191772fa321ed162e44a50d Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fix compilation of qeasingcurve autotest on Windows.Friedemann Kleint2011-11-291-1/+1
| | | | | | | MSVC cannot decide on an overload for pow(). Change-Id: Ied3fbc0de403774d9f85738852cf671ce42cd1c1 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Temporarily disable Windows-specific QPrinter autotest.Friedemann Kleint2011-11-291-3/+3
| | | | | | | See QTBUG-22927. Change-Id: I6022d795bf893797c2ab1a91ffffa7b482109137 Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
* QtGui: Fix a crash in OpenGL on Windows.Friedemann Kleint2011-11-291-0/+4
| | | | | | | Add missing WINAPI calling convention for QOpenGLFunctions. Change-Id: I43827d801c5ecc3859d8d4ba0bb9bccc108880e7 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>