There are a number of places in src/corelib/io where "C:/" type paths are handled specially under a windows ifdef. (or in 4.8 windows/symbian ifdef)
If you want to use windows style paths, you have to add your OS ifdef there as well. If the native paths are unix style, i'd recommend to use unix style paths everywhere though -- > -----Original Message----- > From: development-bounces+shane.kearns=accenture....@qt-project.org > [mailto:development-bounces+shane.kearns=accenture....@qt-project.org] > On Behalf Of song.7....@nokia.com > Sent: 01 June 2012 09:05 > To: si...@omniqueue.com > Cc: development@qt-project.org > Subject: Re: [Development] About the QtDir::currentPath > > 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: siv...@gmail.com [mailto:siv...@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@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....@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@qt-project.org > > http://lists.qt-project.org/mailman/listinfo/development > > > > > > -- > -Sivan > _______________________________________________ > Development mailing list > Development@qt-project.org > http://lists.qt-project.org/mailman/listinfo/development ________________________________ Subject to local law, communications with Accenture and its affiliates including telephone calls and emails (including content), may be monitored by our systems for the purposes of security and the assessment of internal compliance with Accenture policy. ______________________________________________________________________________________ www.accenture.com _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development