summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qchar.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Replace Q_DECL_NOEXCEPT with noexcept in corelibAllan Sandfeld Jensen2019-04-031-28/+28
| | | | | | | In preparation of Qt6 move away from pre-C++11 macros. Change-Id: I44126693c20c18eca5620caab4f7e746218e0ce3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Consistently mark QT_XYZ_CAST_FROM_ASCII with \cKai Koehne2018-12-221-1/+1
| | | | | | | | | | | Otherwise it gets linkified, which looks inconsistent. Instead, use \sa for functions where QT_NO_CAST_FROM_ASCII or QT_RESTRICTED_CAST_FROM_ASCII is referenced. Change-Id: Ic3933d8c4c81c963215de7f3aac4d0a11e61cbc2 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Martin Smith <martin.smith@qt.io>
* QtCore: Raise minimum supported MSVC version to 2015Friedemann Kleint2018-01-081-2/+0
| | | | | | | | Remove code for older versions and streamline #ifdefs. Task-number: QTBUG-51673 Change-Id: I211703189ff12f827d94914093369736b6e65d4a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* doc: Correct remaining qdoc warnings in qchar.h and qchar.cppMartin Smith2018-01-061-0/+12
| | | | | | | | | Several enum values had to be given \value statements, and a member function only visible for Windows had to become visible to clang-qdoc. Change-Id: I47fbbcf9c5e4333abd13a041ce8fee2c13f9541d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Port internal qt_starts/ends_with to QStringViewMarc Mutz2017-04-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | ... and add a version taking a QChar needle. Back the implementation with a template function. Mark the slightly surprising behavior that null.startsWith(empty) == false but null.startsWith(null) == true even though empty == null, for review come Qt 6. Saves 0.5KiB in text size on optimized GCC 7.0 Linux AMD64 builds. Change-Id: I2576472d22ccf22ec89911eaed25188f9f7b654f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-281-2/+2
|\ | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro tests/auto/corelib/tools/qchar/tst_qchar.cpp tests/auto/other/qaccessibility/accessiblewidgets.h Change-Id: I426696c40ab57d14dc295b8103152cede79f244c
| * Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-211-2/+2
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/eglfs/eglfs-plugin.pro Change-Id: Id76cdbb41b7758572a3b8ea4dcb40d49bac968db
| | * QChar: fix docs of (uchar) ctorMarc Mutz2017-03-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The constructor is not only disabled under QT_NO_CAST_FROM_ASCII, but also under QT_RESTRICTED_CAST_FROM_ASCII. Change-Id: I7bbaf2891913d5256dff7f80c49075ea3326155a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QChar: add (char16_t) and (wchar_t) ctorsMarc Mutz2017-03-171-0/+18
|/ / | | | | | | | | | | | | | | | | | | | | ... for better std C++ integration. [ChangeLog][QtCore][QChar] Added constructors from char16_t and, on Windows, wchar_t. Change-Id: I2d18ea3a37e869b8ea9f4036d7200d9d13c7d929 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix minor typos in apidocFrederik Schwarzer2017-02-151-1/+1
| | | | | | | | | | Change-Id: I5ce9599a60ea336b469807df075e491f0e6df680 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | QChar::Direction: more specific link to unicode standardEdward Welbourne2016-11-181-1/+1
|/ | | | | | | | | | Giving the URL of unicode.org isn't much use; the standard is enormous and the reader shall have trouble finding the specific table that enumerates the direction types. Found a more specific URL (that looks like it should be stable) for this one link. Change-Id: I8abcedf530baf692d7e0c7f146f3066df223951f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QChar: Simplify case convertion code with template magicKonstantin Ritt2015-11-161-51/+21
| | | | | | | Same as in QString, though simpler a bit due to fixed-length sequence. Change-Id: Idd6670a7b6415f5d515987c30931d16b73dd280e Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Update Unicode data & algorithms up to v8.0Konstantin Ritt2015-11-051-1/+8
| | | | | | | | | | | | | | | | | | | * Georgian lari currency symbol * A large collection of CJK unified ideographs * Emoji symbols and symbol modifiers * Letters to support the Ik language in Uganda, Kulango in the Côte d’Ivoire, and other languages of Africa * A set of lowercase Cherokee syllables, forming case pairs with the existing Cherokee characters * The Ahom script for support of the Tai Ahom language in India * Arabic letters to support Arwi—the Tamil language written in the Arabic script For more details, see http://www.unicode.org/versions/Unicode8.0.0/ [ChangeLog][QtCore] Unicode data updated to v.8.0 Change-Id: If255f95c9c45655b721369a116299da3cabbba0a Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-08-261-0/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/snippets/code/doc_src_qmake-manual.pro qmake/doc/src/qmake-manual.qdoc src/corelib/io/qstorageinfo_unix.cpp src/corelib/tools/qbytearray.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/corelib/io/qprocess/tst_qprocess.cpp tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp tests/auto/network/access/qnetworkreply/BLACKLIST Change-Id: I9efcd7e1cce1c394eed425c43aa6fce7d2edf31c
| * Fix QChar char constructors documentationSamuel Gaist2015-08-131-2/+10
| | | | | | | | | | | | | | | | | | | | | | Reverts the wrongly added \internal and adds a warning for users that the constructors will not be available if QT_NO_CAST_FROM_ASCII is defined Task-number: QTBUG-39862 Change-Id: I038eea3f4eef0b914b470309a2f515741eec35a9 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| * Doc: mark private QChar constructors as internalSamuel Gaist2015-08-061-0/+2
| | | | | | | | | | | | | | Task-number: QTBUG-39862 Change-Id: Ie0d533e3897200589248c803069c41661b15997e Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Fix some qdoc-warnings.Friedemann Kleint2015-07-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtbase/src/corelib/io/qdatastream.cpp:501: warning: Undocumented enum item 'Qt_5_6' in QDataStream::Version qtbase/src/corelib/itemmodels/qitemselectionmodel.cpp:1764: warning: Undocumented parameter 'model' in QItemSelectionModel::setModel() qtbase/src/corelib/statemachine/qabstractstate.cpp:216: warning: Undocumented parameter 'active' in QAbstractState::activeChanged() qtbase/src/corelib/statemachine/qstatemachine.cpp:3262: warning: Undocumented parameter 'running' in QStateMachine::runningChanged() qtbase/src/corelib/tools/qchar.cpp:160: warning: Undocumented enum item 'Unicode_7_0' in QChar::UnicodeVersion qtbase/src/gui/image/qimagereader.cpp:1168: warning: Undocumented parameter 'enabled' in QImageReader::setAutoTransform() qtbase/src/gui/image/qimagewriter.cpp:621: warning: Undocumented parameter 'transform' in QImageWriter::setTransformation() qtbase/src/gui/itemmodels/qstandarditemmodel.cpp:1268: warning: Undocumented parameter 'tristate' in QStandardItem::setAutoTristate() qtbase/src/gui/kernel/qscreen.cpp:590: warning: Undocumented parameter 'orientation' in QScreen::orientationChanged() qtbase/src/gui/kernel/qscreen.cpp:599: warning: Undocumented parameter 'orientation' in QScreen::primaryOrientationChanged() qtbase/src/gui/text/qtextdocument.cpp:1455: warning: No such parameter 'from' in QTextDocument::find() qtbase/src/gui/text/qtextdocument.cpp:533: warning: Undocumented parameter 'option' in QTextDocument::setDefaultTextOption() qtbase/src/widgets/itemviews/qtableview.cpp:2546: warning: Undocumented parameter 'enable' in QTableView::setSortingEnabled() qtbase/src/widgets/statemachine/qkeyeventtransition.cpp:119: warning: Undocumented parameter 'key' in QKeyEventTransition::setKey() qtbase/src/widgets/widgets/qplaintextedit.cpp:1610: warning: Can't link to 'toText()' qtbase/src/opengl/qgl.cpp:4371: warning: No documentation for 'QGLWidget::event()' Remove the documentation as they are properties: qtbase/src/widgets/widgets/qfontcombobox.cpp:407: warning: Undocumented parameter 'font' in QFontComboBox::setCurrentFont() qtbase/src/widgets/widgets/qfontcombobox.cpp:403: warning: Undocumented parameter 'script' in QFontComboBox::setWritingSystem() Change-Id: If599a3ce747bbb8a3418dd973810923b87246371 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* | QChar: plaster API with Q_DECL_NOTHROWMarc Mutz2015-04-051-30/+30
|/ | | | | | | | | | | | | | | This is mostly straight-forward, but some things are worth noting: 1. Yes, this is necessary. The noexcept operator looks for noexcept tagging, not at the contents of the function to determine whether to return true. The more conditionally-noexcept functions are used, the more important it becomes that low-level classes are correctly marked noexcept. In that, it is like constexpr. 2. The decomposition() functions, returning a QString, can throw (bad_alloc). Consequently, they're not marked nothrow. they're the only ones. Change-Id: Iae50283aaa2d0596a265b7e2652c9fb04cedc706 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update Unicode data up to v7.0Konstantin Ritt2015-03-271-0/+23
| | | | | | | | | | | | | | | | | | | | | | * Two newly adopted currency symbols: the Azerbaijan manat and the Russia ruble * Pictographic symbols (including many emoji), geometric symbols, arrows, and ornaments originating from the Wingdings and Webdings sets * Twenty-three new lesser-used and historic scripts extending support for written languages of North America, China, India, other Asian countries, and Africa * Letters used in Teuthonista and other transcriptional systems, and a new notational set, Duployan For more details, see http://www.unicode.org/versions/Unicode7.0.0/ The Properties struct's .*Diff members were narrowed down to signed 15 bits and the unicodeVersion has been expanded to 8 bits. [ChangeLog][QtCore] Unicode data updated to v.7.0 Change-Id: I93ab6f79fa3b05f61abc7279f1d046834c1c1a0b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Doc: corrected autolink errors qtbase/corelib/toolsNico Vertriest2014-09-241-2/+2
| | | | | | | | | Also corrected some minor language/spelling issues Task-number: QTBUG-40362 Change-Id: I00d76521fc9beb4e7a4a83ff6dc3334a055a7148 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Mark all QChar static functions as [[gnu::const]]Thiago Macieira2014-07-071-4/+4
| | | | | | | | | | | | | | | | | The GCC documentation says that a const function is not allowed to read global memory. This needs to be clarified: it's not allowed to read RW global memory. It's fine to read read-only memory, as that is equivalent to just pure code. The QChar static out-of-line functions only lookup a property of the given Unicode character and always return the same value. The only exception is the decomposition() function, which returns a QString and is therefore not allowed to be marked const. Change-Id: Id36b2f84a1b8ff9db5acf1d4e59e8b3811068cff Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Introduce QChar::JoiningType enum and QChar::joiningType() methodKonstantin Ritt2014-01-291-3/+60
| | | | | | | | | | | | | | This aimed to disctinct joining types "L", "T", and "U" from just "U". Unicode 6.3.0 has introduced a character with joining type "L" and Unicode 7.0 will add a few more characters of joining type "L", so we'll have to deal with it anyways. [ChangeLog][QtCore][QChar] Added JoiningType enum and joiningType() method that deprecates the old QChar::Joining enum and joining() method. Change-Id: I4be3a3f745d944e689feb9b62d4ca86d1cf371b0 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update the Unicode Data and Algorithms up to Unicode 6.3.0Konstantin Ritt2014-01-141-1/+6
| | | | | | | | | | | | | | | | | | | | * Mongolian and Phags-pa characters have been given a Joining_Type classification for contextual shaping. As a part of these additions, one Phags-pa character has the Joining_Type value of L (Left Joining), which no character had been assigned before. * The unassigned code points in the Currency Symbols block have been given the Bidi_Class property value ET and the Line_Break property value PR, to help implementations support new currency symbols, when they are encoded. * Hebrew letters and basic punctuation marks have been assigned the newly introduced Word_Break property values Hebrew_Letter, Single_Quote, and Double_Quote. * The Bidi_Class property has been extended with four new values for directional isolates. For more details, see http://www.unicode.org/versions/Unicode6.3.0/ Change-Id: Iad62d02edc58a8497898dcd6d6c70d5aece317ea Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-71/+71
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix WinCE/MSVC2008 build.Sérgio Martins2013-09-241-0/+4
| | | | | | | See QTBUG-33473 for a similar problem. Change-Id: Ib446618945dc1e7e1e7d43819cfae5f3c411f1bb Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix some doc errors.Frederik Gladhorn2013-09-211-0/+1
| | | | | | | Change-Id: Ib874d7e9671d9cee75fe41f4dac5d0de7b09245e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Remove qBinaryFind usages from bootstrapped filesGiuseppe D'Angelo2013-09-201-4/+6
| | | | | | | | This is done per the mailing list discussion at http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I492b49553bc889892f5ca0c47aa13c75e11518e2 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* [2/2] Implement Unicode Normalization Form Quick Check (NF QC)Konstantin Ritt2013-08-141-0/+61
| | | | | | | | | | | | | Use QuickCheck data from DerivedNormalizationProps.txt to check if the input text is already in the desired Normalization Form. \sa http://www.unicode.org/reports/tr15/#Detecting_Normalization_Forms Using NF QC makes a significant boost to most operations that rely on normalized input data, i.e. file path conversions on Mac, where "native" form is a decomposed Unicode string. Change-Id: I292a9da479c6beed730528fc7000c45bf1befc34 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Ensure we don't repeat QTBUG-30931 in Qt5Konstantin Ritt2013-06-181-5/+4
| | | | | | | | | | The issue is already fixed in 5.0 but let's be nice and ensure the issue won't be reintroduced later. Task-number: QTBUG-30931 Change-Id: Ia6944acaf6e7217f8d0f1fa75d0e9977db11d892 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-221-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Add QChar::Script enumKonstantin Ritt2012-12-201-0/+147
|/ | | | | | | | | | | | | | | ...where the values are not aliased to Common script. The old QUnicodeTables::Script enum was retained for compatibility reasons until Qt internals are updated to use QChar::script(). Using QChar::Script instead of QUnicodeTables::Script would improve both the text analysis (itemization, boundary finding) and the text shaping quality. This also a required step for switching to Hurfbuzz-NG. /* This adds 6668 more .rodata bytes */ Change-Id: I5aa3d12c550528d0052542436990f8d0779ea8e5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Add documentation for ucs4 overloads.Frederik Gladhorn2012-10-161-11/+43
| | | | | Change-Id: Ibacd8f260950db195a17cffe8396e8460f227eb9 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Update the Unicode Data and Algorithms up to Unicode 6.2Konstantin Ritt2012-10-091-1/+2
| | | | | | | | | | | | | Version 6.2 of the Unicode Standard is a special release dedicated to the early publication of the newly encoded Turkish lira sign. In addition, there are some significant changes to the Unicode algorithms for text segmentation and line breaking to improve breaking for emoji symbols. For more details, see http://www.unicode.org/versions/Unicode6.2.0/ Change-Id: I21cfd4f307e41b41a19d36cce87f7a44c2661bc2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Doc: Add \inmodule QtCore to all QtCore class doc bodiesThiago Macieira2012-08-231-0/+2
| | | | | Change-Id: I19100755c97cc155c76a859e19940e9f9222d34e Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Fix a couple of qdoc errorsLars Knoll2012-08-181-1/+1
| | | | | Change-Id: I79f689e08ed4a496052529af38fca72c3d4e04cb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update the qunicodetables generator to deal with UCD 6.1 filesKonstantin Ritt2012-06-101-1/+5
| | | | | Change-Id: If22018ff83cfc6b9c984f689648da038fce11d84 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix a bug in the case conversion codeLars Knoll2012-06-011-8/+4
| | | | | | | | | | | Chars that have a case conversion that converts them into several characters can't be handled by QChar::toUpper() etc and should get ignored. The code didn't do that correctly. Change-Id: I281d122e90bf49187b6449088d2fccef2ef75e86 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Deprecate {QString,QStringRef,QChar}::{to,from}AsciiThiago Macieira2012-05-221-0/+2
| | | | | | | | | | | | Make them call exactly their Latin 1 counterparts. For the QString functions that take a single char, also use fromAscii directly. Change-Id: I87645aba6ab9cde34c1df3cbc3a979fbd9e91f9d Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* add some more widely-used QChar::SpecialCharacter enum valuesKonstantin Ritt2012-05-171-0/+4
| | | | | | Change-Id: Iad58f4366ba6cd6da29a268c56c8a4bc4cf0329c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QChar: add isSurrogate() and isNonCharacter() to the public APIKonstantin Ritt2012-05-161-25/+75
| | | | | | | | + QChar::LastValidCodePoint enum value that supercede the UNICODE_LAST_CODEPOINT macro replace uses of hardcoded values with the new API; remove leftovers Change-Id: I1395c9840b85fcb6b08e241b131794a98773c952 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QChar: add missing UCS-4 overloads, get rid of UCS-2 onesKonstantin Ritt2012-05-161-156/+155
| | | | | | | | | | inline all non-static members to a static ones (declared with QT_FASTCALL), ushort converts automatically to uint and the conversion cost is minimal. Task-Number: QTBUG-13052 Change-Id: I189a6f205736766adcd3de2d61cee71f30cc64f3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* stop ignoring unassigned codepointsKonstantin Ritt2012-05-041-5/+4
| | | | | | | | | | in Unicode 5.1, it was clarified that unassigned codepoints normally should not be excluded from the process; moreover, unassigned codepoints assumed to be starters in decomposition by default Change-Id: Ic4a61ec3759ee62b6843c81045e1d611d0684ead Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* add support for non-BMP ligaturesKonstantin Ritt2012-05-041-15/+50
| | | | | | | | | | | | | | | | | | | | | > http://www.unicode.org/versions/Unicode5.2.0/ D. Character Additions: There are three new characters in the newly-encoded Kaithi script that will require changes in implementations which make hard-coded assumptions about composition during normalization. Most new characters added to the standard with decompositions cannot be generated by the operations toNFC() or toNFKC), but these three can. Implementers should check their code carefully to ensure that it handles these three characters correctly. U+1109A KAITHI LETTER DDDHA U+1109C KAITHI LETTER RHA U+110AB KAITHI LETTER VA UCD 6.1 adds two more of them: U+1112E CHAKMA VOWEL SIGN O U+1112F CHAKMA VOWEL SIGN AU Change-Id: I781a26848078d8b83a182b0fd4e681be2a6d9a27 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove references to to/fromAscii in QString and QByteArray main docsThiago Macieira2012-05-031-4/+4
| | | | | | | | | | | | 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>
* 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>