[Interest] Detecting subdirectories in QDir

Thiago Macieira thiago.macieira at intel.com
Wed Jul 11 16:59:28 CEST 2018


On Wednesday, 11 July 2018 07:44:46 PDT Oleg Yadrov wrote:
>     qDebug() << a.absolutePath().startsWith(b.absolutePath());
> 
>     qDebug() << a.absolutePath().startsWith(c.absolutePath());

Except that this has a bug (which we had in Qt too): these two directories are 
considered to be parent-child, when they're not

	C:\One\TwoAndTwenty
	C:\One\Two

And since we're talking about Windows, you also need to use case-insensitive 
comparison.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center






More information about the Interest mailing list