summaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
...
| | * Make tst_qsql.cpp independent of QtWidgetsDebao Zhang2012-03-112-3/+3
| | | | | | | | | | | | | | | | | | Change-Id: I032902bea6fe2c7d9eb0491886fded7602ae2bcc Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
| | * Make tst_qapplication build when QT_NO_SHAREDMEMORY is definedKevin Krammer2012-03-091-0/+4
| | | | | | | | | | | | | | | Change-Id: I8cfd0ff2e17e6d5c04b81a042c665bcbbca36256 Reviewed-by: David Faure <faure@kde.org>
| | * Windows: Fix QStyleSheetStyle autotest antialiasing issuesMiikka Heikkinen2012-03-092-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Antialiasing of fonts was causing two tests that relied on finding at least a certain number of pixels of certain color to find one or two too few pixels of that color and thus fail. Fixed by increasing the amount of text displayed to make sure enough pixels of correct color would be present. Also removing the test insignification, as the test will now pass completely when run under Windows Classic theme, which CI uses. Task-number: QTBUG-24323 Change-Id: Ic0b614d33e4e4f5df18d53cb72a05db5d8b6b5e7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| | * Make tst_qmouseevent.cpp independent of QtWidgetsDebao Zhang2012-03-092-13/+9
| | | | | | | | | | | | | | | Change-Id: I6759c7be44c2d890c1a745effdd70faa3467fe5b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| | * Clean up for some auto tests of the gui/kernel.Debao Zhang2012-03-096-9/+7
| | | | | | | | | | | | | | | | | | | | | They are not dependent on QtWidgets. Change-Id: Icbc0b0b6f0b72537fd3058cc038a1f5c4bf2aba7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| | * tst_qimagereader: does not depend on QtWidgetsDebao Zhang2012-03-094-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | Both tst_qimagereader.cpp and tst_qimagewriter.cpp do not depend on QtWidgets. Change-Id: I7e8b31c23db203c44ccb4cd4e8e747d18c5d7ed7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| | * QRegularExpression: minor fix to captureIndexForNameGiuseppe D'Angelo2012-03-082-1/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although passing a null pointer to pcre16_get_stringnumber for the compiled pattern should simply make it error out, it's actually an undocumented behaviour, so let's stay safe and add an explicit check. Tests for this codepath are added. Change-Id: Ifd9c87874f6812ba487104ec1a5bbc83c3b16761 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * QRegularExpression: improve JIT memory handlingGiuseppe D'Angelo2012-03-082-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PCRE's JIT uses by default 32K on the pcre_exec caller's stack. This is fine for most situations, but in some cases (esp. patterns with lot of recursion) more memory is required. Therefore, if a match execution fails due to exhausting JIT memory, we let PCRE allocate up to 512KB to be used for the JIT's stack. The pointer to the allocated memory is put in thread local storage (so it can be reused from the same thread, if needed, and automatically goes away when the thread dies). Change-Id: Ica5fb7d517068befff88ebb198a603a26ec5d8a7 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * remove strange .qmake.cache hacksOswald Buddenhagen2012-03-085-26/+0
| | | | | | | | | | | | | | | | | | | | | | | | they are obsolete (qmake knows the qt build configuration anyway), and messing with QTDIR is a recipe for disaster. Change-Id: Ib3594f38ec3192a5f70771f8bc5d8fd435bbbd15 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
| | * Windows: Removing insignification from QTextEdit testMiikka Heikkinen2012-03-081-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The commit 660af10dee503729025952ed2374b8a081f941a2 seems to have fixed the test, so removing the insignification from it. Task-number: QTBUG-24348 Change-Id: I564e90db53d10b54e22342a1cdbef6826929c63a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| | * Fix a bug in the assignment operators for QJsonObject and ArrayLars Knoll2012-03-081-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When objects or arrays where being used read only, several objects can share the same d pointer, but will have different pointers into the binary data. Correctly change the pointer into the binary data even if the d-pointer is the same. Change-Id: Ife0ea5ac5daf46586f855dccdf35b51ec696a623 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
| | * Crash fix in QMetaType::typeName.Jędrzej Nowacki2012-03-081-4/+8
| | | | | | | | | | | | | | | | | | | | | The function is public, so it should validate input instead of crashing Change-Id: Ifd9f1110f8631f942929d85db6a57eee7afffb6a Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| | * Fix crash in QVariant::canConvert.Jędrzej Nowacki2012-03-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | The function was crashing when an unsupported type id was given as an input argument. Change-Id: I2b0e3e6d43f6f248dc71532f8e6485efe68e8120 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| | * Windows: Make QMenuBar autotest significant againDebao Zhang2012-03-081-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The bug has been fix by 7bc576771de0b3c96905a6d11a75a01917334dc9 . Task-number: QTBUG-24326 Change-Id: Ifd37e9fe76cb24e49132f22909c95a55a230b1ed Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| | * Remove usage of QtXml from rcc, add testGiuseppe D'Angelo2012-03-0845-16/+746
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ported from QDom to QXmlStreamReader. This enables removal of QtXml classes from bootstrap. A new rcc test was added, copying the data from the QResourceFileEngine test. The new test runs rcc to create binary resources, dynamically loads them under various locales and checks that they do contain the expected files. Change-Id: I15d23dfda45de851a421156951ce2a60af4c1f7f Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: hjk <qthjk@ovi.com>
| | * Call updateAccessibility with the right index.Frederik Gladhorn2012-03-081-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt 4 index 0 was the widget itself. With the cleanup of child index this now changed. The default constructor uses -1 as parameter to signify that the widget is the cause, not a child. Change-Id: I329a1cc91bf2d1d1d8534739acbddfe107f40364 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
| | * selftests: Improve reporting of problems with loading expected outputJason McDonald2012-03-081-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the expected output file was missing (e.g. not included in selftests.qrc), tst_selftests would trigger an assert inside QList by calling QList::at() on an empty list. Make tst_selftests detect this error instead and give a meaningful error message. When loading expected output for the crashes selftest, where there are several alternative versions of the expected output, the code reused the "exp" variable when loading the alternative test output files. This caused the last file loaded to be used unintentionally if none of the alternative files had the correct number of lines. Use a different variable so that exp remains empty if none of the alternatives are valid and a failure can be reported. Change-Id: I35b2a3d905d069d3ee8dcb1447836eb68d5c8612 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| | * testlib: Improve verbose and XPASS outputJason McDonald2012-03-089-35/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, verbose (-v2) and XPASS test output showed all QCOMPAREs as "COMPARE()", making it impossible to see what was compared and difficult to match the output to the source of a test containing many calls to QCOMPARE. This commit changes testlib's internal compare_helper API so that string representations of the compared expressions are always passed to QTestResult::compare() when available, and can thus be shown in the verbose and XPASS output. The XPASS output has also been changed to state explicitly that the comparison succeeded unexpectedly, bringing it in line with the XPASS output resulting from a call to QVERIFY. This commit also changes all calls to compare_helper() to call the eight-argument version of the function, which simplifies much of the calling code. The now obsolete four-argument version of compare_helper() has been changed to output a warning that it is obsolete. It will be removed once other modules have had some time to catch up. The improved XPASS and verbose output is demonstrated by the expectfail and verbose2 selftests. Change-Id: I8baa46d5dd30e6c43b26f366c34dc5b64aab5f7c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| | * Mark unstable windows network testsShane Kearns2012-03-086-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is unfortunately still "most of them", because of QTBUG-24451 however some of the unit tests are still possible to test stably. Also skipped test cases which would hang forever due to QTBUG-24451. Bearer tests are not run, because they pass when test machine has no wireless LAN, but fail or hang if it does (QTBUG-24503) Change-Id: Icf99d45707102d2ef9219ed0b5ad521605716219 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| | * Rework QNetworkProxyFactory::systemProxyForQuery autotestShane Kearns2012-03-081-21/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than requiring specific hardcoded proxies in the system, it now checks the proxies returned by the system have the required capabilities for the request. Note the test will pass if no proxy is configured (as QNetworkProxy::NoProxy has all required capabilities) The test prints the returned proxy lists and elapsed time diagnostic for manual comparison and debugging. Change-Id: I621ef4d1d7264a98c3e8bd485c30bc1166fcbdf0 Task-number: QTBUG-19454 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Mark tst_QNetworkReply::getThenDeleteObject as unstableShane Kearns2012-03-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's unstable on all platforms, because the reply can be finished due to a race with the http thread. It isn't crashing (which the test was trying to test for), but rather the QVERIFY(!reply->isFinished()) fails, which is an inconclusive verdict. Change-Id: Ib815a7cedd220544a0c9cb83023e3334df4a0fb3 Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
| | * tst_qnetworkreply - remove qRegisterMetaType duplicatesShane Kearns2012-03-081-28/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The metatypes are registered in the constructor, don't need to register them in test cases as well. Registering in a test case is bad practice, as it could result in tests failing when run individually due to unknown metatype. Change-Id: Ic4d65d0f5fe3cdd3ab57cf2512a4906d71205a05 Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
| | * Add windows XFAIL to qnetworkreply autotestShane Kearns2012-03-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | The test case that depends on QLocalSocket consistently fails due to bugs in QLocalSocket windows implementation Change-Id: Ibfe9eb3590be4f72b52f14cd4fbe5be61f6cf70e Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
| | * examples: use QVector<QPointF> instead of QList<QPointF>Marc Mutz2012-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QPointF is in the category of types for which QList is needlessly inefficient (elements are copy-constructed onto the heap and held through pointers). Use a vector instead. This is consistent with the QPainter API. Change-Id: Id0e910c067a60d12fbc175e7ee7da824834be374 Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | | Fix QString:mid and midRef, againJoão Abecasis2012-03-121-8/+44
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 75286739 it was assumed that negative positions shouldn't influence the size of the returned substring. That however changes behaviour that was depended on even inside Qt. With this change, the old behaviour is reestablished. A negative value of n is still taken to mean "all the way to the end", regardless of position, and overflows are still avoided. Change-Id: I7d6ed17cc5e274c7c7ddf0eb0c3238e1159ec4f6 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* | QtDBus: make some constructors explicitMarc Mutz2012-03-121-19/+19
| | | | | | | | | | | | | | | | | | This is a semi-automatic search, so I'm reasonably sure that all the exported ones have been caught. Change-Id: I314d341ad0db4e9d4bbf353a9537c9422ad8a54b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Mark tst_qtimeline as insignificant on WindowsSergio Ahumada2012-03-091-0/+2
| | | | | | | | | | | | Change-Id: If8f699f867d3950cced17b150cb5f02fddd1f9a8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* | Merge "Merge remote-tracking branch 'origin/containers' into api_changes" ↵Friedemann Kleint2012-03-0918-62/+2512
|\ \ | | | | | | | | | into refs/staging/api_changes
| * | Skip test when implicit move operators not availableJoão Abecasis2012-03-081-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Besides rvalue-references, this test depends on the compiler to generate implicit move operators on a derived class, based on the ones available on its base class. At least Visual Studio 2010 and some variations of clang 3.0 are known not to generate implicit move constructors and assignment operators. Gcc 4.6 and up seem to support the feature. Change-Id: Ied464ef678f517321b19f8a7bacddb6cd6665585 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
| * | Merge remote-tracking branch 'origin/api_changes' into containtersJoão Abecasis2012-03-08103-784/+4206
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qmetaobject.cpp src/corelib/kernel/qvariant.cpp src/tools/moc/moc.h Change-Id: I2cd3d95b41d2636738c6b98064864941e3b0b4e6
| * | | Base QList::setSharable on RefCount::setSharableJoão Abecasis2012-03-051-0/+172
| | | | | | | | | | | | | | | | | | | | Change-Id: I2acccdf9ee595a0eee33c9f7ddded9cc121412c1 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
| * | | Introduce QMetaType::UnknownType.Jędrzej Nowacki2012-03-023-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMetaType::Void was ambiguous, it was pointing to a valid type (void) and in the same time it was signaling errors in QMetaType. There was no clean way to check if returned type was valid void or some unregistered type. This feature will be used by new QMetaObject revision which will store type ids instead of type names. So it will be easy to distinguish between: void mySlot(); MyUnregisteredType mySlot(); Change-Id: I73ff097f75585a95e12df74d50c6f3141153e771 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * | | Add AllocationOption::GrowJoão Abecasis2012-02-292-4/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is meant to reduce the number of allocations on growing containers. It serves the same purpose as the existing qAllocMore which is currently used by container classes. While only a container knows when it is growing, it doesn't need to care how that information is used. qAllocMore is currently treated as a black-box and its result is (basically) forwarded blindly to an allocate function. In that respect, container code using qAllocMore acts as an intermediary. By merging that functionality in the allocate function itself we offer the same benefits without the intermediaries, allowing for simpler code and centralized decisions on memory allocation. Once all users of qAllocMore get ported to QArrayData and QArrayData::allocate, qAllocMore can be moved or more closely integrated into qarraydata.cpp and qtools_p.h can be dropped. Change-Id: I4c09bf7df274b45c399082fc7113a18e4641c5f0 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
| * | | Test setSharable with "raw data"João Abecasis2012-02-291-0/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: I91774685e84416407aa1fa136f27fedb82545a12 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Port QDBusMetaObject to Qt5 meta-property/method descriptor formatKent Hansen2012-02-291-0/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adapts QDBusMetaObject to be in sync with the moc/meta-object changes for property and method descriptors (storing the name and argument count of methods, and more elaborate type information). Now that the method name is stored in the standard method descriptor, QtDBus doesn't need to store it separately anymore, and the QMetaObjectPrivate::rawStringData() function can be removed. Change-Id: I04efdbe05b52bbd85405e1713509e55308ac42da Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Add QMetaMethodBuilder::parameterTypes() functionKent Hansen2012-02-291-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function matches QMetaMethod::parameterTypes(). The implementation of QMetaMethod::parameterTypes() was moved to a helper function in QMetaObjectPrivate, so that it can be shared with QMetaMethodBuilder. Change-Id: I4361713996dc4ea31a79c2fc74c813ee5e9c3069 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
| * | | Long live Qt5 meta-object method/property descriptorsKent Hansen2012-02-291-4/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces two significant changes to the meta-object data format: 1) Meta-type information (QMetaType type/name) information is stored directly in the meta-data for both properties and methods; 2) The original signature (string) of a method is no longer stored in the meta-data, since it can be reconstructed from the method name and parameter type info. The motivation for this change is to enable direct access to method names and type information (avoiding string-based lookup for types if possible), since that's typically the information language bindings (e.g. QML) need. (moc already had all the desired information about methods, but it threw it away!) This change keeps support for the older (6 and below) meta-object revisions, but the support will be removed after a short grace period. The following public QMetaMethod functions have been added: name() : QByteArray returnType() : int parameterCount() : int parameterType(int index) : int The following internal QMetaMethod function has been added: getParameterTypes(int *types) : void This commit extends the meta-method data to include explicit type/name data for methods. The new data follows the existing (5-word) method descriptors in the meta-data. The method descriptor format was modified to enable this. First, the descriptor now contains the meta-data index where the method's type/name information can be found. Second, the descriptor contains the number of parameters. Third, the descriptor has a reference to the name of the method, not the full signature. Each entry of a method's type/name array contains either the type id (if it could be determined at meta-object definition time), or a reference to the name of the type (so that the type id can be resolved at runtime). Lastly, instead of storing the method parameter names as a comma-separated list that needs to be parsed at runtime (which was how it was done prior to this commit), the names are now stored as separate entries in the meta-object string table, and their indexes are stored immediately after the method type info array. Hence, parameter names can be queried through the public API without parsing/allocating/copying, too. Task-number: QTBUG-24154 Change-Id: Idb7ab81f12d4bfd658b74e18a0fce594f580cba3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * | | Rename QMetaMethod::signature() to methodSignature()Kent Hansen2012-02-297-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt5 the meta-data format will be changed to not store the method signature string explicitly; the signature will be reconstructed on demand from the method name and parameter type information. The QMetaMethod::signature() method returns a const char pointer. Changing the return type to QByteArray can lead to silent bugs due to the implicit conversion to char *. Even though it's a source- incompatible change, it's therefore better to introduce a new function, methodSignature(), and remove the old signature(). Task-number: QTBUG-24154 Change-Id: Ib3579dedd27a3c7c8914d5f1b231947be2cf4027 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
| * | | Change the representation of meta-object string dataKent Hansen2012-02-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up to and including meta-object revision 6, string data have been stored as 0-terminated C-style strings, that were made directly accessible as const char pointers through the public API (QMetaMethod and friends). This commit changes moc to generate an array of QByteArrayData instead, and adapts the QObject kernel accordingly. Generating an array of QByteArrayData (byte array literals) means that the strings can now be returned from public (or private) API as QByteArrays, rather than const char *, with zero allocation or copying. Also, the string length is now computed at compile time (it's part of the QByteArrayData). This commit only changes the internal representation, and does not affect existing public API. The actual (C) string data that the byte array literals reference still consists of zero-terminated strings. The benefit of having the QByteArrayData array will only become apparent in the upcoming meta-object data format change, which changes the format of property and method descriptors. Support for the old meta-object string data format was kept; the codepaths for old revisions (6 and below) will be removed in a separate commit, once all the other meta-object changes are done and affected code has been adapted accordingly. Task-number: QTBUG-24154 Change-Id: I4ec3b363bbc31b8192e5d8915ef091c442c2efad Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
| * | | Merge remote-tracking branch 'gerrit/master' into containersJoão Abecasis2012-02-29127-588/+1033
| |\ \ \ | | | | | | | | | | | | | | | Change-Id: I97ba222435ff50a9e5422e6f2c73e4bb8d1b865c
| * | | | Port badxml autotest to QMetaObjectBuilderKent Hansen2012-02-242-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The meta-object format is going to change for Qt5. Use QMOB to insulate the badxml test from such changes. (It just so happens that the QFAIL("a failure") statement is still on line 109 after the refactoring, so the expected_badxml.* files' location tags did not have to be changed.) Change-Id: I04421d13c4df71c8004fa71cafc4823a59079a41 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> (cherry picked from commit 12520e83009fb8bd694d9768801875558bcc6321) Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
| * | | | SimpleVector: don't assert when reserving on emptyJoão Abecasis2012-02-222-2/+65
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I09ac235085e645c8149c153653377252fef6fa3d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | | Change meaning of offset in QStringDataJoão Abecasis2012-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It used to be an index into the first element in 'd' that came after 'offset'. It is now the byte offset from the beginning of the QStringData structure. By no longer using an actual array to access characters, we also steer clear of GCC bug #43247: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43247 This aligns this data structure with QArrayData. The intention is to have QVector, QString and QByteArray share the same memory layout and possibly code. Change-Id: I4850813e1bd47c3cb670c50c9a8ccc1bff2e8597 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | | Workaround compiler issueJoão Abecasis2012-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I can't figure this one out, but it seems to be a clang compiler bug that is triggered in association with -DQT_NO_DEBUG. Changing the test from QVERIFY to QCOMPARE keeps the intent and the check, but makes the failure go away. It can't hurt... Change-Id: Ib34e5e850e5b731d729e417430dec55e372805ac Reviewed-by: Chris Adams <christopher.adams@nokia.com>
| * | | | Merge remote-tracking branch 'gerrit/master' into containersJoão Abecasis2012-02-21385-5331/+8758
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.h Change-Id: I03b1f3e05c9b7a45130887c522fcd9b7aa387129
| * | | | | Change meaning of offset in QByteArrayDataJoão Abecasis2012-02-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It used to be an index into the first element in 'd' that came after 'offset'. It is now the byte offset from the beginning of the QByteArrayData structure. By no longer using an actual array to access characters, we also steer clear of GCC bug #43247: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43247 This aligns this data structure with QArrayData. The intention is to have QVector, QString and QByteArray share the same memory layout and possibly code. Change-Id: I8546e5f51cd2161ba09bd4ada174b7f5e6f09db7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | | | qAllocMore: Always grow exponentiallyJoão Abecasis2012-02-171-12/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qAllocMore is used by growing containers to allocate additional memory for future growth. The previous algorithm would grow linearly in increments of 8 up to 64 and then progress exponentially in powers of two. The new (constant time) algorithm does away with the linear segment and always progresses exponentially. It also has the nice benefit of cleanly avoiding undefined behaviour that the old implementation tried hard to circumvent. Besides always progressing exponentially, the next-power-of-two algorithm was tweaked to always include space for growth. Previously queries at boundary values (powers of two) would return the same value. The test was updated to verify sanity of results. As the algorithm is well behaved, testing of bogus data was dropped. Whatever happens in those cases is irrelevant, anyway: the bug lives elsewhere. Change-Id: I4def473cce4b438734887084e3c3bd8da0ff466b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * | | | | Fix and simplify QString::midJoão Abecasis2012-02-141-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'position' was being used to initialize 'n' before being fully validated. To compensate for this, the code attempted to fix 'n' once 'position' was found to be invalid (negative). This would, however, also attempt to "fix" a perfectly valid value of 'n'. By fully validating 'position' beforehand we avoid this trap and can safely use it to validate and reset 'n', as needed. Arithmetic for boundary conditions of 'n' was rearranged to avoid triggering integer overflow. Removed explicit check for shared_null, as the same behaviour can be supported without it. Change-Id: Ie9bff7b8137a74f55c7dcfe629bd569045e28f3c Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
| * | | | | Add support for rvalue-references in QArrayDataPointerJoão Abecasis2012-02-131-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I love how this magically makes SimpleVector move-aware :-) Change-Id: I5cb75954d70cf256863c33e684ebc4551ac94f87 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
| * | | | | Update license headersJoão Abecasis2012-02-062-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Updated copyright year, per 1fdfc2abfe1fa26b86028934d4853432e25b4655 - Updated contact information, 629d6eda5cf67122776981de9073857bbc3dcba2 - Drop "All rights reserved", 5635823e17db3395d9b0fa8cfcc72f82fea583f4 (Empty line added to maintain license header line count) Change-Id: Ie401e2b6e40a4b79f4191377dd50dc60be801e1f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>