summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
...
| | * Remove QVariant constructor taking Qt::GlobalColor.Jędrzej Nowacki2012-04-192-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | The constructor is wrong, it creates instance of QVariant encapsulating a QColor instance. QVariant should not implicitly convert data, never. Change-Id: Idc794ecdecb42d8b53fee3f993bf51ddd43f595d Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| | * Remove redundant check in QMetaType::typeInfoJędrzej Nowacki2012-04-181-2/+1
| | | | | | | | | | | | | | | | | | | | | The check was introduced when void was not a fully defined type. Change-Id: I4df8607999436f8db92be77fc8fd203fc66c2816 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| | * Remove redundant checks in QVariant.Jędrzej Nowacki2012-04-181-6/+0
| | | | | | | | | | | | | | | | | | | | | QVariant and QMetaType have aligned type naming implementation. Change-Id: I9eaae1045c492c148e3e9d23f4e04d48272f7ec2 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| | * Hide QTypeModuleInfo in a private namespace.Jędrzej Nowacki2012-04-183-17/+17
| | | | | | | | | | | | | | | | | | | | | The class is private and shouldn't pollute global namespace. Change-Id: Ib44473fd72e5a70096eeff1662e88b29263d19c6 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* | | Work around std::wstring not being defined on Android.Robin Burchell2012-05-031-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libstdc++ requires wchar.h (which bionic provides), but it also requires additional functionality which bionic does not provide, thus, std::wstring proper basically doesn't exist. Provide a compatibility shim so we can keep API intact. This feature existed in a similar guise in the past, but was removed in d868c9945a188d6ad22e0b7d6d24ac7fca00ab4e. Change-Id: I6cab6f41d04ad9dde97e3ce73506f9d8a42043fb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add some missing includes.Stephen Kelly2012-05-032-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | There is a #include <QStringList> line wrapped in QT_DEPRECATED_SINCE(5, 0). Change-Id: I766848dfcc3bd765c57626a3d70f492ac1219091 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Remove references to to/fromAscii in QString and QByteArray main docsThiago Macieira2012-05-035-139/+125
|/ / | | | | | | | | | | | | | | | | | | | | | | Those functions are about to be deprecated and shouldn't be referred to in the main documentation. Since they were temporarily changed to mean UTF-8, this is not a behaviour change. The next commit will update the code to match the documentation. Change-Id: Ia8c2843c7f2b478f5691fe0224d5e631d94b1af6 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Simplify the size of the QVarLengthArray buffer.Thiago Macieira2012-05-031-2/+1
| | | | | | | | | | | | | | | | | | | | | | The previous calculation was too complex for no good reason. QVarLengthArray actually doesn't change the size after this change due to padding, but we don't need to include the padding in our own calculation. Task-number: QTBUG-25113 Change-Id: I72ea214f0d96870ecf8ff65737e7ca14e19afc7a Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Fix the QByteArray overloads to QString::fromXXXXThiago Macieira2012-05-031-18/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c951908bc201afa59402967d50fa926212845fae added these overloads, but did not properly use qstrnlen to get the size. This means we get subtle errors because other methods do have them. For example: QByteArray ba("abc\0def", 7); // ba embedding a NUL QString s1(ba); QString s2 = QString::fromAscii(ba); s1 == s2; // FAILS QString s3; s3.append(ba); s3 == s2; // FAILS Tested in an upcoming commit. Change-Id: I22864521a42da789d522d7b75790696928d9ec32 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Work around Android not having SYS_futex.Robin Burchell2012-05-021-2/+5
| | | | | | | | | | | | | | | | Even though we really shouldn't, we can get away with using __NR_futex instead. Done-with: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I0ba449b740acf2c78825f8093d1515a74f0bc9cd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Avoid macro re-definition warning for QT_NO_EXCEPTIONSStephen Kelly2012-05-021-1/+3
| | | | | | | | | | Change-Id: I0c4b2d00dd567af17f22b733b93032ff1056fcbd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Avoid undefined macro warning for __GXX_EXPERIMENTAL_CXX0X__.Stephen Kelly2012-05-021-1/+1
| | | | | | | | | | | | | | The GCC use of this is already correct. Change-Id: I28650196c7a325b552117fe2f2014ad7d6b365c2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add "make docs" target for QtNetwork and sanitize other qdocconfs.Casper van Donderen2012-05-021-20/+20
| | | | | | | | | | Change-Id: Ic9d6384b20162debeb69cb067c96c330c0fd999a Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* | mkdtemp() is not included in Android's libcRobin Burchell2012-05-021-2/+2
| | | | | | | | | | | | | | | | Use our own implementation instead. Change-Id: Ic04dd480d52404e03e26cdf4caa1d00e4c3219c7 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: David Faure <faure@kde.org>
* | Fix compilation of public headers with QT_NO_DEPRECATED definedOlivier Goffart2012-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | Put the functions in QT_DEPRECATED_SINCE if possible QPluginLoader::staticInstances is not documented as deprecated, and do not reference any alternative use. So I unmarked it as deprecated. Change-Id: I556c3f3657fb0490dd5543fcc56718fe9bd394e7 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* | Introduce QObject::isSignalConnected(QMetaMethod)Olivier Goffart2012-05-023-3/+65
| | | | | | | | | | | | | | | | | | This is much more performant than calling QObject::receivers(const char*) Can be used instead of connectNotify in some cases. Change-Id: I19e0933f678f171f515d9a0f69f0ad4fb7d894b4 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* | Fix regression in connectNotify(const char *) emissionKent Hansen2012-05-013-9/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reimplementations of connectNotify() and disconnectNotify() can assume that the signal argument is in normalized form, but after the introduction of the Qt5 meta-object format, it could happen that it's not. The problem is that the internal QArgumentType class, which attempts to resolve a typename to a type id, was calling QMetaType::type(). QMetaType::type() falls back to trying the normalized form of the typename if the original argument can't be resolved as a type (this behavior isn't documented, but that's how it works). This means that e.g. QMetaType::type("const QString &") returns QMetaType::QString. Since QMetaObjectPrivate::indexOfMethodRelative() (more specifically, the methodMatch() helper function) prefers to compare type ids over typenames (since the type ids are stored directly in the meta- object data for built-in types), the method lookup would *succeed* for signatures with non-normalized built-in typenames as parameters. QObject::connect() would then think that it did not have to normalize the signature (see "// check for normalized signatures"). The consequence was that the original, non-normalized form got passed to connectNotify(). This commit introduces an internal typename-to-type function that is the same as QMetaType::type(), except it doesn't try to normalize the name. This way, the only place where normalization can occur in the signature-to-meta-method processing is through the calls to QMetaObject::normalizedSignature() in QObject::connect() itself. The implication is that there are now cases where the method signature will be decoded and processed twice, where processing it once was sufficient before. On the other hand, it is consistent with the pre-Qt5-meta-object behavior, where we predict that the signature is already normalized, and only perform (comparatively costly) normalization if the initial lookup fails. Change-Id: Ie6b60f60b0f9a57ebd378d980329dac62d57bbd9 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* | Fixed uninitialized memory in QMetaObjectBuilder::fromRelocatableDataRohan McGovern2012-05-011-0/+1
| | | | | | | | | | | | | | | | | | | | static_metacall was never set on the metaobject written by QMetaObjectBuilder::fromRelocatableData, sometimes causing a crash. It should be initialized to 0. Change-Id: I79373d895e131f0cc2ff1af6d2177a0c1a282be7 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Allow loading of static plugins by indexLars Knoll2012-05-011-10/+19
| | | | | | | | | | | | | | | | | | | | Static plugins could so far not get loaded by index. Implement the missing support for this. Task-number: QTBUG-25274 Change-Id: I901b08bfaf4f9fc3cb9fcea0b47f3ed89588a27b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Initialize member variableLars Knoll2012-05-011-0/+1
| | | | | | | | | | | | Change-Id: Icfbe064e89b0c2f7b67ba58cbdc79347275b63b1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* | Restructure how we initialize hash nodes a littleLars Knoll2012-05-012-15/+14
| | | | | | | | | | | | | | | | | | This should help to silence coverity which was complaining hundreds of times about Qt not initializing h and next in QHashNode. Change-Id: Ib7977693e9786d4b310799e4f428115c65bb3fee Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Port QBuffer to QMetaMethod-based connectNotify()Kent Hansen2012-05-012-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | The const char *-based API is deprecated and will be removed in Qt5. Also fix a bug in the disconnectNotify() reimplementation; when all signals are disconnected at once, disconnectNotify() is only called a single time, with an invalid method as argument. Thus, the signal connection count should be set to 0, instead of decremented. Change-Id: Ieee92293777bff87f8b28e56e23ab55d0b8b8101 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add QMetaMethod-based QObject::connect/disconnectNotify() APIKent Hansen2012-05-016-38/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This API will fully replace the const char *-based connectNotify() and disconnectNotify() in Qt5; the old functions will be REMOVED before Qt 5.0 final. The new implementation fixes the long-standing issue of connectNotify() not being called when using the (internal) index-based QMetaObject::connect() (e.g., from QML). As with the old API, there are still two "unintuitive" behaviors concerning disconnectNotify(): - disconnectNotify() is not called when the signal is disconnected using the QObject::disconnect(QMetaObject::Connection) overload. - disconnectNotify() is not called when a receiver is destroyed (i.e., when a connection is implicitly removed). The old versions of connectNotify() and disconnectNotify() are kept for now, and they are still called. They will be removed once known existing reimplementations (e.g., QtNetwork, QtDBus) have been ported to the new API. Change-Id: I8b4f007f3c6d89199c1ba04a3e23c8ca314e0896 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* | Disable force_align_arg_pointer function attribute with MinGW-w64Jonathan Liu2012-04-301-1/+1
| | | | | | | | | | | | | | | | | | | | The force_align_arg_pointer function attribute is not necessary for MinGW-w64 to align stack for SSE and generates a compiler warning as it is ignored. Do not use force_align_arg_pointer with MinGW-w64 to silence the warning. Change-Id: I58a754dc3ec01b36a1d3c9490f45ccf0824468ba Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | Fix Qt::MouseButton Documentation for Qt::ExtraButton24,stockton2012-04-302-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Documentation for the 'more mouse buttons' feature has a Typo on Qt::ExtraButton24 (is shown as "Qt::ExtraButton44", no value.) Also, the order of BackButton/Xbutton1/ExtraButton1 causes the 'BackButton' value to be a forward reference to XButton1, which makes it awkward and hard to understand. Same with ForwardButton/ XButton2/ExtraButton2. Task-number: QTBUG-25529 Change-Id: I04b76d91d7a2155c1917a809a51700059320f510 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* | Fix MinGW-w64 compilationJonathan Liu2012-04-301-3/+3
| | | | | | | | | | | | | | | | | | Use qintptr and quintptr for exchanging data with registers for cpuid as the size of long does not match the size of the register on Win64 which uses the LLP64 data model. Change-Id: I23b8c8e0977166f7e62795c16e9080e44d9f25f5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | [SIC] Make non-const the QRegExp methods that modify the internalsThiago Macieira2012-04-282-18/+6
| | | | | | | | | | | | | | | | | | | | | | These methods modify QRegExp internals and should not have been const. It's actually dangerous to have them const, since users may think it's safe to use the matching method in a thread-safe manner. Task-number: QTBUG-25064 Change-Id: Ia370eb42fd0407a94924f420297c5e83d3908214 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Don't use the QRegExp methods that modify the object [QtCore]Thiago Macieira2012-04-274-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QRegExp matching methods modify the object, which we don't want to. In particular, when we receive a QRegExp from the user or we store in a context that might require thread-safety, make sure we make a copy before using it. QRegularExpression has no such shortcoming. Task-number: QTBUG-25064 Change-Id: Icf22986cd5f6fd086518c78a7d56e6cadfe9f5f6 Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Move QWinEventNotifier data members to a private classShane Kearns2012-04-272-20/+33
| | | | | | | | | | | | | | | | | | | | This is a binary incompatible change to allow future changes to QWinEventNotifier to be possible in a binary compatible way. Change-Id: I268d3e01d8ee237ecbd164ee0f7cae1eb73dd725 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Debao Zhang <dbzhang800@gmail.com>
* | Fix warning about int-truncation (MSVC2010, 64bit).Friedemann Kleint2012-04-271-1/+1
| | | | | | | | | | | | Change-Id: Idfc483ccb80a8bbad128672052edfa04635bd532 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* | Add QMetaMethod::fromSignal() functionKent Hansen2012-04-273-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given a member function that's a signal, returns the corresponding QMetaMethod. Inspired by the implementation of the template-based QObject::connect(). The primary use case for this function is to have an effective and exact (not subject to shadowing) way of checking whether a known signal was connected to in reimplementations of QObject::connectNotify(QMetaMethod), avoiding string comparisons. Example: void MyObject::connectNotify(const QMetaMethod &signal) { if (signal == QMetaMethod::fromSignal(&MyObject::mySignal)) { // Someone connected to mySignal ... } } Change-Id: I5e4de434275fe543c004d569dcaa9ceda3442f03 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* | Mark that the Sun compiler includes the return type in the manglingThiago Macieira2012-04-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Source: http://developers.sun.com/solaris/articles/external_linkage.html %dem __1cFgreet6F_pc_ __1cFgreet6F_pc_ == char*greet() Source: http://www.oracle.com/technetwork/articles/servers-storage-dev/stablecplusplusabi-333927.html Function Mangled Name float f(float) __1cBf6Ff_f_ int f(int) __1cBf6Fi_i_ int T::f(int) __1cBTBf6Mi_i_ int T::f(char*) __1cBTBf6Mpc_i_ int T::U::f(int) __1cBTBUBf6Mi_i_ int N::T::f(int) __1cBNBTBf6Mi_i_ Change-Id: Ibe1934f1c137d1657fb122cbf1a1b1fbc3e4a202 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* | fix build with mingwKonstantin Ritt2012-04-271-17/+17
| | | | | | | | | | | | | | since MinGW is GCC, invert the order and place the GCC constructs first Change-Id: I98113aa77e51f9e01c3641987e915bf475053a60 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | get rid of Q_*_EXPORT_INLINE macrosKonstantin Ritt2012-04-262-60/+8
| | | | | | | | | | | | | | | | | | | | | | | | > Girish: > We should be able to remove the macro completely today, > just mark all those functions as plain inline. > With Qt5, we don't have to worry about bc yet. this fixes "import attribute ignored" warnings on mingw with -fno-keep-inline-dllexport Change-Id: I616e5de7c8d59953ce03a316b941a439fae56298 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Fix C++11 compilationOlivier Goffart2012-04-261-6/+6
| | | | | | | | | | | | | | | | Fix compilation with compilers that support user defined literal (such as GCC 4.7) Change-Id: I31cd3d2177688f963ab33cf68cd6060a5fb8640f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Doc: Use the proper way to find qdoc.Casper van Donderen2012-04-261-1/+2
| | | | | | | | | | | | | | | | Previously $$QT.core.bins was used to find qdoc, the proper way is to use qtPrepareTool(). Change-Id: I5d97f5517ae63253ccaf1fb1487034c3a312a074 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* | Ensure that QUrl::{to,from}LocalPath encode/decode properlyThiago Macieira2012-04-261-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike path(), toLocalFile() isn't reporting a URL component, so it should decode the percent-encoded characters fully. This extra decoding pass is meant to catch %00 to %1F, %7F and %25 (the percent sign itself). It also catches %80 to %FF, which aren't decoded because they don't form UTF-8 sequences. That means QUrl::toLocalFile() has undefined behaviour if the path contained non-UTF8 sequences. Task-number: QTBUG-25459 Change-Id: Iab5a0ba6afcfc4510e297984f2ffc208cedd752b Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* | Remove QMetaObjectExtraData and put everything into QMetaObjectOlivier Goffart2012-04-256-61/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMetaObjectExtraData was added when support for QMetaObject::newInstance was added. One needed a place to put the pointer to static_metacall in the QMetaObject. But as we break binary compatibility, one can change the size of QMetaObject, and put everything back inside QMetaObject's own structure. Meaning it is not required anymore to have one QMetaObjectExtraData instance per QMetaObject anymore. Change-Id: If0b8f586cbaf633eed10045adee3ba3366826c86 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* | Split qobject_impl.h into qobjectdefs_impl.hKent Hansen2012-04-254-425/+488
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done to make QtPrivate::FunctionPointer available to the QMetaMethod declaration in qmetaobject.h (which already included qobjectdefs.h, since that's where QMetaObject is declared), so that the new template-based QMetaMethod::fromSignal() function may be implemented. The logic for statically generating the array of qMetaTypeId (used by the template-based QObject::connect()) remains in qobject_impl.h, since it's not needed for QMetaMethod::fromSignal(). Moreover, moving that code would introduce a circular dependency, since qmetatype.h as of commit 194674044693d6b101c3dc2f4784718540d343a4 now includes qobjectdefs.h. Change-Id: I36c35041e0c6661c3cf523684177a0b6c19e2d35 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* | Add comparison operators == and != for QMetaMethodKent Hansen2012-04-252-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | This is done in preparation of introducing the QObject::connectNotify(QMetaMethod) function. Together with the forthcoming QMetaMethod::fromSignal() function, which returns the QMetaMethod corresponding to a Qt/C++ signal (member function), the comparison operators provide an effective way of checking which signal was connected to. Change-Id: I2de48628c4884a7174fb8574895f272cb3fe5634 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* | Add detection code for AVX2, HLE, RTM and AES to qsimd.cppThiago Macieira2012-04-252-17/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AES is currently not enabled, since we don't use it for anything. The code is here with the proper detection should we want to in the future. RTM and HLE (Transactional Memory Extensions) I'll use soon in the locking code. Also rename a few variables to make it easier to read later on. Change-Id: I800c66d7e1ba86ec037692928d94f53ea5d5868f Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | Replace the x86 XGETBV instruction with its opcode bytesThiago Macieira2012-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a new instruction, present on the SandyBridge architecture and later. Some older assemblers do not support it and produce: {standard input}:225:no such instruction: `xgetbv' The use of this instruction is protected by a CPUID check (function 1, ECX bit 27), so we only run it in processors that do support it. Change-Id: Ife7500c0deaab9539074835a4511e8c19602608e Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* | Update the x86 feature-detection code, unifying x86 and x86-64Thiago Macieira2012-04-251-125/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of it is the same for both of them, so let's avoid doing everything twice. Or more, since we may support x32 soon. For Windows, use the intrinsics. For GCC, we'd like to use cpuid.h, but it only exists since GCC 4.3, so we can't. And properly detect AVX support: it's not enough to detect that the processor supports them, we also need to check that the OS enabled support for the 256-bit registers. Change-Id: Ibb4872cdb774de5701b18c40f4e612330a266214 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | Fix atomics on SPARCThiago Macieira2012-04-251-8/+8
| | | | | | | | | | | | | | | | | | Inspired by https://bugreports.qt-project.org/secure/attachment/26020/qt_atomic_sparc64.patch Task-number: QTBUG-22479 Change-Id: Ie3275df96c639d6a75e05f70fe5745aeb34457f9 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* | Revert QUrl::isRelative to its Qt 4 behaviourThiago Macieira2012-04-251-4/+6
| | | | | | | | | | | | | | | | | | Instead of trying to return whether the URL is relative to something undefined, let's instead follow what the documentation was saying all along and what the RFC says about "Relative References". Change-Id: I32722321a6b36c6e3480669ad769390e4c6f7d1c Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | get rid of QT_NO_IMAGE_TEXT switcherKonstantin Ritt2012-04-255-15/+0
| | | | | | | | | | Change-Id: Ie72f907ffb959f629af6a414959348a992c4c941 Reviewed-by: aavit <qt_aavit@ovi.com>
* | optimize QChar::decomposition()Konstantin Ritt2012-04-251-27/+32
| | | | | | | | | | | | | | | | | | | | * by not using QString::fromUtf16() as we know for sure that the data is 'raw' UCS-2; * it's safe to avoid a check for > UNICODE_LAST_CODEPOINT as GET_DECOMPOSITION_INDEX macro already does a similar check Change-Id: Ifb660efc51c664d06733ac8ed46d54278520da06 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Fix locale issue on unix systemsStephen Röttger2012-04-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | QSystemLocale::query() was missing the LanguageId QueryType. Therefore QSystemLocale::fallbackLocale() was always used as default language, which reads environment variables in the order: LC_ALL -> LC_NUMERIC -> LANG. The correct behaviour is to read LC_ALL -> LC_MESSAGES -> LANG. This leads to problems for users that want to use english language, but non-english localization features (date, number formats etc.) Change-Id: I4310537dac8622a3dd79231fbad58e22f20ca262 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: John Layt <jlayt@kde.org>
* | qunicodetables generator: improve the output and the generated codeKonstantin Ritt2012-04-242-29/+33
| | | | | | | | | | | | | | | | | | | | | | better memory usage report; an additional asserts with conditions the implementation is depends on; a namespace for the internal static data; styling fixes Change-Id: Id4048ff6104c56b5f590f9ac6fbf7c0bce79ec47 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | workaround issue where casing diff overflows signed shortKonstantin Ritt2012-04-243-11/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there are two such codepoints were added in the Unicode 5.1: U+1D79 LATIN SMALL LETTER INSULAR G U+A77D LATIN CAPITAL LETTER INSULAR G two more of them were added in the Unicode 6.0: U+0265 LATIN SMALL LETTER TURNED H U+A78D LATIN CAPITAL LETTER TURNED H and two more were added in the Unicode 6.1: U+0266 LATIN SMALL LETTER H WITH HOOK U+A7AA LATIN CAPITAL LETTER H WITH HOOK we map them like special cases with length == 1 (note: all are in BMP which is checked explicitly in the generator) Change-Id: I8a34164eb3ee2e575b7799cc12d4b96ad5bcd9c6 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>