Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
Qt Creator 4.2.0-rc1
-
None
-
Windows 7, x64 build based on Qt 5.6.2 MSVC2015 x64
-
821bc8cdb1be581df6255a1cad2466a3c9fbd1bc
Description
I have a qmake project on windows which defines all paths using backslashes like e.g.
SOURCE += \ D:\Projects\SomeProject.git\Src\MySource.cpp
I use that project file to open the source tree in QtCreator and have a custom build step set up to call the actual build tool (waf).
With the latest 4.2 branch this causes the project parsing to crash in case one of the referenced source files is not existent yet. We have some files that are generated on the fly during the build but are still referenced in the sources list so that I am able to browse those autogenerated files as well.
The crash occurs in ProFileEvaluator::absoluteFileValues. Debugging has shown this is caused by line 149:
int nameOff = absEl.lastIndexOf(QLatin1Char('/')); QString absDir = d->m_tmp1.setRawData(absEl.constData(), nameOff); if (IoUtils::exists(absDir)) { ....
It's only searching for forward slashes, never backward slashes. Changing this to support backward as well will fix the crash because absDir will have valid contents and thus the existence check works.
Attachments
Issue Links
- is duplicated by
-
QTCREATORBUG-17597 Extra "\" in .pro file make crash qtcreator
- Closed
-
QTCREATORBUG-17527 [REG: 4.1.0 -> 4.2.0]: Qt Creator crashes when opening a project file that contains reference to file that does not exist
- Closed