Bug 154187 - [PATCH] Java import in Umbrello does not work
Summary: [PATCH] Java import in Umbrello does not work
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-16 20:35 UTC by Felix Möller
Modified: 2008-12-09 17:29 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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