summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
Commit message (Collapse)AuthorAgeFilesLines
...
* Compilation fix: missing includes for geteuid()Marc Mutz2012-02-171-0/+4
| | | | | | Change-Id: I054b8c9a398b5e192c2e005a39cba19bb4930966 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix qlogging test for release configurationMiikka Heikkinen2012-02-172-12/+26
| | | | | | | | | | | | | | | The helper process 'app' wasn't built in release configuration. Also improved finding the helper executable to utilize QFINDTESTDATA and print out a proper errors if it could not be found or started. Note that adding ".exe" to process name in Windows is unnecessary as QProcess already does that for you, so removed the ifdeffing. Task-number: QTBUG-24330 Change-Id: Ibe75e0ecd24181ab623d0a60f17ecaf92052b0dd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QMimeData: export URLs as text tooDavid Faure2012-02-171-2/+5
| | | | | | | | | | | | This allows to drop or paste them into lineedits and text widgets (including such widgets in non-Qt applications) Implementation note: this is done on-demand rather than in setUrls so that it's still possible to setText explicitely; the new code is only a fallback for when no text/plain data is available. Change-Id: Ie90c43a30bfa64a6047b627e7351d20bf5ec8e03 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QDebug: Add support for %{pid}, %{appname} and %{threadid}David Faure2012-02-172-7/+10
| | | | | | Change-Id: I4add0a374e6524b615c6dc0ecfb010a90075b04f Reviewed-by: Kai Koehne <kai.koehne@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix tst_QFileSystemWatcher failure on Mac OS XBradley T. Hughes2012-02-172-2/+5
| | | | | | | | | | | | | The watchFileAndItsDirectory() test would fail due to atime updates for the first watched file coming up to 2 seconds after the file was closed. Observation shows that the atime has a 2 second resolution on Mac OS X using HFS+, so add an appropriate delay to make sure that the atime update from the kqueue based file system watcher can dispatch all updates. Task-number: QTBUG-22744 Change-Id: Ie79af20d6b4c154021307c8a8f6d336369720337 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Changed qcryptographichash unittest to work from installation directoryKurt Korbatits2012-02-172-12/+4
| | | | | | | | - Changed qcryptographichash to use TESTDATA and QFINDTESTDATA Change-Id: Ic3a1bdccc9f81605c648dab2a642421d17f7fe80 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Changed json unittest to work from installation directoryKurt Korbatits2012-02-162-8/+13
| | | | | | | | - Changed json unittest to use TESTDATA and QFINDTESTDATA Change-Id: Id29f8257565f409fa184ba465f25bc8454e2b7fb Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Implement new static less API for QMetaType.Jędrzej Nowacki2012-02-161-23/+133
| | | | | | | | | | | | | | Currently QMetaType API contains almost only static methods. This works nice until someone needs more information or needs to do more operations on a type. In this case every function call has to do type dispatch. This API allows to avoid redundant type dispatching, by caching a type information in a QMetaType instance. It gives significant performance boost especially for custom types (up to 9x). Change-Id: I223d066268402e072e41ca1d0a3e7bc160655d7f Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Fixed tst_QFile when redirecting stdin/stdout/stderr to/from files.Rohan McGovern2012-02-161-3/+6
| | | | | | | | | | | openStandardStreamsBufferedStreams would fail if standard streams were redirected to a file (e.g. ./tst_qfile > testlog.txt). openStandardStreamsFileDescriptors already has a workaround, so apply it here too. Change-Id: Iffe9d7864909e489e77c1114e80c4e3bc70a8722 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Add QMetaType::FirstCoreType enum value.Jędrzej Nowacki2012-02-161-1/+2
| | | | | | | We should not assume that the first type id is 0. Change-Id: I17ba6ba57e97ebd495904bfd11235fe458f214e5 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Add autotest for QMetaMethod introspectionKent Hansen2012-02-153-0/+621
| | | | | | | | | | This autotest checks that meta-methods can be properly inspected (signature, return type, parameter types, etc.). Change-Id: I13dc75ec5123280e94ec738dade3f54e427fdbaa 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>
* Stabilize QFileSystemWatcher test.Friedemann Kleint2012-02-152-35/+69
| | | | | | | | | | | | | | | - Run each test in a temporary directory, avoid writing test files in source/build tree and prevents tests being influenced by left-overs from previous runs and locks of the application on the current directory. - Modify test to be able to use absolute paths to the temporary directory. - Skip parts of test removeFileAndUnWatch if a race condition occurs. Task-number: QTBUG-24029 Change-Id: I215cc2e0fe6f92d2ffe597b01cdc9c9a39e3c5b4 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* tst_QVariant passes on Mac OS XBradley T. Hughes2012-02-151-2/+0
| | | | | | | | Do not mark with insignificant_test anymore. Task-number: QTBUG-22747 Change-Id: I4ef6d5d7e1189b03fd1ab812a0839e3709686e1b Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Test template-based connect() with qmetaobjectbuilderKent Hansen2012-02-151-9/+17
| | | | | | | | | | | For template-based connect(), the meta-object is resolved at compile-time (the virtual metaObject() function isn't called). But we can make it work by copying the members of the dynamically constructed meta-object to the statically defined one. Change-Id: Ia4d3263a89008e36e187c584db6d25d9042f32b3 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* qmetaobjectbuilder: Add support for revisioned methods and propertiesKent Hansen2012-02-151-0/+25
| | | | | | | | | moc supports it, so qmetaobjectbuilder should too. Change-Id: I01475794e928b5a1b659f0dab044933948186971 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Eliminate duplicate data row names from corelib autotests.Jason McDonald2012-02-1419-193/+193
| | | | | Change-Id: I57a37f19746b76c6c9c3534f5c66c5a5478dae24 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Eliminate duplicate data row names in utf8 autotest.Jason McDonald2012-02-141-3/+3
| | | | | Change-Id: I30dfd4b93ab1e5430b5bc7fc25fe6aea0e0cc551 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix duplicate data row name in tst_QTextCodec::utf8Codec test.Jason McDonald2012-02-141-2/+2
| | | | | | | Rename rows using naming convention used elsewhere in this test. Change-Id: I8e669cedcc2058cf84cee976c8a0a478bc1cea0a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Use meaningful data row names in tst_QTextCodec::fromUnicode test.Jason McDonald2012-02-141-64/+61
| | | | | | | | | | | Use the codec name instead of just numbering the rows. This eliminates some duplicate row names. Two duplicate rows have also been removed -- for the WINSAMI2 row, the last value in the row is different, making one copy do a subset of the testing done by the other, so the row that did less testing was removed. Change-Id: I859f681a627e8d3839ca8a4ba09d541bec43d9fb Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add QFileInfo::isNativePathJoão Abecasis2012-02-141-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | This function returns true if the file path can be used directly with native APIs, modulo encoding and path separator conversions. This is important for applications that interface with other libraries or simply need to use native APIs together with Qt. Traditionally, this information was available in QAbstractFileEngine and forced users to explicitly create an engine or use internal API such as QFile::fileEngine to access the underlying engine and this piece of information. Given its usefulness, exposing the information in a more visible place is more appropriate. This reduces the need for people to know or care about implementation details, like file engines... The existing isLocalFs test was updated and repurposed to use the new API, instead of relying on file engines and internal implementation details of QFileInfo. Change-Id: I65f497bb25741f6f7ea4d2c3b3562c8c4aab8bea Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix tst_QSocketNotifier on Mac OS XBradley T. Hughes2012-02-132-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Socket notifier behavior is very OS-dependent. QtNetwork uses non- immediately (it will return -1 w/ errno=EINPROGRESS). We have to wait with select(2) to indicate that the connection is ready, then call connect(2) again. When this happens, we need another call to select(2) to get notification on the listening socket so that we can call accept(2) to complete the connection. The mixingWithTimers() failure happens due to the test expecting a single processEvents() call to be able to completely connect a TCP socket. But as described above, this may not happen. The test should QTRY_COMPARE() to give the test a chance to let all this happen. The posixSockets() test can fail due to the same connect() behavior. The test already has a comment about the write notifier behavior being very OS dependent. This caused the first enterLoop() to return too early, before the read notifier fired (which is what the test is checking for, that the read notifier fired). Move creation of the write notifier to where we expect it to fire, just before writing to the posix socket. In the same test, the read notifier inside QTcpSocket may not fire after the write notifier on the posix socket. Use the waitForReadyRead() function to give the socket a chance to read the data written to the posix socket. Change-Id: I541e6ee9a39a92ce3acf6b9ffee51079febe43e4 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
* Remove HP PA-RISC atomic implementation.Bradley T. Hughes2012-02-131-5/+0
| | | | | | | | | | | This architecture is obsolete and discontinued. Support for PA-RISC can be re-added if needed, but it would be preferred to use the GCC intrinsic support from qatomic_gcc.h (on Linux/HPPA, for example). Change-Id: I952e521a2c8c68840df0d44843b5487d5c20b135 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add QUrl::toDisplayString(), which is toString() without password.David Faure2012-02-111-0/+6
| | | | | | | | | | | And fix documentation of toString() which said this was the method to use for displaying to humans, while this has never been true. Change-Id: Iff6df92e32b2517e1481d4992d80cae2d58da427 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Make it possible to put QObject tracked with QWeakPointer inside QSharedPointerOlivier Goffart2012-02-101-8/+25
| | | | | | | | | | | | | | | | Do that by keeping the QWeakPointer that track QObject independent of the ones that track QSharedPointer. QSharedPointer do not touch the sharedRefCount in QObjectPrivate anymore When converting a QWeakPointer constructed from a QObject to a QSharedPointer, it will display a warning saying one should not do that. Task-number: QTBUG-22622 Change-Id: I3595e3e7401702410776c458687ab357ad9366ab Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix qlogging autotest for clangKai Koehne2012-02-101-0/+17
| | | | | | Change-Id: Iac82c4847554534174b5419ec78319c9ac381628 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Test posted events in tst_QEventDispatcher with various flagsBradley T. Hughes2012-02-101-1/+13
| | | | | | | | | Add QEventLoop::ProcessEventsFlags test data for tst_QEventDispatcher::sendPostedEvents() to test that posted events are sent when waiting for events and when not waiting. Change-Id: I99f9eb121d0b1ded725e19c5233922fc0a6b81e4 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Run tst_QEventDispatcher with the GUI event dispatchers as wellBradley T. Hughes2012-02-101-1/+16
| | | | | | | | | | | | | Since some GUI event dispatchers are complete reimplementations and do not build on the corelib ones, we want to run the same tests with the other dispatcher. Since this is a GUI test now, we need to make sure to drain system events queued during application startup to make sure we can reliably run the test functions. Change-Id: I4905db70bc8f8584c4ef1f4d767824040281452c Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Add tst_QEventDispatcher to tests/auto/corelib/kernelBradley T. Hughes2012-02-103-0/+191
| | | | | | | | | | | | This will test the event dispatcher in corelib for proper timer and posted event handling. The test makes sure all of the necessary virtual functions are implemented and working as expected. This test doesn't test socket notifiers or Win32 event notifiers, as these are already covered in existing tests. Change-Id: I5540ffc4e6d7f97bcd6c3725d7e74c0ab9c97015 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Force -fPIE on ELF if Qt is built with reduced relocationsOlivier Goffart2012-02-101-3/+0
| | | | | | | | | | | | | | | | Put in qconfig.h whether qt is compiled with reduced relocations. When using -Bsymbolic-functions (enabled by default on Qt) but not -fPIE, the comparison of the function pointers fail because the addresses are different in Qt, and in the executable. Hence we now enable -fPIE by default on qmake, and force a compilation error when it is not enabled and built with reduced relocations. Done-with: Sune Vuorela <sune@vuorela.dk> Change-Id: Ib3fdba06fab6e8a93b75b4c6cf16cc973ab335db Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fixed qlibrary unittest to work on macKurt Korbatits2012-02-102-1/+2
| | | | | | | | | - Changed unload_after_implicit_load() to use full path - Turned off app_bundle Change-Id: Ibdf3ae0dc833d97eba64298715eb88c70408fff6 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fixed qsharedpointer unittest to run from installation directoryKurt Korbatits2012-02-101-1/+1
| | | | | | | | - Only run invalidConstructs() tests if not cross compiled Change-Id: If99fccdf9bca339507ca60c49aa89dc35c535d3d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Allow customization of qDebug output at runtimeKai Koehne2012-02-098-152/+719
| | | | | | | | | | | | | Check the QT_OUTPUT_PATTERN environment variable in the default message handler to customize the output of messages. Following place holders are right now supported: %{message}, %{type}, %{file}, %{line}, %{function} The original cleanupFuncinfo was written by Thiago Macieira. Change-Id: I6ad25baaa0e6a1c9f886105d2a93ef3310e512a9 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: David Faure <faure@kde.org>
* Make "nmake check" pass for corelib tests in Windows.Miikka Heikkinen2012-02-096-0/+12
| | | | | | | | | | | | | | | | | | - Marked four tests insignificant due to failures, these need to be fixed later and then re-enabled: - tst_qfilesystemwatcher - tst_qsettings - tst_qlibrary - tst_qsharedpointer - Skipped one invalid case (tst_QCoreApplication::argc()) - Ifdeffed around vsprintf issue in MSVC (tst_QByteArray::qvsnprintf()) Task-number: QTBUG-24157 Task-number: QTBUG-24146 Task-number: QTBUG-24128 Change-Id: I4db957a65fbf0093f5ae3dc1a04d792492818104 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Fixed tst_qfileinfo::group crash if getgrgid failsRohan McGovern2012-02-091-0/+6
| | | | | | | | QVERIFY2 and gracefully fail with an error message, rather than crashing, if getgrgid() fails. Change-Id: I82a7290f83208486577988cc831d5d3cba20f98e Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Fixed tst_qobject::property for clangRohan McGovern2012-02-091-0/+1
| | | | | | | | | | | | | | | | | | | | | The test was failing at: QCOMPARE(property.userType(), qMetaTypeId<CustomType*>()); The CustomType* metatype was not registered before this part of the test. qMetaTypeId<T> will register the metatype for T before returning it if it is not yet registered, while QMetaProperty::userType() returns 0 if the metatype is not yet registered. However, the order of evaluation of these two expressions in the above statement is technically undefined. Apparently, gcc evaluates the arguments in order from right to left, allowing the test to pass, while clang evaluates the arguments in order from left to right, causing the test to fail. Change-Id: I5059556e860cec29b57c31e4e26f46cf9e6055da Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Fixed qstandardpaths unittest to handle being run as rootKurt Korbatits2012-02-091-0/+5
| | | | | | | - testCustomRuntimeDirectory test skips if run as root Change-Id: Idcc2a1db5d8a96b2ec0248b8b1c392fffc0b2e11 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fixed qdir unittest to handle being run as rootKurt Korbatits2012-02-091-1/+12
| | | | | | | | - Added checks to see if running as root and skip as needed Change-Id: I4f94d5bfe511c6dfda315854b7cd1f64efe6e4f4 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fixed qfile unittest rename() failing as rootKurt Korbatits2012-02-091-0/+7
| | | | | | | | | When run as root was able to move file to /etc directory but was expecting a failure. Change-Id: Ic2ac5506253f2a3395ed56e88a856542bf82ad6d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Introduce Q_DECLARE_OPAQUE_POINTERJoão Abecasis2012-02-091-6/+2
| | | | | | | | | | | | To hide the IsPointerToTypeDerivedFromQObject monstruosity :-) Documentation for Q_DECLARE_METATYPE and qRegisterMetaType was updated to mention requirements on registered types and how they can be circumvented for pointer types with the new macro. Change-Id: If83b037a8e2f28761eb903525e87008107298801 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Treat pointers to QObject derived types in QVariant specially.Stephen Kelly2012-02-081-6/+96
| | | | | | | | | | | | | | | | It is possible to do this for example: QVariant v = QVariant::fromValue<MyCustomQObject*>(); QObject *object = v.value<QObject*>(); This means that if a QVariant contains a pointer to a QObject derived type, third parties can extract a QObject* and use its properties without knowing the concrete type. This is a source compatible change. Change-Id: Iee9a9437e99cc2f40d1a4bfea47275482ef7161f Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Initialize dynamic meta object extradata.Andrew den Exter2012-02-081-0/+34
| | | | | | | | | | QMetaObject::invokeMethod attempts to deference the extradata for meta objects versions 6 and greater which is causing a crash in some of the qtquick1 tests. Change-Id: If5b2ca83b15de2cd558976c6b681dd5457c404d1 Reviewed-by: Chris Adams <christopher.adams@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Improved stability of tst_qsemaphore (especially on mac)Rohan McGovern2012-02-082-18/+25
| | | | | | | | | | | | | | | | | Timers are not entirely precise; if we ask for a timeout of 10000 milliseconds, we might time out in 9999 instead. Also, we know the expected elapsed time in each case, so do a fuzzy comparison against that time. Previously the test was verifying that the elapsed time was greater than or equal to the timeout in the case where a timeout was expected, which means the test would not detect bugs which incorrectly caused the timeout to occur later than it should. (cherry picked from qt4 commit 9a2573dc13b3e8df6cd15bef64370ea407480fc7) Change-Id: I91d0c81f989ab43a3c48f6abbb4c5b28e2b35402 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Don't allow cd'ing to above root.Jonas Gastal2012-02-071-0/+29
| | | | | | | Task-number: QTBUG-23893 Change-Id: Ifc6e22f135a1f6bff7c0fa8bef3ea7e1042ae819 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Fix QFile autotest not to require elevated privilege to passShane Kearns2012-02-071-3/+13
| | | | | | | | | | | | | | | | | | | The open test case tests opening a device path on windows. As this requires privilege elevation, the test fails when running nmake check from a console. As the CI machines appear to run tests with admin privileges, first check opening the device using the windows API. If that succeeds, then opening using QFile should succeed. If that fails, the opening using QFile should fail. (Since Windows vista, members of the "administrators" group do not run at elevated privilege all the time. The user needs to opt in via a UAC prompt or "run as administrator". This is similar to using the sudo command on unix) Ran the test as administrator and normally. Now passes in both cases. Change-Id: Ibd7682eceb61e35d4912fa0392df536f4331f6ed Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Detect incompatibilities in repeated type registrationJoão Abecasis2012-02-071-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | QMetaType used to register a typeName and factory functions for creation/destruction of objects. While it would be possible for a single type name to be registered matching different actual types and memory layouts, there was little that could be done about it. Now that QMetaType is tracking type information with a direct impact on data layout and ABI (size and type flags) it is important that we check and detect binary incompatibilities as early as possible. [Such incompatibilities could arise from type name re-use (technically, ODR violations) or, more commonly, as version mismatch between different shared libraries or plugins.] Only type size and flags are checked as function pointers to inline and template or otherwise non-exported functions could trivially differ across translation units and shared libraries. When registering typedef types, a check is made to ensure the same name doesn't get registered as different types. Change-Id: I8211c3de75d4854ce8fafdb620d3a931c206e0c3 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Remove QMetaType::unregisterType().Jędrzej Nowacki2012-02-071-23/+0
| | | | | | | | | | | | | | | | | | | | | | | The function hasn't been working properly. It was not well tested, for example it is undefined how QVariant should behave if it contains an instance of an unregistered type. Concept of unregistering types was inspired by plug-in system, but in most supported platforms we do not unload plug-ins. Idea of type unregistering may block optimizations in meta object system, because it would be not possible to cache a type id. QMetaType::type() could return different ids for the same name. Currently QMetaType::unregisterType() is not used in Qt. Change-Id: I878b6e8d91de99f9bcefeab73af2e2ba0bd0cba0 Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Align QVariant::UserType and QMetaType::UserJędrzej Nowacki2012-02-072-8/+6
| | | | | | | | | | | | | | | | | | | | | | | There is no point in keeping separate values which should mean the same. QVariant::UserType was used also to construct a valid, null QVariant, containing an instance of unknown custom type. The concept was strange and useless as there was no operation that could be done on such QVariant. Therefore it was dropped. Please note that the patch slightly changes behavior of different functions accepting a type id as parameter. Before QVariant::UserType was an invalid type from QMetaType perspective (id 127 was not assigned to any built-in type), but QMetaType::User points to the first registered custom type. Change-Id: I5c7d541a9affdcdacf53a4eda2272bdafaa87b71 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* SIC: QLocale: Make QSystemLocale a private classJohn Layt2012-02-051-40/+0
| | | | | | | | | | As discussed on list and approved by Lars and Thiago. Make QSystemLocale private to give us time and space to change it to a better implementation. Change-Id: Ifd806972f3996c43a876f544f78c6557ad71cd75 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QString: Make convert to number methods only use C localeJohn Layt2012-02-051-149/+88
| | | | | | | | Ensure consistent conversions by not using the system default locale. Change-Id: I60db9fc4f465c0254f3213419e57d7879aaddd65 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Move QtConcurrent into its own moduleLars Knoll2012-02-0533-8516/+54
| | | | | | | Task-number: QTBUG-20892 Change-Id: I614500aafb6428915509983608bbb0ade4e4f016 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>