summaryrefslogtreecommitdiffstats
path: root/src/corelib/codecs
Commit message (Collapse)AuthorAgeFilesLines
...
* replace hardcoded values with a surrogate handling methodsKonstantin Ritt2012-04-131-3/+3
| | | | | | Change-Id: Ib41e08d835f2e8ca2e32b4025c6f5a99840f2e27 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* fix QUtf8 codec to disallow codes in range [U+fdd0..U+fdef]Konstantin Ritt2012-04-111-1/+1
| | | | | | | | | 0xfdef-0xfdd0 is definitely 31 and not 15 :) also fix all copy-pastes of this code (greping for '0xfdd0' helps ;) Change-Id: I8f3bd4fd9d85f9de066f0f5df378b9188c12bd48 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Fix scopes on iconv related pro/pri filesRafael Roquetto2012-03-271-1/+1
| | | | | | | | | Ensure corelib and the iconv configure test link against libiconv on QNX-based platforms. This now includes the Blackberry mkspecs which were previously excluded. Change-Id: I60677ab8506b7cf47f504b880bb1078036984e85 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Restore some source compatibilityLars Knoll2012-03-121-0/+4
| | | | | | | | | | | 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>
* Updated codecs.pri to reflect new QNX mkspec nameRafael Roquetto2012-03-091-1/+1
| | | | | Change-Id: Icd4a9dd774991c2be180b885b3892ff85a3f8dc1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fixes wrong iconv_open call under QNXRafael Roquetto2012-03-091-1/+1
| | | | | | | | | | The wrong macro logic was causing iconv_open to never be called under QNX. Change-Id: I3367872fc8440f87fb59667770acd06262aef723 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fixes mismatching delete operatorRafael Roquetto2012-03-091-1/+1
| | | | | | Change-Id: Ib6640daa0fdd12f98f9d7e257c226e0abdcf31dc Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Fixes potential memory leak in qtextcodec.cppNick Ratelle2012-03-081-17/+9
| | | | | Change-Id: I56c0a1a6cc261bd15653bc4cbb94daed1f8aa811 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove codecForTr().Robin Burchell2012-03-062-44/+0
| | | | | | | | | | Similarly to change id I2f429fa7ef93bd75bb93a7f64c56db15b7283388, the capability to arbitrarily alter the encoding of literals is very destructive, especially in a world with libraries and plugins. Change-Id: If0d4cd8dcf89792e39c1984cbde6b036cebfc02f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-03-041-3/+3
|\ | | | | | | | | | | | | | | | | | | Conflicts: dist/changes-5.0.0 mkspecs/features/qt_module_config.prf qmake/project.cpp qmake/property.cpp Change-Id: I6e4af40743a9aeff8ed18533a48036e332acc296
| * Merge master -> api_changesRohan McGovern2012-02-292-34/+1
| |\ | | | | | | | | | | | | | | | Includes fixes for tst_qfiledialog2, tst_qtextedit autotests on mac. Change-Id: I49cac26894d31291a8339ccc1eb80b6a940f0827
| * | QByteArray: deprecate QT_NO_CAST_FROM_BYTEARRAY-protected operatorsMarc Mutz2012-02-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QByteArray::operator const {char,void}*() implicit conversions are a source of subtle bugs, so they right- fully can be disabled with QT_NO_CAST_FROM_BYTEARRAY. const char *d = qstring.toLatin1(); // implicit conversion while ( d ) // oops: d points to freed memory // ... But almost no-one ever enabled this macros in the wild and many were bitten by these implicit conversions, so this patch deprecates them. I would have liked to remove them completely, but there are just too many occurrences even in Qt itself to hope to find all conditionally-compiled code that uses these. Also fixes all code that needs to compile under QT_NO_DEPRECATED (in qmake/, src/tools/). I984706452db7d0841620a0f64e179906123f3849 separately deals with the bulk of changes in src/ and examples/. Depends on I5ea1ad3c96d9e64167be53c0c418c7b7dba51f68. Change-Id: I8d47e6c293c80f61c6288c9f8d42fda41afe2267 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | | Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-022-71/+71
| |/ |/| | | | | | | | | | | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I519bf9c29b14092e3ab6067612f42bf749eeedf5 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Remove custom text codec for C strings.Robin Burchell2012-02-222-34/+1
|/ | | | | | | | | | This setting is extremely harmful, as code cannot know whether or not to expect it. It also made the behaviour of QString::fromAscii and ::toAscii unintuitive, and caused a lot of people to make mistakes with it. Change-Id: I2f429fa7ef93bd75bb93a7f64c56db15b7283388 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fixes QIconvCodec::convertToUnicode()Nick Ratelle2012-02-052-1/+6
| | | | | | | | | | We need to hang onto the internal state of the utf16 converter object whenever converting a long string to unicode. This was failing with the text stream class -- the first read was okay, but subsequent reads could not be correctly converted to unicode. Change-Id: I9e2d445d51c9009591bfa7a1765ea2d09ae634a2 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add support for QNX iconv implementationRafael Roquetto2012-02-032-0/+6
| | | | | | | | | | | QNX implements the POSIX version of iconv (with non-const function signatures). However, it is still necessary to link with libiconv, unlike most cases. Also, its iconv_open does not know how to handle an empty string. Change-Id: I8654703e46b9c64503aca5521ce7fae1c97d7968 Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Windows: Fix inclusion of <windows.h>Friedemann Kleint2012-02-011-2/+5
| | | | | | | | | | | | | - Always use <qt_windows.h> as the last file to be included. - Remove it from some headers, use Qt::HANDLE instead of HANDLE. - Clean up #ifdef, use Q_OS_WIN for Windows/Windows CE. - Add NOMINMAX to qt_windows.h to avoid problems with the min/max macros. - Remove <windows.h> from qplatformdefs.h (VS2005) Change-Id: Ic44e2cb3eafce38e1ad645c3bf85745439398e50 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-3035-35/+35
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-251-1/+0
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-2335-35/+35
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* remove obsolete codec plugin loading codeMark Brand2012-01-204-344/+2
| | | | | | Change-Id: I1f3dbb5c10009413f701947b1b89ed3dbc94bf3d Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* cosmetic adjustments for files moved to core/codecsMark Brand2012-01-2017-44/+143
| | | | | | | | | | -update old reference to 'plugin' -rename multiple inclusion guards -add private header warning text Change-Id: I4c582dcba549d871bd8d929bee5372586117eabb Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* update private header referencesMark Brand2012-01-2011-13/+13
| | | | | | Change-Id: I092d879653b6900532a0c4534c1eb2be84e9d0f6 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* move plugin text codecs to QtCoreMark Brand2012-01-2019-22/+38982
| | | | | | | | | | | | | | | | | | | | Having plugin text codecs adds considerable complexity to configuring Qt. The plugin interface is designed for optional features, but text codecs tend to be used for essential functions. A dramatic example is loading a codec plugin from a file whose path needs to be converted by the codec. Codec plugins can also be a nuisance to builders of applications linking to static Qt. This is because the application might need to explicilty import the static codec plugins which are actually dependencies of QtCore. For these reasons, it has been decided not to have text codec plugins any longer. Change-Id: Ic6c80a9c949bd42e881e932d1edae23fe4fe4c88 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* build and load text codecs regardless of iconv and platformMark Brand2012-01-202-30/+22
| | | | | | | | | | | | | | Otherwise applications linking to static Qt may have to import the static plugins to avoid linking failure even if they do not use the codecs, which is a nuisance. Also, this is preparation for moving these codecs into QtCore proper. Change-Id: I71f3bbb0bac6261983143d0578757b34997d1364 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* fix whitespaceMark Brand2012-01-201-17/+16
| | | | | Change-Id: I0cfccae085c000d4368386a34f288c1e6f01a88f Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* remove trailing whitespaceMark Brand2012-01-171-1/+1
| | | | | Change-Id: If53a0bd1794e69b4856f993c6e2959369bd007d6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Merge the makeEncoder/Decoder overloads.Lars Knoll2012-01-162-28/+2
| | | | | | Change-Id: I9fdeeafe08dd70c0ab9ce26a2fce3b8d803ca280 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* remove symbian support vestiges from text codecsMark Brand2012-01-145-739/+6
| | | | | | | Change-Id: I7b577d360cb9c7225da108ee56fd927a91a04dee Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove all non-inline of qMalloc/qFree/qRealloc.Robin Burchell2012-01-062-3/+3
| | | | | | | | | | | | We're trying to deprecate these, so don't use them anymore. The inline uses of these have been left intact, for the moment. Inline code will need to create their own non-inline allocation methods (for future-proofing to allow alterations in how e.g. individual containers allocate) Change-Id: I1071a487c25e95b7bb81a3327b20c5481fb5ed22 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-0521-21/+21
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Use load() when constructing QSimpleCodec's reverse mapBradley T. Hughes2011-10-271-7/+10
| | | | | | | | | | The implicit casting results in unnecessary volatile loads. The test-and-set-ordered doesn't need full ordering, test-and-set-release is enough to ensure that the memory initialization done by buildReverseMap() and test-and-set happen in program order. Change-Id: I168b504271aeba050d6b8396becbdeb3ef938213 Reviewed-by: Olivier Goffart <ogoffart@kde.org>
* corelib: Remove Q_WS-macros.Friedemann Kleint2011-10-241-3/+3
| | | | | | | | | | | | | | | | | | | | Q_WS_QPA is the only active code path after merging refactor, other Q_WS-macros are no longer used. Enable compilation without -qpa. - Remove Q_OS_MSDOS, Q_OS_OS2 - Remove Q_WS_QWS - Remove/replace definitions/conditionals of Q_WS_XX - Remove qpa branches from profiles - Replace Q_WS_MAC by Q_OS_MAC - Replace Q_WS_MAC && !Q_WS_QPA by Q_OS_MAC && !QT_NO_CORESERVICES - Similarly in profiles: mac:contains(QT_CONFIG, coreservices) - Replace Q_FS_FAT by Q_OS_WIN Change-Id: Icce5a6c55b052c8f72b3b979ddf31a4f388ea9c9 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Remove duplicate check in utf endian detectionKent Hansen2011-10-061-14/+12
| | | | | | | | | | | This was excessive paranoia. Task-number: QTBUG-20482 Change-Id: Ia0c76651773e12f25ec5d62675d6f317b8d2df13 Reviewed-on: http://codereview.qt-project.org/6045 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Replace explicit surrogate handlers by inline methods of QChar classsuzuki toshiya2011-09-121-4/+4
| | | | | | | | | | | | Merge-request: 1284 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> (cherry picked from commit 50af55095afe1ba048dde357b771485ef2188778) Change-Id: I0b1967145ad62243afc2060a6ae4ca141a9609fd Reviewed-on: http://codereview.qt-project.org/4587 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* don't crash when destroying codec listOswald Buddenhagen2011-09-121-4/+5
| | | | | | | | | | | this was uncovered by rittk's don't-detach patch. (cherry picked from commit cc98710df73a590c37dca19bd3aa9fcd9bbd5a92) Change-Id: I2225e6a94e5562459d9c5fd27ac7c8e611b674fd Reviewed-on: http://codereview.qt-project.org/4580 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Doc: Removed documentation for deleted code.David Boddie2011-07-211-27/+0
| | | | | | | Change-Id: Icdbc05decac3dfe3fc18ce073c494e1fce4ea347 Reviewed-on: http://codereview.qt.nokia.com/1824 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: David Boddie
* Finish removal of QT3_SUPPORT from corelib/codecsShane Kearns2011-07-051-16/+0
| | | | | | | | | | Change 369696dc231450c774a5cc253d061aad2f3b6a19 removed a function from the header but not its implementation, causing a compile error. Change-Id: I5da45d8401f5779b1660e5baf4557f078e202bf5 Reviewed-on: http://codereview.qt.nokia.com/1092 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Liang Qi <liang.qi@nokia.com>
* Remove QT3_SUPPORT from corelib/codecsLars Knoll2011-06-292-56/+0
| | | | | | | Change-Id: Ie674be85b64c5816ee0ad4bccc077943b7046136 Reviewed-on: http://codereview.qt.nokia.com/864 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Liang Qi <liang.qi@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-2421-350/+350
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-2722-0/+7551
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12