[Qt-creator] "Editing not possible" solution

Tobias Hunger tobias.hunger at gmail.com
Wed Jan 21 07:38:10 CET 2015


Hi Pawel,

Am 20.01.2015 23:48 schrieb "Pawel" <pawelfaron87 at wp.pl>:
> I've implemented simple code to help a bit. It is located in
textdocument.cpp, and differs from current solution with:
>
> - [Current solution] In functions read() when decoding with default codec
fails we return error.
> - [My Solution] In functions read() when decoding with default codec
fails I try all available codecs (QTextCodec::availableCodecs()), and if
any one success I return success.
>
> What do you think about this?

I am afraid that our approach is the only one that will not silently mess
up your code. All others will work most of the time and then suddenly break
things.

An IDE should not do that, ever.

> Full code can be reviewed here:
> https://codereview.qt-project.org/#/c/104124/

Thank you for the patch! I do not think that it should be applied, but I
appreciate the work you put in.

PS: Is this an issue still? Qt5 requires all files to be utf8 encoded
anyway, and AFAIK so do other big C++ libs. So maybe it would make more
sense to make your team mates standardized on utf8.

Best Regards,
Tobias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20150121/266631a6/attachment.html>


More information about the Qt-creator mailing list