[Qt-interest] QDir failing to list non-ascii directories
Jochen Roemmler
jochen444 at concept.de
Thu Nov 12 15:42:53 CET 2009
Hi Robin,
I know, this may be off-topic, but just in case the code you sent is
partly from MythTV project, I wanted to let you know that ...
> tmp = QString("file::%1::%2").arg(p->fileName()).arg(p->size());
^^^^^^^
...this substitution will NOT do what you expect if the arguments
contain format specifiers like "hello%1world.mpg" (this is a feature,
not a bug). You'll have to build the string differently ...
> out << QString("%1").arg(tmp);
Any reason why you're doing it so complicated?
out << tmp << endl;
or even better:
qDebug() << tmp;
should do, shouldn't it? (the latter requires #include <qdebug.h>)
--
Regards,
Jochen
More information about the Qt-interest-old
mailing list