[Uml-devel] [Bug 130600] command line switches: graphics export to directory does not work with relative paths

Daniel Calviño Sánchez danxuliu at gmail.com
Wed Jul 12 15:40:15 UTC 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=130600         




------- Additional Comments From danxuliu gmail com  2006-07-12 17:40 -------
SVN commit 561582 by danxuliu:

Simplified creation of directory URL to export images to.
Thanks to Carsten Pfeiffer for the suggestion.
CCBUG: 130600

 M  +1 -11     main.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/main.cpp #561581:561582
 @ -182,17 +182,7  @
     KURL directory;
     QCStringList directoryOpt = args->getOptionList("directory");
     if (directoryOpt.size() > 0) {
-        QString directoryPath(directoryOpt.last());
-
-        if (KURL::isRelativeURL(directoryPath)) {
-            QString currentDirectory = KCmdLineArgs::cwd();
-            if (!currentDirectory.endsWith("/")) {
-                currentDirectory.append("/");
-            }
-            directory = KURL(currentDirectory, directoryPath);
-        } else {
-            directory = KURL(directoryPath);
-        }
+        directory = KCmdLineArgs::makeURL(directoryOpt.last());
     } else {
         directory = KURL(UMLApp::app()->getDocument()->URL().directory());
     }




More information about the umbrello-devel mailing list