[umbrello-devel] [umbrello] [Bug 335914] crash on importing qt 4 source
Oliver Kellogg
okellogg at users.sourceforge.net
Sun Jun 8 13:44:56 UTC 2014
https://bugs.kde.org/show_bug.cgi?id=335914
Oliver Kellogg <okellogg at users.sourceforge.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |okellogg at users.sourceforge.
| |net
--- Comment #3 from Oliver Kellogg <okellogg at users.sourceforge.net> ---
(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.
The ms_seenFiles is designed to not support mutual #includes - but I believe
you are not talking about mutual includes but rather about importFiles() being
called with more than one file?
If so then IMHO we might clear ms_seenFiles in the loop in
ClassImport::importFiles() :
--- a/umbrello/codeimport/classimport.cpp
+++ b/umbrello/codeimport/classimport.cpp
@@ -67,6 +67,7 @@ bool ClassImport::importFiles(const QStringList& fileNames)
bool result = true;
umldoc->setLoading(true);
foreach (const QString& fileName, fileNames) {
+ ms_seenFiles.clear();
umldoc->writeToStatusBar(i18n("Importing file: %1 Progress: %2/%3",
fileName, processedFilesCount,
fileNames.size()));
if (!parseFile(fileName))
I haven't tried this out yet, though.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the umbrello-devel
mailing list