summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Habacker <[email protected]>2015-06-04 10:31:37 +0200
committerRalf Habacker <[email protected]>2015-06-04 10:31:37 +0200
commit9b5dd5c07bf230bbbd9d76a73fde021b469d5e2c (patch)
treef6b6c2d9eab1c427b7dd2c91b055f92081352484
parent3b19aea851750e5e0291c5862afb79858780e468 (diff)
Merge 'Fix diagram export' from frameworks branch.
1. Single export: Don't try to create a directory for the image-name. 2. Export all: Use QUrl::fromLocalFile() for the target dir. REVIEW: 123935 Conflicts: umbrello/umlviewimageexportermodel.cpp
-rw-r--r--umbrello/umlviewimageexportermodel.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/umbrello/umlviewimageexportermodel.cpp b/umbrello/umlviewimageexportermodel.cpp
index ecddfe7..c6ae9b2 100644
--- a/umbrello/umlviewimageexportermodel.cpp
+++ b/umbrello/umlviewimageexportermodel.cpp
@@ -222,7 +222,7 @@ QStringList UMLViewImageExporterModel::exportAllViews(const QString &imageType,
UMLViewList views = app->document()->viewIterator();
foreach (UMLView *view, views) {
#if QT_VERSION >= 0x050000
- QUrl url(directory.path() + QLatin1Char('/') +
+ QUrl url = QUrl::fromLocalFile(directory.path() + QLatin1Char('/') +
getDiagramFileName(view->umlScene(), imageType, useFolders));
#else
KUrl url = directory;
@@ -360,10 +360,9 @@ bool UMLViewImageExporterModel::prepareDirectory(const KUrl &url) const
directory.setPath(QString());
// creates the directory and any needed parent directories
- QStringList dirs = url.path().split(QDir::separator(), QString::SkipEmptyParts);
+ QStringList dirs = url.adjusted(QUrl::RemoveFilename).path().split(QDir::separator(), QString::SkipEmptyParts);
for (QStringList::ConstIterator it = dirs.constBegin() ; it != dirs.constEnd(); ++it) {
directory.setPath(directory.path() + QLatin1Char('/') + *it);
-
KIO::StatJob *statJob = KIO::stat(directory, KIO::StatJob::SourceSide, 0);
KJobWidgets::setWindow(statJob, UMLApp::app());
statJob->exec();