[Development] The life of a file name and other possibly mal-encoded strings on non-Windows systems

Julien Blanc julien.blanc at nmc-company.com
Tue Oct 7 14:30:59 CEST 2014

On 07/10/2014 12:11, Tomasz Siekierda wrote:
> For file paths, I feel QString is really enough.
> Changing it to something else because of a few corner cases seems like
> an overkill to me. We already have a lot of classes that are connected
> with paths and the file system (QFile, QFileInfo, QDir, QDirIterator,
> and more), that is enough. In my view, at least.

Imho using QString for file path (or, more generally, using any string 
objects with a static api) is somewhat a very widespread bad idea. The 
std::experimental::filesystem  api, for example, looks really better.

However, i agree that changing this would :
* break a lot of code
* permit only to solve really lower level / corner case issues
* be redundant with the std::filesystem api when it will be standardized 
(hopefully for C++17). I hope Qt will then add the relevant overrides to 
make its use possible anywhere where relevant.

Best regards,

Julien Blanc

More information about the Development mailing list