summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
Commit message (Collapse)AuthorAgeFilesLines
* Merge master into api_changesKent Hansen2012-03-276-31/+41
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qisenum.h src/dbus/qdbusconnection_p.h src/widgets/kernel/qwidget.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: I85102515d5fec835832cc20ffdc5c1ba578bd01d
| * Fix measurement system for the UKLars Knoll2012-03-264-9/+18
| | | | | | | | | | | | | | | | THe UK still uses the Imperial system at least for distances and many other things. Change-Id: I99379de35620114328ad6a7fc9b226a46692bedd Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
| * Remove support for Mac OS X compilers without the -Xarch flagThiago Macieira2012-03-241-16/+0
| | | | | | | | | | | | | | | | | | | | This was necessary in order to support Universal builds when this flag wasn't present. This flag can be considered present in all builds now. What's more, Apple doesn't support PowerPC builds anymore anyway, so we won't either. Change-Id: I79c45a450ddf7d58cd4b7da03d6bbf7d3feb0d9a Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
| * Fix loading of the ICU dynamic libraries on Windows.Friedemann Kleint2012-03-241-6/+23
| | | | | | | | | | | | | | | | | | | | | | - Account for differing library name on Windows. - Improve error messages. Acked-by: John Layt <jlayt@kde.org> Change-Id: Ib567f8c79ab4b5655cdb2fe050f91013e9305263 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* | Add support for detecting SSE2 and SSE3 on WinCEThiago Macieira2012-03-261-0/+4
| | | | | | | | | | | | Change-Id: Ic26ba2073d1f1d7e12338811b86f9b99ea8f1eac Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Update QLocale data from CLDR v1.8.1 to CLDR v1.9.1Jędrzej Nowacki2012-03-242-3385/+3404
| | | | | | | | | | Change-Id: Ic84bbc82b364b92605c1bba64b6ec815bff970cb Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Remove detection for MMX support and related technologyThiago Macieira2012-03-232-56/+13
| | | | | | | | | | | | | | | | | | | | | | | | This also removes the check for SSE, but the check for SSE2 and further technologies is kept. If SSE2 is present, then SSE is too. We don't have any code that uses the original SSE instructions only. Remove the CMOV detection, since we don't use that anywhere and we're not likely to ever use them.. Change-Id: I3faf2c555ad1c007c52a54644138902f716c1fe1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* | Fallback implementation of Q_ALIGNOFJoão Abecasis2012-03-233-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | For all practical purposes, the fallback introduced here returns the desired value. Having a fallback enables unconditional use of Q_ALIGNOF. For compilers that provide native support for it, Q_ALIGNOF is otherwise #defined in qcompilerdetection.h. Change-Id: Ie148ca8936cbbf8b80fe87771a14797c39a9d30c Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge master into api_changesKent Hansen2012-03-236-41/+63
|\| | | | | | | Change-Id: I93551e4d13a1b0815b359b9415060e9089477db1
| * Whitespace fix for brace in qstring.cppThiago Macieira2012-03-231-1/+1
| | | | | | | | | | Change-Id: Ia6cf0d2babd931c9ac2a441a9cfec35f2297dddb Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
| * Quick optimisations to QString: no const-ref for QLatin1XXXThiago Macieira2012-03-231-4/+4
| | | | | | | | | | Change-Id: I2c96adc6ae451f085024464791e53739b2d38bab Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
| * Make QLocalePrivate::updateSystemLocale() reset the locale data on UnixLars Knoll2012-03-221-21/+49
| | | | | | | | | | | | | | | | | | | | Reread the environment, and update the locale data on request. Also fix a small bug where the time format wasn't inherited from the LANG environment variable if LC_TIME wasn't set. Change-Id: I619447603ade19d5587b427491cfd9c8fe814858 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Make QLocale not depend on being friends with the global staticThiago Macieira2012-03-222-9/+8
| | | | | | | | | | | | | | | | Don't assume that the global static is a function. Instead, create a class that is friends. Change-Id: I992f4d819b367899b19d95b4983e6b243f0ed932 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * Add qpair.h to the HEADERS listThiago Macieira2012-03-221-0/+1
| | | | | | | | | | Change-Id: I81d078a80b2fba201da9440e3550c2b73adaf668 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| * Remove the false information that IA-64 supports SSE2Thiago Macieira2012-03-221-6/+0
| | | | | | | | | | | | | | | | | | This must have been a mistake. IA-64 processors used to contain an IA-32 core, which supported SSE2. However, the IA-64 mode supported no such thing. Change-Id: I731c6018166af6b897cb697c68aad4ef3ae93132 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | Rewrite QMap to use a RB treeLars Knoll2012-03-232-552/+715
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMap used to use a skiplist in Qt 4.x, which has variable sized nodes and we can thus not optimise using custom allocators. The rewrite now uses a red-black tree, and all allocations and tree operations happen in the cpp file. This will allow us to introduce custom allocation schemes in later versions of Qt. Added some more tests and a benchmark. Memory consumption of the new QMap implementation is pretty much the same as before. Performance of insertion and lookup has increased by 10-30%. iteration is slower, but still extremely fast and should not matter compared to the work usually done when iterating. Change-Id: I8796c0e4b207d01111e2ead7ae55afb464dd88f5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QLatin1String: Suppress MSVC warnning.Debao Zhang2012-03-211-1/+1
| | | | | | | | | | Change-Id: I61ab71549799a5af8cce85e334245642a266c3c8 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | QRegularExpression: support for QStringList overloadsGiuseppe D'Angelo2012-03-212-0/+161
| | | | | | | | | | | | Change-Id: Ia9017348742e41187684185d04b56d27edd383b5 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Generate a forwarding header for QStringBuilder.Stephen Kelly2012-03-201-0/+1
| | | | | | | | | | | | | | This should fix the declarative build. Change-Id: I32dd5b7783995759f27d016c801ae6dfb3d44733 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Add a base class with specialization to QStringBuilder.Stephen Kelly2012-03-191-12/+38
| | | | | | | | | | | | | | | | This will allow separation of API that should work with QString results, and API that should work with QByteArray results. Change-Id: I5be398188abd421bb5056cea2658ea85fc03aa4f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Merge master into api_changesKent Hansen2012-03-1919-13/+212
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvector.h tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp Change-Id: I877256e95f3788e617437f4e9661a88047f38cd6
| * containers: add C++11-style c{begin,end}() as alias for const{Begin,End}()Marc Mutz2012-03-1718-2/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C++11 adds cbegin()/cend() functions for the same reason Qt has constBegin()/constEnd(). This patch adds these functions to the Qt containers with the same implementation as constBegin()/constEnd(). It also fixes the return types in the documentation of existing constFind() functions (documentation only). C++11 only adds cbegin()/cend() (and crbegin()/crend(), which Qt doesn't have). In particular, it doesn't add cfind(), so I didn't supply these, even though Qt comes with constFind(). This is a forward-port of https://qt.gitorious.org/qt/qt/merge_requests/1365. Change-Id: Ida086b64246b24e25254eafbcb06c8e33388502b Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * QRegularExpression: various documentation improvements/fixesGiuseppe D'Angelo2012-03-161-11/+28
| | | | | | | | | | Change-Id: I683afb24f888ab6cf3c543fba8cd193a730709af Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* | Compile QLatin1String with C++11Olivier Goffart2012-03-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | qstring.h: In constructor ‘QLatin1String::QLatin1String(const QByteArray&)’: qstring.h:667:129: error: ‘const char* QByteArray::constData() const’ is not ‘constexpr’ QByteArray has a destructor and therefore cannot be used in constexpr, so do not mark it as constexpr Change-Id: I037e9ae73a244660923eac791cc3e0082d1d7a63 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Don't treat QByteArray(0, char) as nullJoão Abecasis2012-03-161-1/+1
| | | | | | | | | | | | | | | | This also changes behavior for negative sizes, but those cases could be viewed as errors on the client side, anyway. Change-Id: I9e56f2ba53b1edcd9f2faa5384c7d77f6823e24a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QSharedPointer: add reset() member functionsMarc Mutz2012-03-163-0/+41
| | | | | | | | | | | | | | | | | | | | These have been added for std::shared_ptr compatibility, but in particular to allow tst_qnetworkreply && friends to drop the implicit conversions added to QSP by inheritance, so QSP can become final. Change-Id: I0f0401b02125d65622e52393b40a3b10bd9a850c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge master into api_changesKent Hansen2012-03-162-5/+5
|\| | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qmetatype.cpp src/gui/kernel/qplatformsurface_qpa.cpp tests/auto/corelib/tools/qtimeline/qtimeline.pro Change-Id: Iff3fff34eeeb06f02369767ddfce44cfde505178
| * Explicit use of null namespace breaks namespaced buildDonald Carr2012-03-141-3/+3
| | | | | | | | | | | | | | | | These changes are currently required to successfully build Qt when it is configured with a namespace via the configure -qtnamespace argument Change-Id: I9f3ab30579c16085c4d3d05705336b810466c331 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QRegExp: remove docs about RegExp2 being default in Qt5Giuseppe D'Angelo2012-03-141-2/+2
| | | | | | | | | | | | | | Change-Id: I37f4086d53ce6f2d6774ab204808d0d678a68349 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* | Undeprecate operator casts on QByteArray.Stephen Kelly2012-03-161-4/+8
| | | | | | | | | | | | | | | | This reverts part of commit 8397a44bedf542b53284674c87268819f4911d31. Change-Id: I1d2ec018167faeb23a9343b209bb0ff2d8db311d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | QSharedPointer: remove two emtpy functions.Debao Zhang2012-03-152-40/+7
| | | | | | | | | | | | | | | | | | As the comments says:they are broken by design, and replaced with other functions. The purpose of their existence is for BIC with Qt4.5. Change-Id: I9453f816a7b7c6812499b89b7c60f0fd99dea27c Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QRegularExpression: support for QString overloadsGiuseppe D'Angelo2012-03-152-33/+422
| | | | | | | | | | | | | | | | Added support for QString overloads taking a QRegularExpression. Change-Id: I8608ab0b66e5fdd2e966992e1072cf1ef7883c8e Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add QByteArray overload for the QLatin1String ctor.Stephen Kelly2012-03-142-0/+12
| | | | | | | | | | | | | | | | This increases source compatibility when QT_NO_CAST_FROM_BYTEARRAY is used. Change-Id: Ie1a1cfa8acac2fa91aa8f217d91e22289be8b38f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QRegularExpression: QMetaType and QVariant supportGiuseppe D'Angelo2012-03-141-2/+0
| | | | | | | | | | | | | | | | | | Removed the Q_DECLARE_METATYPE in favour of first-class support inside QMetaType and QVariant. Change-Id: I904236822bfab967dc0fbd4d4cc2bcb68c741adc Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Merge "Merge remote-tracking branch 'origin/master' into api_changes" into ↵João Abecasis2012-03-122-12/+203
|\ \ | | | | | | | | | refs/staging/api_changes
| * | Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-03-122-12/+203
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp Change-Id: I884afc3b6d65c6411733a897a1949e19393573a7
| | * QRegularExpression: add error strings for translationGiuseppe D'Angelo2012-03-121-0/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added the error strings from PCRE to be picked up by lupdate, to enable translations. Change-Id: Iaeabde5d7a17f9a0273511e0741e67a097d23a98 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| | * Restore some source compatibilityLars Knoll2012-03-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an implicit #include back in to avoid needless SC and compilation breaks. Add some deprecated method for codecForTr, until all other modules are ported to mot use it anymore. Change-Id: I5334b47a0c32819b9eb6b7203cc98ce4e6073a64 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
| | * QRegularExpression: minor fix to captureIndexForNameGiuseppe D'Angelo2012-03-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-081-12/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Fix QString:mid and midRef, againJoão Abecasis2012-03-121-4/+16
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/api_changes' into containtersJoão Abecasis2012-03-0838-632/+3045
|\| | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qmetaobject.cpp src/corelib/kernel/qvariant.cpp src/tools/moc/moc.h Change-Id: I2cd3d95b41d2636738c6b98064864941e3b0b4e6
| * QRegularExpression: add optimizations autotestGiuseppe D'Angelo2012-03-071-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Exporting the counter that controls the optimization of a compiled pattern lets us to forcibly optimize all patterns. Therefore, two tests are now run: one with default optimization values and another one which always optimizes the pattern. The counter itself was renamed with a qt_ prefix and put inside the Qt compilation namespace (thanks to rohanpm for pointing it out). Change-Id: I56602433d37adc127772b2d0d2cdaf2e49d43c71 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QRegularExpression: fix optimizePattern, document the issueGiuseppe D'Angelo2012-03-071-7/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The studyData pointer is atomically set by the pointer assignment, but another processor running a different thread might see the new studyData value but not the memory it points to. Therefore, the current studyData is returned from optimizePattern and used by that thread. Docs were added to optimizePattern to explain what's going on. Change-Id: I4502c336077bb98a1751011aa93ffd4f585ed101 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QRegularExpression: fix documentation due to qdoc changesGiuseppe D'Angelo2012-03-071-16/+16
| | | | | | | | | | | | | | Removes the usage of various qdoc macros which are now deprecated. Change-Id: I74fa70f8d2a2a1bff57cdb2bcc14a31a7198dea0 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
| * Fixed warning from gcc with -Wundef for some values of WCHAR_MAXRohan McGovern2012-03-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Certain versions of system headers will declare WCHAR_MAX like: #define __WCHAR_MAX ( (wchar_t) - 1 ) #define WCHAR_MAX __WCHAR_MAX In particular on ARM (see e.g. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=598937 ) In this case, defined(WCHAR_MAX) is true, but attempting to use the value of WCHAR_MAX in a preprocessor expression will not give the desired results - "wchar_t" is unknown to the preprocessor, so WCHAR_MAX silently (without -Wundef) evaluates to ( (0) - 1 ) == -1. A simple workaround is to avoid looking at WCHAR_MAX when the superior __SIZEOF_WCHAR_T__ is defined. Change-Id: I439b166cffb93416737ee19025fb6e8d51c27876 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Support legacy QDataStream serialization of QDate.Aaron McCarthy2012-03-071-4/+14
| | | | | | | | | | | | | | | | | | | | | | Commit 8327fa7c11f6c84ccc66be4365ee282a76288788 changed the type of the Julian day member of QDate from quint32 to qint64. This changed the QDataStream format. Keep the old behavior, with the limited date range, if the stream version is less than Qt_5_0. Change-Id: I800448979a1891581069f39de7f9ab9c634e4f0e Reviewed-by: John Layt <jlayt@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Use #define before including SHA-2 3rdparty codeBradley T. Hughes2012-03-071-17/+15
| | | | | | | | | | | | | | | | Using typedef causes errors due to re-definition, so #define the types needed by the SHA-2 code to the q[u]int* equivalents instead. Change-Id: I6fc29788dd05aeee28723820f511527d482d31f2 Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
| * QRegularExpression: const correctness fixesGiuseppe D'Angelo2012-03-061-9/+9
| | | | | | | | | | | | | | Adding some const qualifiers to members which are never written. Change-Id: Ibb8953764c7b7790a419a5d48f2956751d5fc1f9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QRegularExpression: add captureCount()Giuseppe D'Angelo2012-03-062-0/+15
| | | | | | | | | | | | | | | | QRegularExpression::captureCount() returns the number of capturing groups inside the regular expression pattern. Change-Id: Ib90ce67c67d06ab2966f0c98bd91da21defc156d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>