[Qt-interest] anyone know why QDir::mkpath() isn't static?

Thiago Macieira thiago at kde.org
Tue Apr 12 18:10:56 CEST 2011


Em terça-feira, 12 de abril de 2011, às 10:55:46, Paul Miller escreveu:
> To use QDir::mkpath() you have to do this:
> 
> QDir dir("/the/path/you/want/to/create");
> dir.mkpath(dir.absolutePath());
> 
> Seems the argument to mkpath() is redundant, or, since the argument
> overrides the QDir's actual path, the whole constructor is irrelevant.
> Shouldn't it mkpath() be static?

QDir dir("/the/path/you/want/");
dir.mkpath("to/create");

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110412/acc533b9/attachment.bin 


More information about the Qt-interest-old mailing list