[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello
Daniel Calviño Sánchez
danxuliu at gmail.com
Wed Jul 12 13:29:43 UTC 2006
SVN commit 561550 by danxuliu:
Added support for relative paths when exporting images from command line
BUG: 130600
M +11 -1 main.cpp
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/main.cpp #561549:561550
@@ -182,7 +182,17 @@
KURL directory;
QCStringList directoryOpt = args->getOptionList("directory");
if (directoryOpt.size() > 0) {
- directory = KURL(directoryOpt.last());
+ 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);
+ }
} else {
directory = KURL(UMLApp::app()->getDocument()->URL().directory());
}
More information about the umbrello-devel
mailing list