[umbrello-devel] [umbrello] [Bug 335914] crash on importing qt 4 source

Oliver Kellogg okellogg at users.sourceforge.net
Mon Jun 9 10:56:54 UTC 2014


https://bugs.kde.org/show_bug.cgi?id=335914

Oliver Kellogg <okellogg at users.sourceforge.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED
      Latest Commit|                            |http://commits.kde.org/umbr
                   |                            |ello/60fc217737de28fa9a3f90
                   |                            |ea60de1efda9cce231

--- Comment #4 from Oliver Kellogg <okellogg at users.sourceforge.net> ---
Git commit 60fc217737de28fa9a3f90ea60de1efda9cce231 by Oliver Kellogg.
Committed on 09/06/2014 at 10:52.
Pushed by okellogg into branch 'master'.

(In reply to comment #2)
> (In reply to comment #1)
> > A workaround I found is adding the line indicated with '+'.
> > ms_seenFiles.append(includeFile);
>
> The problem is that the current file is added to the list of seen files
> after importing, which failed when an included file includes the current
> file.

I tested this on current clucene/src/core/CLucene git master and I confirm
your finding.
I therefore commit both comment #2 and a clean version of comment #3:

umbrello/codeimport/classimport.h
- New virtual function initPerFile() lets concrete importers provide
  initializations which are executed before each single file parsed.
  This is different from initialize() in that initialize() is executed only
  once for all files parsed.

umbrello/codeimport/classimport.cpp
- Provide empty default implementation for new function initPerFile()
- In function importFiles(), call importFile() instead of parseFile()
- In function importFile(), call initPerFile() instead of initialize()

umbrello/codeimport/cppimport.{h,cpp}
- Reimplement function initPerFile() from ClassImport.
- In function feedTheModel(), append includeFile to ms_seenFiles prior to
  calling feedTheModel(includeFile) if includeFile is not found in
  ms_seenFiles.

umbrello/codeimport/import_utils.cpp
- In function createUMLObject(), if name.startsWith("::") then remove the
  leading "::" from name, and set parentPkg to logicalView.

umbrello/model_utils.cpp
- In function findUMLObject(), if name.startsWith("::") then remove the
  leading "::" from name, and set currentObj to NULL.

M  +15   -6    umbrello/codeimport/classimport.cpp
M  +3    -1    umbrello/codeimport/classimport.h
M  +9    -1    umbrello/codeimport/cppimport.cpp
M  +3    -1    umbrello/codeimport/cppimport.h
M  +4    -1    umbrello/codeimport/import_utils.cpp
M  +10   -5    umbrello/model_utils.cpp

http://commits.kde.org/umbrello/60fc217737de28fa9a3f90ea60de1efda9cce231

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the umbrello-devel mailing list