[Development] About the QtDir::currentPath

Sivan Greenberg sivan at omniqueue.com
Fri Jun 1 10:02:08 CEST 2012


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