Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
Qt Creator 1.2.90, Qt Creator 1.3.0 rc1
-
None
-
b02d705ac4f4fb256c3d92340720e4fb972ba0f9
Description
The editor of Qt Creator 1.2.92 core dumps when viewing a source file with a global namespace tag, '::', outside of a namespace.
Note that g++ reports this configuration as an error since the global namespace is already assumed.
For example,
1) Create the following files then exit Qt Creator (they work OK if you do not exit).
2) Open Qt Creator and load Global-namespace.cpp
3) Enter a new line before 'ostream'
4) BUG – Unhandled exception at 0x018a03a0 in qtcreator.exe: 0xC0000005: Access violation reading location 0x00000038.
Qt Creator 1.2.92 with mingw, Windows XP, Qt 4.5.3
Global-namespace.cpp #include "Global-namespace.h" namespace orgQhull { } ostream & :: operator<<(ostream &os, const Coordinates &cs) { Coordinates::const_iterator c= cs.begin(); for(int i=cs.count(); i--; ){ os<< *c++ << " "; } return os; }//operator<<
Global-namespace.h
#ifndef GLOBALNAMESPACE_H #define GLOBALNAMESPACE_H #include <ostream> namespace orgQhull { class Coordinates { }; } std::ostream & operator<<(std::ostream &os, const orgQhull::Coordinates &cs); #endif // GLOBALNAMESPACE_H