[Development] QtDriveInfo module in Playground

Lorn Potter lorn.potter at gmail.com
Fri Mar 1 22:56:56 CET 2013

On 01/03/13 18:50, Иван Комиссаров wrote:
> Yes, it still exists somewhere in Qt5 code, but it's not maintained and provides much less functionality compared to QtDriveInfo.

wrong. it is maintained. by me. or rather, has a maintainer. I haven't 
seen any bug reports or code reviews for it.

There's this though:

> Also, it has flawed API, in my opinion:)
> For example, it's hard to implement drive comparison (i.e. if 2 files are on the same drive or not) using current QSystemStorageInfo API:
>> QSystemStorageInfo info;
>> if (info.compareDrives(file1, file2)) {
>> ...
>> }
> looks really awkward. Compare with:
>> if (QtDriveInfo(file1) == QtDriveInfo(file2)) {
>> ....
>> }

so its better to instantiate two instances of a class instead of one, 
just to see if its on the same drive?

> This can be useful when you have to choose if you can simply rename file, or you should use copy&remove.
> Иван Комиссаров
>> 01.03.2013, в 12:42, André Somers <andre at familiesomers.nl> написал(а):
>> Wasn't there already similar functionality in QtMobility?
>> QSystemStorageInfo seems to provide similar functionality? Or did all
>> that get scrapped in Qt 5?
>> André
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development

Lorn Potter
Senior Software Engineer, QtSensors/QtSensorGestures/QtSystemInfo

More information about the Development mailing list