summaryrefslogtreecommitdiffstats
path: root/src/corelib/codecs/qiconvcodec.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fixed wrong iconv_open call under QNXRafael Roquetto2012-03-111-1/+1
| | | | | | | | | | | The wrong macro logic was causing iconv_open to never be called under QNX. cherry-picked from qt5/qtbase 8a15c41d36b1905a2 Change-Id: I0a1e3fb01d726daca637f8f51abfc924cd493311 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
* Fixes QIconvCodec::convertToUnicode()Nick Ratelle2012-02-071-1/+5
| | | | | | | | | | | | 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. cherry-picked from qt5/qtbase: 72c07311228ce6eefb460d7e5da3de24220ba81e Change-Id: I794d78808ccd9deedcb406bfe46e373c18142d05 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add support for QNX iconv implementation.Rafael Roquetto2012-02-031-0/+5
| | | | | | | | | | | 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. cherry-picked from qt5/qtbase 38cba9a37fc5fe76b1549463422ab539a1b4cf24 Change-Id: Ia77633f1ddfdc8f5a8414125f8363749a6449cc8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Make the QIconvCodec on Unix not enforce the Latin1 codec.Thiago Macieira2011-03-291-20/+18
| | | | | | | | | | | | | | | | | | | | | | Originally, the QIconvCodec created and disposed of the iconv_t structure at every turn. In Qt 4.5, we started saving it for later in a thread-local storage. We had to introduce a fix to make sure that we didn't create the iconv_t structure before the setlocale(LC_ALL, "") call was made, though: otherwise, we'd keep forever an iconv_t that pointed to the wrong encoding. So now simply restore the Qt 4.4 behaviour: create and dispose of the iconv_t structure if we're called before the QCoreApplication constructor is run or after the static destructors are run. Note: this means QIconvCodec will probably default to US-ASCII when run before QCoreApplication, not Latin 1. Non-ASCII characters (anything with the high bit set) will fail to convert. Task-number: QTBUG-15229? Reviewed-by: Denis Dzyubenko
* Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | Reviewed-by: Trust Me
* Fix infinite recursion in QIconvCodec when iconv fails.Thiago Macieira2010-04-261-11/+11
| | | | | | | | We mustn't use to/fromAscii because that goes back into the iconv codec... Task-number: QTBUG-10189 Reviewed-by: Olivier Goffart
* Reset the byte order in the iconv codec after using it.Thiago Macieira2010-03-051-12/+29
| | | | | | | | Otherwise, if you try run QString(QChar(0xfffe)).toLocal8Bit() iconv will be left in byte-swapping mode. Reviewed-by: Denis Dzyubenko
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | Reviewed-by: Trust Me
* Checks for len = 0 in QIconvCodec::convertFromUnicodeNils Christian Roscher-Nielsen2009-11-251-2/+2
| | | | | | | | | iconv hangs when len is initially 0 on some Solaris platforms. This can be seen in the standarddialogs example when calling QFileDialog::getOpenFileName() for instance. Reviewed-by: ddenis Task-number: QTBUG-4976
* Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt into 4.6Simon Hausmann2009-09-141-1/+1
|\
| * Fix libiconv support on FreeBSD.Raphael Kubo da Costa2009-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some reason iconv support was broken in Qt 4.5 on FreeBSD, and this patch was made to fix that. Original patch by Max Brazhnikov <makc@freebsd.org>. Original message: Enable libiconv support. Didn't get where the real problem is, but using UTF-16LE/BE as default encoding (see patch) fixes the issue. Merge-request: 1480 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
| * Update license headers again.Jason McDonald2009-09-081-4/+4
| | | | | | | | Reviewed-by: Trust Me
* | Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | | | | | Reviewed-by: Trust Me
* | Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | | | | | Reviewed-by: Trust Me
| * Update license headers.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Port of Qt to QNXHarald Fernengel2009-07-291-2/+2
| | | | | | | | | | | | | | | | This makes Qt work on QNX 6.4. * no q3support, no phonon * no QSharedMemory, no QSystemSemaphore, no QProcess Reviewed-By: Robert Griebl
* | Fixes a memory corruption when converting data with QIconvCodecDenis Dzyubenko2009-07-091-2/+4
| | | | | | | | | | | | | | This partially reverts 9a5b40a011bd1b15a67d83564af55011761f8ad9 for the QIconvCodec. Reviewed-by: hjk
* | Small speedup of construction of uninitialized QByteArrayshjk2009-06-191-10/+5
|/ | | | | | | Directly construct uninitialized QByteArrays of required size instead of default-constructing one and resizing it afterwards. Reviewed-by: mariusSO
* Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | Reviewed-by: Trust Me
* Long live Qt 4.5!Lars Knoll2009-03-231-0/+536