summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstring.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change to release license header.Jason McDonald2011-02-161-13/+13
| | | | Reviewed-by: Trust Me
* Update copyright year to 2011.Jason McDonald2011-01-111-1/+1
| | | | | Reviewed-by: Trust Me (cherry picked from commit ac5c099cc3c5b8c7eec7a49fdeb8a21037230350)
* Compile fix.Samuel Rødal2010-11-171-1/+1
| | | | | | Not sure why this worked before. Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
* Don't set -mfpu=neon globally if the compiler supports neon.Samuel Rødal2010-11-111-1/+1
| | | | | | | | | | By default only drawhelpers and image loaders will now use neon. If -mfpu=neon has been explicitly enabled in the mkspec, QT_ALWAYS_HAVE_NEON will be defined, allowing the use of neon intrinsics elsewhere. Task-number: QTBUG-15163 Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
* Doc: Fixed minor documentation issues.David Boddie2010-10-121-1/+1
|
* Merge branch '4.7-upstream' into 4.7-docA-Team2010-10-071-1/+1
|\
| * Reference to QStringList::find() is incorrect, should be QStringList::filter().Robin Burchell2010-09-271-1/+1
| | | | | | | | Task-number: QTBUG-9248
* | Doc: correcting bug - lenght() pointed to setLength() in "See also" section. ↵Morten Engvoldsen2010-10-071-1/+1
| | | | | | | | Correct link is resize()
* | Corrected doc about ASCII string.Jerome Pasion2010-10-041-1/+1
|/ | | | | Task-number: QTBUG-13414 Reviewed-by: David Boddie
* Make the de-inlined isRightToLeft not get called from updatePropertiesThiago Macieira2010-09-221-20/+23
| | | | | | | | | | | | | | | | | | Before Qt 4.7, QString::isRightToLeft was an inline function that called QString::updateProperties(). In Qt 4.7, QString::isRightToLeft was de-inlined and is now called from QString::updateProperties(). According to the Binary Compatibility Guidelines, it's ok to de-inline a function provided that it's ok the old method is called. Under some rare circumstances nowadays, the old method could be called from updateProperties(), which would result in an infinite loop (updateProperties -> isRightToLeft -> updateProperties -> ...) This is usually prevented by -fvisibility-inlines-hidden in GCC (automatic in Qt) and also by -Wl,-Bsymbolic-functions (not automatic, must pass -reduced-relocations to configure). Reviewed-by: Bradley T. Hughes
* Merge commit 'staging-1/4.7' into doc-4.7Morten Engvoldsen2010-09-031-13/+10
|\
| * Rewrite ucstrcmp in terms of ucstrncmpThiago Macieira2010-09-021-13/+10
| | | | | | | | Reviewed-By: Bradley T. Hughes
* | Clarified the comparison statement and fixed the reference to a non-existent ↵Jerome Pasion2010-09-011-2/+2
| | | | | | | | | | | | | | constructor. Reviewer: David Boddie Task: QTBUG-13244
* | Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1.git into ↵Morten Engvoldsen2010-08-301-15/+48
|\ \ | |/ | | | | | | | | | | | | doc-4.7 Conflicts: doc/src/getting-started/examples.qdoc doc/src/index.qdoc
| * Update comments in QString about alignment performance.Thiago Macieira2010-08-241-15/+48
| | | | | | | | | | | | | | | | | | | | | | | | This commit makes no code change at all. Write down the conclusions from experimenting with the x86 SIMD instructions for faster string comparison routines. Long story short: we're already pretty good. The SSE4.2 string instructions are probably more useful for "implicit-length mode" (that is, the end of the string is marked by a NUL), rather than QString's "explicit-length mode".
* | Merge commit 'remotes/staging/os1-4.7' into 4.7Morten Engvoldsen2010-08-131-1/+1
|\ \ | |/ |/|
| * Document that toUcs4 is not null-terminated.Frans Englich2010-04-171-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-9239 Reviewed-by: joao Conflicts: src/corelib/tools/qstring.cpp
* | Fix QString::arg: When specifying %L1, the group separator would be added ↵Olivier Goffart2010-08-091-5/+8
| | | | | | | | | | | | | | even if the local specify QLocale::OmitGroupSeparator Task-number: QTBUG-9281 Reviewed-by: Denis
* | Added missing header to qstring.cpp.axis2010-07-211-0/+4
| |
* | Remove qMemCopy() usage from all .cpp files of Qt itself.Robin Burchell2010-07-181-3/+3
| | | | | | | | | | | | | | | | This is (supposedly) more efficient as the compiler can optimise it to a builtin, per Thiago. Merge-request: 2430 Reviewed-by: Andreas Kling <andreas.kling@nokia.com>
* | doc: Fixed several qdoc warnings.Martin Smith2010-07-131-1/+1
| |
* | Use native locale aware string comparison on Symbian.Denis Dzyubenko2010-06-151-0/+4
| | | | | | | | | | | | | | Fix to use the native CompareC function instead. Task-number: QTBUG-11350 Reviewed-by: Miikka Heikkinen
* | Fix QString::isRightToLeft() to conform with Unicode Bidi algorithmLars Knoll2010-06-091-9/+11
| | | | | | | | | | | | | | Rules P2 and P3 demand us to ignore the LRE/LRO/RLE/RLO characters for determining the paragraph direction. Task-Number: Part of QT-3292
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-06-031-4/+7
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fix compilation: disable -no-feature-* for bootstrapped QString: Fix severals bugs when comparing with QStringRef QProgressBar: make accessors const. Changes: add patch for artificial emboldening Added static version of QGLFramebufferObject::release(). Fix compilation on WinXP MinGW32; Add a new qconfig feature GESTURES
| * | QString: Fix severals bugs when comparing with QStringRefOlivier Goffart2010-06-031-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the internal ucstricmp and ucstrcmp contains different bugs if the strings are not 0-terminated, as it is with QStringRef. - in ucstricmp, even if the pointer are the same, the lenght could be different - we used to deference the 'end' pointer, that would be 0 if the string ends with 0, but we cannot do that in the general case Task-number: QTBUG-10404 Reviewed-by: Denis
* | | fix setRawData()Oswald Buddenhagen2010-06-011-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | setRawData() itself (consistently with fromRawData()) sets alloc to the passed raw size, so the check at the start would always find that we cannot re-use the qstring object, thus completely defeating the purpose of the function. so also check that the string data pointer actually points into the internal array before giving up. Reviewed-by: olivier
* | prevent fake normalizationRitt Konstantin2010-05-201-2/+4
| | | | | | | | | | | | | | | | if normalization was requested for QChar::Unicode_Unassigned version; treat it like latest supported version instead Merge-request: 2393 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* | prefer QChar::*surrogate() over hardcoded valuesRitt Konstantin2010-05-201-3/+3
| | | | | | | | | | Merge-request: 2393 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* | doc: Fixed many broken links.Martin Smith2010-05-191-2/+2
| |
* | add QString::setRawData() and revive QByteArray::setRawData()Oswald Buddenhagen2010-04-291-1/+39
|/ | | | | this is solely for optimization purposes - saves a free()/malloc() pair each time an existing object is re-used.
* Use the default codec with QString::vsprintf()Florian Vichot2010-03-231-0/+11
| | | | | | | | | QString::vsprintf was not decoding the format string according to QTextCodec::codecForCString, thus making qDebug("ééé") display improperly, even if using a utf8 terminal, utf8 source files and a codec for cstrings configured as utf8. Added a unit test. Merge-request: 530 Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
* remove qt_winQString2MB() and qt_winMB2QString()Oswald Buddenhagen2010-03-111-94/+6
| | | | | | absorb qt_winQString2MB() code directly into the QTextCodec code Acked-by: thiago
* doc: Fixed several qdoc errors.Martin Smith2010-03-091-11/+11
|
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-03-071-81/+96
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (57 commits) fix corewlan detection error when building for 10.5 when 10.6 is also fixed treatment of zlib on Mac when crossbuilding Partial overloading support for qdbus cli tool. Allow empty authority in QUrl::setAuthority as per docs. Added test for QTBUG-6962: Empty authority ignored by QUrl::setAuthority. fixed case of GL include directory check in MAC_APPLICATION_MENU translations Re-generate the Unicode tables after updates to the program that generates them Fix the code after merge: DerivedNormalizationProps has two or more columns add some usefull definitions to qunicodetables_p.h qchar.cpp: fix identation finish last commit prefer DerivedNormalizationProps.txt over CompositionExclusions.txt improve error reporting a bit more improve error reporting fix incorect condition check if string to int conversions were done w/o errors improve error reporting for unassigned grapheme/word/sentence break classes avoid using of qunicodetables_p.h in generator use QHash for line break map ...
| * add some usefull definitions to qunicodetables_p.hRitt Konstantin2010-03-051-2/+2
| | | | | | | | | | | | | | | | | | | | * CURRENT_VERSION macro in qunicodetables.cpp was renamed to UNICODE_DATA_VERSION and it's definition was moved to qunicodetables_p.h * LAST_UNICODE_CHAR macro in qchar.cpp was renamed to UNICODE_LAST_CODEPOINT and it's definition was moved to qunicodetables_p.h Merge-request: 480 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
| * Make QString::toUtf8() also use QUtf8.Thiago Macieira2010-03-051-39/+5
| | | | | | | | Reviewed-By: Denis Dzyubenko
| * Doc: add some notes about QString lossy/lossless conversionsThiago Macieira2010-03-051-5/+38
| |
| * Doc: fix a mistake saying that const char* was converted to QLatin1StringThiago Macieira2010-03-051-5/+5
| |
| * Doc: Update QString docs about real ASCII and to/fromAscii and NULs.Thiago Macieira2010-03-051-31/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Despite the names, the QString::toAscii and QString::fromAscii functions are not about ASCII. One can set an ASCII-incompatible codec using QTextCodec::setCodecForCStrings, which may lead to loss of information. Also update the docs about how the functions that take QByteArray take embedded NULs in the QByteArray into account. The result is: stop conversion at NUL: operator=, operator==, operator!= include NUL in conversion: operator<, operator<=, operator>, operator>= Reviewed-by: ossi
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Rohan McGovern2010-03-061-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe examples/multimedia/audioinput/audioinput.cpp src/corelib/io/qfsfileengine.cpp src/gui/egl/qegl_wince.cpp src/gui/egl/qeglproperties.cpp src/gui/egl/qeglproperties_p.h src/gui/embedded/directfb.pri src/gui/kernel/qapplication_win.cpp src/gui/painting/qdrawutil.cpp src/opengl/qgl_p.h src/sql/drivers/odbc/qsql_odbc.cpp src/sql/drivers/odbc/qsql_odbc.h tests/auto/auto.pro tests/auto/qgl/tst_qgl.cpp translations/assistant_adp_ru.ts
| * QString::section: Fix crash with SectionIncludeLeadingSep flagOlivier Goffart2010-03-021-1/+1
| | | | | | | | | | | | | | | | And start is out of bounds. Reviewed-by: Thiago Reviewed-by: Joao Task-number: QTBUG-4306
* | Fix the SIMD implementations of QString::toLatin1()Benjamin Poulain2010-02-251-7/+13
| | | | | | | | | | | | | | | | | | The SSE implementation used signed integers. This was failing for characters with high value. The Neon implementation was using >= instead of > for creating the mask Reviewed-by: Samuel Rødal
* | Implement toLatin1_helper with NeonBenjamin Poulain2010-02-251-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement toLatin1 with neon to process 8 characters at a time. Using Neon improve the speed it there is at least 16 characters, there is no improvement when using it for 8 characters. Speed difference on a N900: -8 characters: no change 100% -16 characters: 126% -1000 characters: 361% -10000 characters: 423% Reviewed-by: Samuel Rødal
* | Implement toLatin1_helper with SSE2Benjamin Poulain2010-02-241-6/+48
| | | | | | | | | | | | | | | | | | | | | | Encoding to latin1 can be done 8 characters at a time with SSE2. The speed difference on a current CPU : -<16 characters: no change: 100% -16 characters string: 120% -1000 characters: 230% -10000 characters: 322% Reviewed-by: Samuel Rødal
* | Comments the SSE implementation of fromLatin1_helper()Benjamin Poulain2010-02-241-3/+9
| | | | | | | | | | | | Add comments to explain the intrinsics. Comment on the general method. Share the information that it is not worth it to do the same on with Neon.
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1Benjamin Poulain2010-02-231-18/+103
|\ \
| * | optimize qstring::simplified()Oswald Buddenhagen2010-02-181-16/+66
| | | | | | | | | | | | | | | | | | | | | - avoid detaching if the string is already simplified - avoid calling isSpace() multiple times on the same character Reviewed-by: joao
| * | avoid double reallocation in string-growing replace() caseOswald Buddenhagen2010-02-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | detach() followed by resize() is suboptimal, as it first creates an identically sized copy, and then a differently sized one. Reviewed-by: joao Reviewed-by: denis
| * | add QString(const QChar *) c'torOswald Buddenhagen2010-02-161-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | to complement the QString(const QChar *, int) one, which unfortunately clamps sizes below zero to zero instead of computing the length itself instead. Reviewed-by: denis Reviewed-by: joao
* | | Implement QString::fromLatin1_helper() with SSE2Benjamin Poulain2010-02-231-2/+22
|/ / | | | | | | | | | | | | | | When there is at least 16 characters, use SSE2 to convert from 8bits to 16 bits. Reviewed-by: Samuel Rødal Reveiwed-by: Thiago Macieira