On Tuesday 28 July 2015 09:28:08 Olivier Goffart wrote:
>   qDebug() << "There was an error processing XYZ: " << job->errorString();
>   qDebug() << "Error parsing file: " << fileName;
>   qDebug() << "User entered: " << searchLineEdit->text();
> 
> Imagine that in a app written in russian for russian, or in other
> languages.  You really want to know what is the error message or the file
> name.

At the same time, the error might be in the file name and you'd want to inspect 
why the file name is failing. A very concrete case is the NFC / NFD mess of 
filenames on OS X.

NFC and NFD *look* identitcal on purpose, but have different binary 
representations. Qt API converts from NFD to NFC, but suppose you got the NFD 
form from elsewhere and then this job class tried to do a compare to a Qt-
formatted filename.

This is not so far-fetched. You'll spend at least half an hour trying to figure 
out why /tmp/Résumé.txt doesn't behave as you expect it to.

So damned if you do and damned if you don't. I opt for leaving the default as 
the option that gives the most information, unambiguously, with no apparent or 
real data loss.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to