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

Marc Mutz marc.mutz at kdab.com
Thu Oct 9 01:57:05 CEST 2014

Hi Julien,

On Tuesday 07 October 2014 14:30:59 Julien Blanc wrote:
> However, i agree that changing this would :
> * break a lot of code

No, it cannot, if, as I propose, it's added to Qt 5.

> * permit only to solve really lower level / corner case issues

The value lies _also_ in being able to iterate over "weird" filenames (where 
weird simply means plugging in a USB stick into an otherwise UTF-8-only 

But the value of a QFilePath class _mainly_ lies in distingiushing strings 
from file paths. Google "Type-Rich Interfaces Bjarne Stroustroup".

> * 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.

That's another benefit of QFilePath: it's simple to add a QFilePath::
{to,from}StdFileSystem(), and that's all we'll need to do until Qt requires 


Qt Developer Days 2014 - October 6 - 8 at BCC, Berlin

Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions

More information about the Development mailing list