[Qt-interest] canonicalFilePath() and mounted partitions as directory on Win32

Andreas Roth aroth at arsoft-online.com
Fri Apr 30 17:17:59 CEST 2010


Hi!

I'm using Qt 4.6.1 on Win32 (MSVC2008) and one of my partions is mounted 
as directory on c:\ (Volume{09761061-71e4-11de-b4d0-001fd09683cf} is 
mounted at c:\data). If i try to run moc on a header file which tries to 
include another header file (e.g. include_file.h), moc cannot open the file.
I tracked down the problem a bit and found that in the moc 
preprocessor.cpp Line 824:
     include = fi.canonicalFilePath().toLocal8Bit();
fi is a QFileInfo object and contains the correct filename 
c:/data/path/to/include_file.h and the call of canonicalFilePath() 
transforms it into 
Volume{09761061-71e4-11de-b4d0-001fd09683cf}/path/to/include_file.h. A 
few lines below (line 831) moc tries to open this file (using the 
transformed path) and fails.
I have two question:
- Is it correct, that moc does not complain about the error opening the 
include file?
- Why does QFile::open fail when on a canonicalFilePath?

I hope somebody can help me with this issue.

Thanks,
Andreas




More information about the Qt-interest-old mailing list