[umbrello-devel] [umbrello] [Bug 316095] unable to export class diagram to image
Ralf Habacker
ralf.habacker at freenet.de
Tue Sep 24 06:43:14 UTC 2013
https://bugs.kde.org/show_bug.cgi?id=316095
--- Comment #9 from Ralf Habacker <ralf.habacker at freenet.de> ---
(In reply to comment #8)
> At least we're getting somewhere :)
>
> In reply to your comment: imageTypeToMimeType() is still handling one file
> type per invocation.
>
> The culprit is one filter can now contain multiple file extensions ("*.jpeg
> *.jpg *.jpe *.jfif" - the KMimeType pattern). So for the PNG files, all is
> fine ("*.png" -> "png" == "png"), but JPEG fails ("*.jpeg *.jpg" -> "jpeg
> jpg" != "jpg") hence checking for contains("jpg") will make everything work
> as intended.
>
I see, thanks for explanations.
> I agree there must be a better way of mapping the selected filter back to a
> mime-type.
What about to refactor UMLFileDialog::currentMimeFilter() to something like
/**
* @brief return the mime type of the currenty selected file
* @return mime type string
*/
QString UMLFileDialog::currentMimeFilter()
{
KUrl url = m_dialog->selectedUrl();
QFileInfo fi(url.toLocalFile());
return UMLViewImageExporterModel::imageTypeToMimeType(fi.suffix());
}
which is already the default case on windows ?
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the umbrello-devel
mailing list