Bug 395384 - The .xmi file Extension has to be Added Manually to file Names
Summary: The .xmi file Extension has to be Added Manually to file Names
Status: REPORTED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: openSUSE Linux
: NOR minor
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-14 18:10 UTC by Martin Vahi
Modified: 2020-08-02 10:10 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Umbrello's "Save as" dialog with Qt4 (42.35 KB, image/png)
2020-08-02 10:07 UTC, Ralf Habacker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Vahi 2018-06-14 18:10:59 UTC
Reproduction:

 1) Open/start Umbrello.
 2) Pushthe "Save" button on the toolbar.
 3) Select a folder.
 4) Put the text cursor back to the Name text field.
 5) Type "foo", without the quotes.
 6) Push the "Save" button.
 7) Close/stop/exit Umbrello.
 8) Open/start Umbrello.
 9) Push the "Open" button on the toolbar.
10) Look up the folder, where the "foo.xmi" is expected to be.

11) Curse that the file is "not there".

12) Close the "Open" dialog by pushing the "Cancel" button.
13) Open up a terminal or a file browser and move to the folder, 
    where the "foo.xmi" is supposed to be.
14) Rename file "foo" to "foo.xmi".
15) Push the "Open" button on the toolbar.
16) Look up the folder, where the "foo.xmi" is expected to be.
17) Select file type "*.xmi|Uncompressed XMI files"

18) Enjoy the presence of the "foo.xmi", select it and push the "Open" button.
Comment 1 Ralf Habacker 2018-06-15 06:23:11 UTC
Opensuse provides several umbrello versions at https://software.opensuse.org/package/umbrello. Which are you using ? 

I checked this with recent version 18.4.2 and was able to reproduce this behavior only if the file filter in the save dialog was cleared or was set to any type. Can you confirm ?
Comment 2 Robert Hairgrove 2020-08-01 14:08:14 UTC
Actually, this has to do with the mangling of the file filters when the Gnome/Gtk native file dialog is used:

https://bugreports.qt.io/browse/QTBUG-78557

Perhaps this could be a user-configurable option to add the .xmi part automatically?
Comment 3 Ralf Habacker 2020-08-02 10:07:02 UTC
Created attachment 130571 [details]
Umbrello's "Save as" dialog with Qt4

The Qt4 version of Umbrello has this setting, as can be seen in the screenshot.
Since this dialog is provided by Qt, this seems to be a fundamental problem of Qt5.
Comment 4 Ralf Habacker 2020-08-02 10:10:14 UTC
(In reply to Ralf Habacker from comment #3)
> Since this dialog is provided by Qt, this seems to be a fundamental problem
> of Qt5.

Looking into the source (https://invent.kde.org/sdk/umbrello/-/blob/master/umbrello/uml.cpp#L1356) , I need to correct that statement. The Qt4 variant uses KFileDialog::getSaveUrl() while the Qt5 variant uses QFileDialog::getSaveFileUrl() which does not support that feature.