[Development] About the QtDir::currentPath

song.7.liu at nokia.com song.7.liu at nokia.com
Fri Jun 1 10:05:03 CEST 2012


Ok, thanks... I am using the qfilesystemengine_unix under another unix like env,
so I can make a change in the ::rootPath for my case...

Thanks for your sharing ;)

Thanks,
Song

-----Original Message-----
From: sivang at gmail.com [mailto:sivang at gmail.com] On Behalf Of ext Sivan Greenberg
Sent: Friday, June 01, 2012 4:02 PM
To: Liu Song.7 (Nokia-MP/Beijing)
Cc: development at qt-project.org
Subject: Re: [Development] About the QtDir::currentPath
Importance: High

What's your windows version? I can see the code (in qt5) makes distinction between WinCE and the rest.

Seeing this respective code:

}
 998
 999 //static
1000 QString QFileSystemEngine::rootPath()
1001 {
1002 #if defined(Q_OS_WINCE)
1003     QString ret = QLatin1String("/");
1004 #else
1005     QString ret = QString::fromLatin1(qgetenv("SystemDrive").constData());
1006     if (ret.isEmpty())
1007         ret = QLatin1String("c:");
1008     ret.append(QLatin1Char('/'));
1009 #endif
1010     return ret;
1011 }

I would take a wild guess that you're qt thinks it should return paths on WinCE instead of 'regular' windows.

-Sivan

On Fri, Jun 1, 2012 at 10:45 AM,  <song.7.liu at nokia.com> wrote:
> Hi,
>
>
>
> My QtDir::currentPath is /c_drive/ instead of C:/, so do someone know 
> the reason behind ?
>
> And how can it be as "C:/" ?
>
>
>
> Any information is appreciated ;)
>
>
>
> Thanks,
>
> Song
>
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>



--
-Sivan



More information about the Development mailing list