summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Remove shared_empty and unsharable_empty from APIJoão Abecasis2012-01-061-6/+12
| | | | | | | | | | | | | | They still exist and help avoid allocation of "empty" array headers, but they're no longer part of the public API, thus reducing relocatable symbols and relocations in inline code. This means an extra non-inline call on QArrayDataPointer::clear and setSharable operations, which are (expensive) detaching operations, anyway. Change-Id: Iea804e5ddc8af55ebc0951ca17a7a4e8401abc55 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add setSharable support in QArrayData stackJoão Abecasis2012-01-061-6/+146
| | | | | | | | | | | | | | | Making use of the same feature added in RefCount. To keep with the intention of avoiding the allocation of "empty" array headers, this introduces an unsharable_empty, which allows users to maintain the "unsharable bit" on empty containers, without imposing any actual allocations. (Before anyone asks, there is no point to a zero-sized capacity-reserved container so no other combinations are needed for now.) Change-Id: Icaa40ac3100ad954fdc20dee0c991861136a5b19 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Adding detach to QArrayDataPointerJoão Abecasis2012-01-062-6/+56
| | | | | | | | Detaching operations added to SimpleVector Change-Id: I5f549582cf579569f08cb8d53a6d12fe32b862e6 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add test for QVector::setSharableJoão Abecasis2012-01-051-0/+94
| | | | | | Change-Id: Id31761bfb642d4ce515768c1ffe1e3088d883353 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Ensure shared_null(s) are statically initialized on VS 2010João Abecasis2012-01-051-0/+17
| | | | | | | | | | | | | | | | | | | | | | | This removes const qualification on data members of QConst*Data, which was subjecting QString's and QByteArray's shared_null to the "order of static initialization fiasco", with up-to-date VS 2010. Furthermore, the const qualification in the places where it was removed had little meaning and no value. It was unnecessary. As such, "Const" was removed from the struct's names and "Static" used in its place, to imply their usefulness in supporting statically-initialized fixed-size (string and byte) containers. A test case was added to QArrayData as that is meant to replace both QStringData and QByteArrayData in the near future. VS issue reported at: https://connect.microsoft.com/VisualStudio/feedback/details/716461 Change-Id: I3d86f2a387a68f359bb3d8f4d10cf3da51c6ecf7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Add support for setSharable in RefCountJoão Abecasis2012-01-052-5/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A reference count of 0 (zero) would never change. RefCount::deref to zero would return false (resource should be freed), subsequent calls on the same state would return true and not change state. While safe from RefCount's side, calling deref on a reference count of zero potentially indicated a dangling reference. With this change, a reference count of 0 is now abused to imply a non-sharable instance (cf. QVector::setSharable). This instance is to be deleted upon deref(), as the data is not shared and has a single owner. In practice, this means an (intentional) change in behaviour in that deref'ing zero still won't change state, but will return false, turning previous access to dangling references into double free errors. Users of RefCount wanting to support non-sharable instances are required to check the return of RefCount::ref() and use RefCount::isShared() to determine whether to detach (instead of directly checking count == 1). New functions are introduced to determine whether RefCount indicates a "Static" (permanent, typically read-only) or "Sharable" instance and whether the instance is currently "Shared" and requires detaching prior to accepting modifications.. This change formalizes -1 as the value used to flag persistent, read-only instances, no longer reserving the full negative domain. The concrete value is part of the ABI, but not of the API. (isStatic and Q_REFCOUNT_INITIALIZE_STATIC are part of the API, instead) Change-Id: I9a63c844155319bef0411e02b47f9d92476afefe Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Retire the generic Q_REFCOUNT_INITIALIZER macroJoão Abecasis2012-01-041-3/+3
| | | | | | | | | | | | | This was only being used to initialize static read-only RefCount instances, where the value is hard-wired to -1. Instead of allowing initialization with arbitrary values (which for a reference count can be error prone) the intent of the macro is made explicit with its replacement Q_REFCOUNT_INITIALIZE_STATIC. Change-Id: I5b0f3f1eb58c3d010e49e9259ff4d06cbab2fd35 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Get rid of assignment operators in RefCountJoão Abecasis2012-01-041-1/+1
| | | | | | | | | | | | , and make it strictly a POD struct. Since this operator was only being used to set the initial (owned) value of the reference count, the name of the function introduced here to replace it makes that use case explicit. Change-Id: I2feadd2ac35dcb75ca211471baf5044a5f57cd62 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Introducing QArrayDataPointerJoão Abecasis2011-12-141-42/+18
| | | | | | | | | | | This class provides RAII functionality for handling QArrayData pointers. Together with QArrayDataHeader and QArrayDataOps, this offers common boilerplate code for implementing a container which, itself, defines its own interface. Change-Id: If38eba22fbe8f69038a06fff4acb50af434d229e Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* QArrayDataOps::insertJoão Abecasis2011-12-142-0/+238
| | | | | | | | | | | | | | | | | | | | | | | Inserting elements anywhere in the array requires moving the elements that follow out of the way and writing in the new ones. Trivial for PODs and almost as much for movable types. For "complex" types, we start by extending the array with placement new and copy constructing elements. Then, copy assignment resets the elements that were previously part of the array. QPodArrayOps uses non-throwing operations. QMovableArrayOps provides full rollback in the face of exceptions (strong guarantee). QGenericArrayOps enforces that no data is leaked (all destructors called) and invariants are maintained on exceptions -- the basic guarantee. With 3 different implementations, 2 of which are non-trivial, this operation is a good showcase for QArrayOpsSelector and the different implementations. As such, it warrants its own commit. Change-Id: I21d9b4cb8e810db82623bcd1d78f583ebf3b6cb7 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* QArrayDataOps: generic array operationsJoão Abecasis2011-12-142-7/+140
| | | | | | | | | | | | | This class, the selector and underlying implementations provide specialized operations on QArrayData, while allowing for optimized implementations that benefit from type-specific information. Currently, offering a generic implementation and specializations for PODs (trivial ctor, dtor and move operations) and movable types (can be trivially moved in memory). Change-Id: I2c5829b66c2aea79f12f21debe5c01f7104c7ea3 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Add test for GCC bug #43247João Abecasis2011-12-111-0/+28
| | | | | | | | | | | | | | A bug has been reported against GCC 4.4.3 (present in other version as well), where the use of an array of size 1 to implement dynamic arrays (such as QVector) leads to incorrect results in optimized builds as the compiler assumes the index to be 0. This test tries to ensure QArrayDataHeader is not affected by this bug, as QVector currently is. Change-Id: Id701496bae4d74170de43399c1062da40eb078e7 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* template<class T> struct QTypedArrayDataJoão Abecasis2011-12-112-15/+152
| | | | | | | | | | QTypedArrayData is a typed overlay for QArrayData, providing convenience and type-safety. It adds no data members to QArrayData, thus avoiding compiler-generated warnings for aliasing issues when casting back and forth. Change-Id: I969342a30989c4c14b3d03d0602e3d60a4cc0e9d Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Allocate/free support in QArrayDataJoão Abecasis2011-12-091-0/+144
| | | | | | | | | | | | | | | | | | | Centralizing QArrayData memory management decisions in one place will allow us to be smarter in how we allocate header and data. At the moment, these are allocated as a single block. In the future we may decide to allocate them separately for "large" data or specific alignment requirements. For users of QArrayData this remains transparent and not part of the ABI. The offset field in QArrayDataHeader enables this. This also hard-wires allocation of empty arrays to return shared_empty. Allocating detached headers (e.g., to support fromRawData) will thus require explicit support. Change-Id: Icac5a1f51ee7e468c76b4493d29debc18780e5dc Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Merge remote-tracking branch 'gerrit/master' into containersOswald Buddenhagen2011-12-0962-533/+919
|\ | | | | | | Change-Id: I01f94564c17d68872839be5396c24b661e53d571
| * Fixes for tst_QTemporary(File|Dir)::nonWritableCurrentDirJoão Abecasis2011-12-092-6/+4
| | | | | | | | | | | | | | | | - Check path/fileName is empty upon failure, variable was unused - Use /home instead of /, as / is writable by admins on Mac Change-Id: I705471fda8b73843e98b30eb52aa0a73634ec075 Reviewed-by: David Faure <faure@kde.org>
| * Extend touch events.Laszlo Agocs2011-12-095-70/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The capability flags indicate which information is valid in the touch points. Previously there was no way to tell if e.g. the value returned by pressure() is actually the value provided by the driver/device or it is just something bogus due to pressure not being supported. The points' flags return information about the individual touch points. One use case is to differentiate between touches made by finger and pen. Velocity, if available, is now also exposed. Each touch point can now contain an additional list of "raw" positions. These points are not reported individually but are taken into account in some way by the underlying device and drivers to generate the final, "accurate" touch point. In case the underlying drivers expose these additional positions, they are made available in the lists returned by the touch points' rawScreenPosition(). The raw positions are only available in screen coordinates to prevent wasting time with mapping from global positions in applications that do not use this data. Instead, apps can query the QWindow to which the touch event was sent via QTouchEvent::window() and can call mapFromGlobal() manually if they need local raw positions. The capability and device type information is now held in a new QTouchDevice class. Each touch event will contain only a pointer to one of the global QTouchDevice instances. On top of type and capability, the new class also contains a name which can be used to differentiate between multiple touch input devices (i.e. to tell from which one a given QTouchEvent originates from). The introduction of QTouchDevice has three implications: The QTouchEvent constructor and QWindowSystemInterface::handleTouchEvent need to be changed (to pass a QTouchDevice pointer instead of merely a device type value), and each platform or generic plug-in is now responsible for registering one or more devices using the new API QWindowSystemInterface::registerTouchDevice. Change-Id: Ic1468d3e43933d8b5691d75aa67c43e1bc7ffe3e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * Remove QtWidgets dependency from QTcpSocket autotestShane Kearns2011-12-093-33/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QMessageBox was being used to test nested event loops. This has been changed to use QEventLoop directly. Also, there was an unnecessary use of QPushButton to trigger a test case, which has been removed. As a result, 3 test cases can be run on VXWORKS, and one more test case on Windows that were previously skipped. Change-Id: Ic65ed441cd37d242f89df3ef3b8638a1458d9cf3 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
| * Fix unstable test caseShane Kearns2011-12-092-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | tst_QTcpSocket::disconnectWhileLookingUp required the host lookup + connect + disconnect procedure to complete in <50ms, which is not always true. When disconnecting (rather than aborting with close()), wait for the disconnection to complete with a timeout of 5 seconds. Task-number: QTBUG-21043 Change-Id: I3b59abf9a8eb2c6d99416e1a8ec6b528885b656e Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
| * QProcess-test: Fix executable location on Windows.Friedemann Kleint2011-12-091-7/+0
| | | | | | | | | | | | | | | | | | | | The executable needs to be in the test directory as it expects it sub-executables from there. Breakage introduced by 3385fb91e1e55e1bfa1f78dfb8ce2e9f3fdaedef Change-Id: Ic1f3db70851f65e2f12041c3a16cb8f0b7bdf35e Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
| * Promote openStandardStreams sub-tests to top levelJoão Abecasis2011-12-091-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | Commit a72468e820c2922540737c053eef27d033c2e77b split the test into two functions, but kept them combined in a single slot for QTest to invoke. That being the case, we might as well have them as test functions of their own right. Should work nicer with test failures, skips and such. Change-Id: I62c1fc7777c08b3e87a5903632d73dc1e1d97e1a Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| * QPixmap test: Re-enable tests of Windows bitmap/icon conversion.Friedemann Kleint2011-12-091-40/+48
| | | | | | | | | | | | | | | | | | | | - QPixmap::to/fromWinHICON/BITMAP() became free internal functions (see b8d330904b279de57d70caef70ab2d2a6770f0cc) - Improve QImage check function similar to 11732d133b6a1e367b43d6a2853b3e297eafbf9f Change-Id: I80ff066964ce6c339a6b9bfa5a0e10421dca162a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Tests: Fix the language change test.Friedemann Kleint2011-12-092-15/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use correct overload for QTranslator::translate() - Fix LTR source text - Use QDir::TempDir correctly (check for slash). - Do not copy executable on Windows (which is locked), use arbitrary data instead. - Use Q_OS_MAC Task-number: QTBUG-21402 Change-Id: I6ba1c7c764d4c847278eaff9a96c8cd312ac204d Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * QFile-test: Do not fail when run with redirected stdout/stderr.Friedemann Kleint2011-12-091-5/+11
| | | | | | | | | | | | | | Check whether stdout/stderr is sequential. Change-Id: Ia6311e265f0da03dce5b05d78a2058e0c2098bbf Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
| * QProcess-Test: Improve error handling.Friedemann Kleint2011-12-091-6/+23
| | | | | | | | | | | | | | | | In case a subprocess fails to start. Change-Id: I1372c07de8f3580a8e7aadd6874da15bf273ac53 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
| * Re-enable 'check' target for tests/auto/gui on Mac OS XBradley T. Hughes2011-12-0910-1/+18
| | | | | | | | | | | | | | | | | | | | Failing tests are marked with CONFIG+=insignificant_test. tst_QTextLayout currently asserts, so it has been disabled to prevent destabilization of the CI system. Change-Id: I7bd836ee14085689c8a0f0ce8e3c80d81a55eb94 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
| * Forward the contents of the parents argument through this proxy.Stephen Kelly2011-12-091-0/+53
| | | | | | | | | | Change-Id: Ifabc2a7deec8ea045bf9a9f46fb3a97410dd33f2 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Notify about moves in the source model more efficiently.Stephen Kelly2011-12-092-3/+133
| | | | | | | | | | Change-Id: I5ea2a2dddc1b39a3d2b405bda815f42df7c07c75 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Fix failing setSocketDescriptor test in QTcpSocketShane Kearns2011-12-091-0/+1
| | | | | | | | | | | | | | | | | | | | setSocketDescriptor fails because socket is in the wrong state. This is timing dependent, if qt-test-server is still in the DNS cache then the test failed. - clear the DNS cache to avoid the host lookup state being skipped. Change-Id: If159d514b1aa9b62a4834f6352d5e7b0a00a5724 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
| * testProcessSpacesArgs fixedJoerg Bornemann2011-12-092-2/+2
| | | | | | | | | | | | | | Target names with spaces must be quoted. Change-Id: I913ef386353fc75991c8db4e3205ab511fc1f1a9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
| * Improve/cleanup qtemporarydir (and qtemporaryfile) unit testsDavid Faure2011-12-082-75/+33
| | | | | | | | | | | | | | To follow the comments in the review by João Abecasis. Change-Id: Ie566705d3b4071b8628d269246aadcde4866f34f Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
| * Fix QTemporaryDir unittest on Mac OS XDavid Faure2011-12-081-7/+9
| | | | | | | | | | | | | | | | | | mkdtemp(10*X) replaces all 10 chars on Mac, while on linux it only replaces the last 6. Adjusted the too-strict tests to allow for both possibilities. Change-Id: Ie6d57bd4947254ad7a39e75ac0e8881cebeaa428 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
| * QPixmap test: Make lenientCompare() more verbose.Friedemann Kleint2011-12-081-19/+15
| | | | | | | | | | | | | | | | - Output cause of failure - Streamline code Change-Id: I597e8cf0178c2417ea55c2319398a48d839b4474 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * QTestlib/Selftest: Fix Windows.Friedemann Kleint2011-12-081-2/+20
| | | | | | | | | | | | | | | | | | - Do not run with empty environment. At least PATH is required at least (Qt + MSVC/MinGW runtime) - Account for MSVC's different formatting of double numbers. Change-Id: Ic7b1cf4a16a88c5384347b2651b011ac13c92d70 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
| * Create a class to contain accessibilty enums.Frederik Gladhorn2011-12-081-8/+8
| | | | | | | | | | | | | | | | This is needed in order to expose the enums to qml. Do not inherit QAccessible. Change-Id: I220a0ea3add2d790e4fa6e93ce3deda762859e1a Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
| * Remove unused overload of QTest::qExec.Jason McDonald2011-12-086-111/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The overload of QTest::qExec() that takes a QStringList is not used anywhere in Qt's autotests, despite having been in the qtestlib API since Qt 4.4. This lack of use most likely derives from the fact that none of the QTEST_MAIN macros use the overload, and more than 99% of Qt's tests use those macros to avoid explicitly calling QTest::qExec(). Change-Id: I264b21d7fe1a9f2d565f748cf8bbe32414a73bb0 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * Port externaltests.cpp to QTemporaryDirDavid Faure2011-12-071-69/+23
| | | | | | | | | | Change-Id: I6097ea92dd4b300cb562510e0ea27cee3c01b466 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
| * qtbase: Remove QSound.Friedemann Kleint2011-12-075-97/+0
| | | | | | | | | | | | | | | | | | Which currently causes tests not to compile on Windows due to missing symbols in QtWidgets (QSound::QSound() ,etc). Change-Id: I87f0a403e61c3a67f9a758f114e33db1012e33e8 Reviewed-by: Michael Goddard <michael.goddard@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * Check we're connected before startClientEncryption()Richard Moore2011-12-071-0/+13
| | | | | | | | | | | | | | | | | | The docs say this is required, but we don't check it and instead segfault right now. Change-Id: I825b00a312a481c5383af127333c0c4698188348 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
| * Use QTRY_VERIFY to test asynchronous behaviour.Jason McDonald2011-12-071-23/+2
| | | | | | | | | | | | | | | | | | QTRY_VERIFY waits for a condition to become true while regularly processing events. There is no need for a custom solution to this problem. Change-Id: Ia65c90cbdb165b543f5c78f9bac3cfadd77dfb3f Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Use QTRY_VERIFY to test asynchronous behaviour.Jason McDonald2011-12-071-18/+1
| | | | | | | | | | | | | | | | | | QTRY_VERIFY waits for a condition to become true while regularly processing events. There is no need for a custom solution to this problem. Change-Id: Ia23e2fb61cdc5c3a3a8a729cd4356ba930fe7cb7 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Use VERBATIM where needed in macros.Stephen Kelly2011-12-074-0/+172
| | | | | | | | | | | | | | | | | | | | Forward port of fix for http://cmake.org/Bug/view.php?id=12554 Test fails before and passes after. Change-Id: I7a3ab2369cb3095c63f9e2a3e604088ebdcc2465 Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| * Test that options to macros work.Stephen Kelly2011-12-069-0/+264
| | | | | | | | | | | | Change-Id: Id2f57cc2f64ae25f5f84d1206035b7a2c309d1c7 Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| * Fix tst_QSharedPointer invalidConstructs:forward-declaration failureBradley T. Hughes2011-12-061-0/+6
| | | | | | | | | | | | | | | | | | | | When using clang, the forward-declaration test fails to link, unlike with other compilers. The standard says that deleting a forward-declared pointer is undefined behavior, so the link failure is a valid result of trying to do so. Change-Id: I527b91c15b7d51d9522d95af0630e7dacd26bb30 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Test the qt5_add_resource macro.Stephen Kelly2011-12-064-1/+12
| | | | | | | | | | | | Change-Id: I94e4c9e525016405abba90bbdbe58e7786ce5bc4 Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | SimpleVector as a test case for QArrayDataJoão Abecasis2011-12-073-0/+289
| | | | | | | | | | | | | | | | | | | | SimpleVector is meant solely as a test case and reference container implementation based on QArrayData functionality. It shall not replace QVector or friends. Change-Id: I5c66777c720f252c8e073a2884c6d5f1ac836d0e Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Introducing QArrayDataJoão Abecasis2011-12-063-0/+157
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | Modeled on QByteArrayData/QStringData/QVectorData, the intent is to unify book-keeping structs for array-like data and enable sharing of code among them. As in those structures, size (and alloc) data member(s) specify the number of *typed* elements the array does (and can) hold. The size or alignment requirements of those objects is not tracked in this data structure and needs to be maintained by its users. Contrary to QByteArrayData and QStringData, QArrayData's offset member keeps a *byte* offset to the actual data array and is computed from the beginning of the struct. Shared-null and -empty functionality is provided by QArrayData and shared among all users. Planned features include setSharable (force deep copies), fromRawData (detached header and data allocations) and literals a la QStringLiteral (static immutable instances), thus covering the functionality needed for QByteArray, QString and QVector. Change-Id: I9aa709dbb675442e6d06965efb8138ab84602bbd Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Skip untestable interfaces in QTcpSocket::bind autotestShane Kearns2011-12-061-1/+5
| | | | | | | | | | | | | | | bind() test failed if there is an autoconfigured IPv4 address. e.g. bluetooth adaptor that is not attached to a network. Or WLAN adaptor in peer-peer mode. - solved by skipping the autoconfigured IPv4 addresses in the same way as IPv6 addresses are already skipped bind() test fails for proxy - skipped, QTBUG-22964 created Change-Id: I9a799ae8db421783f474e97cf876d6e265516397 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Use plural form for CMake variables.Stephen Kelly2011-12-063-3/+3
| | | | | Change-Id: Idc0cd360e09046a5746c9f7366c7fd4b982058fe Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Remove TESTED_CLASS/TESTED_FILES comments from tests.Jason McDonald2011-12-06283-850/+0
| | | | | | | | | These comments were mostly empty or inaccurate. Appropriate naming of tests and appropriate placement of tests within the directory tree provide more reliable indicators of what is being tested. Change-Id: Ib6bf373d9e79917e4ab1417ee5c1264a2c2d7027 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>