Bug 154187

Summary: [PATCH] Java import in Umbrello does not work
Product: [Applications] umbrello Reporter: Felix Möller <felix>
Component: generalAssignee: Umbrello Development Group <umbrello-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Felix Möller 2007-12-16 20:35:42 UTC
Version:           1.92.1 (using KDE KDE 3.97.0)
Installed from:    Compiled From Sources
Compiler:          gcc (SUSE Linux) 4.3.0 20071129 (experimental) [trunk revision 130511] 
OS:                Linux

I found the Bug in the openSUSE KDE 4.0 RC2 packages and compiled umbrello myself from SVN (r749170) to verify it.

The import of Java packages never finishes as the path gets prefixed recursively prefixed with slashes. (i.e. after some time umbrello tries to import ////////////////home/fm/java.

It is solved with the following patch for me:
Index: umbrello/umbrello/codeimport/javaimport.cpp
===================================================================
--- umbrello/umbrello/codeimport/javaimport.cpp (Revision 749170)
+++ umbrello/umbrello/codeimport/javaimport.cpp (Arbeitskopie)
@@ -133,7 +133,7 @@
     // current class
     //
     QString myDir = file.join( "/" );
-    QString myFile = '/' + myDir + '/' + baseClassName + ".java";
+    QString myFile = myDir + '/' + baseClassName + ".java";
     if ( QFile::exists(myFile) ) {
         spawnImport( myFile );
         if ( isArray ) {
Comment 1 Jonathan Riddell 2007-12-16 22:49:34 UTC
SVN commit 749246 by jriddell:

Fix recursive file lookup with java import
Patch from Felix MÃler
CCBUG:154187


 M  +1 -1      javaimport.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=749246