Summary: | Preprocessor keywords ignored which causes endless loop in code import | ||
---|---|---|---|
Product: | [Applications] umbrello | Reporter: | William Cleveland <whclevelandjr> |
Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | patch for #119125 |
Description
William Cleveland
2005-12-28 17:55:09 UTC
I too have similar problems. When I import a class that has an #include it includes all files connected with them. When it includes some of the standard libraries the program crashes. Some one on the #umbrello chat channel said it wasn't supposed to import. Created attachment 20700 [details]
patch for #119125
The old code tried not to parse a file if the file was already parsed but this
detection was done too late (after the parsing of the dependences).
Modified function-> CppImport::feedTheModel
SVN commit 668653 by okellogg: Apply attchment 20700 from Antoine Dopffer > The old code tried not to parse a file if the file was already parsed but this > detection was done too late (after the parsing of the dependences). > Modified function-> CppImport::feedTheModel Thanks for the fix Antoine. BUG:119125 M +1 -0 ChangeLog M +3 -3 umbrello/codeimport/cppimport.cpp --- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #668652:668653 @@ -1,6 +1,7 @@ Version 1.5.71 * Bugs/wishes from http://bugs.kde.org: +* Preprocessor keywords ignored which causes endless loop in code import (119125) * Unstable saves and loads, class names become dirty (145709) * Crash on deleting class in list view (145762) * Class attribute documentation not generated for python (145916) --- branches/KDE/3.5/kdesdk/umbrello/umbrello/codeimport/cppimport.cpp #668652:668653 @@ -51,6 +51,9 @@ CppImport::~CppImport() {} void CppImport::feedTheModel(const QString& fileName) { + if (ms_seenFiles.find(fileName) != ms_seenFiles.end()) + return; + ms_seenFiles.append(fileName); QMap<QString, Dependence> deps = ms_driver->dependences(fileName); if (! deps.empty()) { QMap<QString, Dependence>::Iterator it; @@ -68,9 +71,6 @@ feedTheModel(includeFile); } } - if (ms_seenFiles.find(fileName) != ms_seenFiles.end()) - return; - ms_seenFiles.append(fileName); TranslationUnitAST *ast = ms_driver->translationUnit( fileName ); if (ast == NULL) { kError() << "CppImport::feedTheModel: " << fileName << " not found" << endl; |