Actually.. Just found it!!!

It can be used in QDirModel to filter the top level return values...

Scott


-----Original Message-----
From: interest-bounces+scott.bloom=onshorecs....@qt-project.org 
[mailto:interest-bounces+scott.bloom=onshorecs....@qt-project.org] On Behalf Of 
Scott Aron Bloom
Sent: Tuesday, July 31, 2012 12:08 AM
To: Nikos Chantziaras; interest@qt-project.org
Subject: Re: [Interest] When is QDir::Drives useful?

AHHH... sorry...

In that case.. I believe you are correct...

int main( int argc, char ** argv )
{
    QDir root = QDir::root();
    QStringList drives = root.entryList( QDir::Drives );

    foreach( const QString & drive, drives )
    {
        qDebug() << drive;
    }
}


Returns nothing at all.. Infact, I don’t see the QDir::Drives used in the 
qfsfilesystem _win.cpp code at all...

It may have been created before the QDir::drives() existed...

Scott

-----Original Message-----
From: interest-bounces+scott.bloom=onshorecs....@qt-project.org 
[mailto:interest-bounces+scott.bloom=onshorecs....@qt-project.org] On Behalf Of 
Nikos Chantziaras
Sent: Monday, July 30, 2012 11:58 PM
To: interest@qt-project.org
Subject: Re: [Interest] When is QDir::Drives useful?

"" is equivalent to ".", meaning the current directory.

(Note: this isn't a question about how to get a list of drives.  The
QDir::drives() function does that.  This is just a question about the intention 
of the QDir::Drives filter enum.)


On 31/07/12 09:43, Scott Aron Bloom wrote:
> That’s a different question...
>
> The contents of "/" on windows as defined by the win32 system calls, will 
> return the data for the drive you are running the app on currently.. Ie, if 
> you are running (your getcwd() return) is a C: drive, "/" will return the 
> contents of C:, if running from D: it will return the contents of D:
>
> Loading the data on "/" is not the same as loadng the root for the system, I 
> would try ""
>
> Scott
>
> -----Original Message-----
> From: interest-bounces+scott.bloom=onshorecs....@qt-project.org
> [mailto:interest-bounces+scott.bloom=onshorecs....@qt-project.org] On 
> Behalf Of Nikos Chantziaras
> Sent: Monday, July 30, 2012 11:21 PM
> To: interest@qt-project.org
> Subject: Re: [Interest] When is QDir::Drives useful?
>
> Nope.  I just tested it under Windows XP and 7.  The contents of "/" are the 
> contents of "C:/".  Which makes sense, since Windows completely lacks the 
> concept of a single root directory.  So I guess the question remains open.
>
>
> On 31/07/12 09:10, Scott Aron Bloom wrote:
>> That has not been my experience... However, it has been a while since I have 
>> used it.  IIRC it would return the list of drives available ...
>>
>> Maybe some code would help us figure out what is going on.
>>
>> Scott
>> -----Original Message-----
>> From: interest-bounces+scott.bloom=onshorecs....@qt-project.org
>> [mailto:interest-bounces+scott.bloom=onshorecs....@qt-project.org] On 
>> Behalf Of Nikos Chantziaras
>> Sent: Monday, July 30, 2012 11:00 PM
>> To: interest@qt-project.org
>> Subject: Re: [Interest] When is QDir::Drives useful?
>>
>> The root directory on Windows contains the root directory of the currently 
>> active drive.  If the current drive is C:, then the contents consist of 
>> stuff like "Windows", "Program Files", "Users", etc.  No drives in there.
>>
>>
>> On 31/07/12 08:26, André Somers wrote:
>>> How about the root directory on windows, for instance?
>>>
>>> André
>>>
>>> Op 31 jul. 2012 om 07:21 heeft Nikos Chantziaras <rea...@gmail.com> het 
>>> volgende geschreven:
>>>
>>>> According to:
>>>>
>>>>      http://qt-project.org/doc/qt-4.8/qdir.html#Filter-enum
>>>>
>>>> "QDir::Drives" lists drives.  Which directory would you have to 
>>>> open though that could possibly contain disk entries?


_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to