Bug 414040 - The .tuberling extension isn't added on save
Summary: The .tuberling extension isn't added on save
Status: RESOLVED FIXED
Alias: None
Product: ktuberling
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Astals Cid
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-11 20:01 UTC by fottsia
Modified: 2021-11-25 23:31 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot of the issue (118.95 KB, image/png)
2019-11-25 07:23 UTC, fottsia
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fottsia 2019-11-11 20:01:42 UTC
Hi, when saving a file in ktuberling, the .tuberling extension isn't added automatically.

So later on if one opens the file open dialog, that file isn't shown.

But if one manually adds filename.tuberling when saving the file, then it properly gets saved.

Observed in Ubuntu 18.04 and 19.10.

Thank you.
Comment 1 Albert Astals Cid 2019-11-17 21:29:50 UTC
which ktuberling version are you using?
Comment 2 fottsia 2019-11-24 14:28:56 UTC
Hi, the last version that I've tested with was on Ubuntu 19.10, which has ktuberling 4:19.04.3-0ubuntu1.
Comment 3 Albert Astals Cid 2019-11-24 21:52:19 UTC
That's kind of old.

Would you be able to provide a video of you trying to save a file?
Comment 4 fottsia 2019-11-25 07:14:53 UTC
I tested again in various distributions. My conclusion is that to reproduce the issue, one just needs to install ktuberling in any **non-KDE** distribution.

Ubuntu Mate 20.04, ktuberling 4:19.08.3-0ubuntu1: FAILS
Kubuntu 20.04, ktuberling 4:19.08.3-0ubuntu1: WORKS
Kubuntu 18.04, ktuberling 4:17.12.3-0ubuntu1: WORKS
Fedora XFCE 30, ktuberling 19.04.2-1: FAILS

So I guess it's a problem with missing dependencies or with Qt/GNOME integration or something. Nevertheless, ktuberling doesn't show any warnings in stderr about missing things.
Comment 5 fottsia 2019-11-25 07:23:21 UTC
Created attachment 124109 [details]
Screenshot of the issue

Here's a screenshot of the issue (instead of video as it's quicker). Steps that I did:

I opened ktuberling, pressed Ctrl+S to save, named: asdf. Closed ktuberling.

Then I did the same steps again. Of course ktuberling tells me that "asdf" already exists now; but not that it's not displayed in the dialog as it doesn't have the .tuberling extension.


Of course this tells me that the "asdf" file a
Comment 6 fottsia 2019-11-25 07:24:52 UTC
Sorry I sent my previous comment too soon and it had a couple of typos, here's the correct one:

Here's a screenshot of the issue (instead of video as it's quicker). Steps that I did:

I opened ktuberling, pressed Ctrl+S to save, named: asdf. Closed ktuberling.

Then I did the same steps again. Of course ktuberling tells me that "asdf" already exists now; but note that it's not displayed in the dialog as it doesn't have the .tuberling extension.
Comment 7 Albert Astals Cid 2019-11-25 21:03:04 UTC
i guess this is a bug in Qt's integration with the gtk file dialog.

Needs investigating, but nothing that can actually be fixed in KTuberling.
Comment 8 Alkis Georgopoulos 2021-11-05 07:19:29 UTC
The problem can be easily reproduced by running:

export XDG_CURRENT_DESKTOP=MATE
ktuberling

I.e. the problem happens in any desktop environment except for KDE, and it can even reproduced under KDE by modifying the XDG_CURRENT_DESKTOP environment variable.
Wouldn't it be possible for the ktuberling code to manually add the extension, when it sees that it's missing from the filename that it gets from the file > save dialog?
Comment 9 Albert Astals Cid 2021-11-05 20:56:11 UTC
> Wouldn't it be possible for the ktuberling code to manually add the extension, when it sees that it's missing from the filename that it gets from the file > save dialog?

It would but then we would have to fix the same bug in a million places, what we need is for Qt to get fixed.
Comment 10 Albert Astals Cid 2021-11-17 14:08:16 UTC
Actually it seems i remembered wrong and Qt doesn't guarantee that it will add the extesion, so yes, we have to do this check in all the apps :/
Comment 11 Bug Janitor Service 2021-11-17 14:12:24 UTC
A possibly relevant merge request was started @ https://invent.kde.org/games/ktuberling/-/merge_requests/2
Comment 12 Albert Astals Cid 2021-11-25 23:31:40 UTC
Git commit 6ba5b71bfdaeaa396a631fa3d1a57499b01469c8 by Albert Astals Cid.
Committed on 25/11/2021 at 23:31.
Pushed by aacid into branch 'release/21.12'.

Make sure the saved files have the extension they should have

The Qt dialog API doesn't guarantee the returned string will have one of
the chosen extensions, but if that doesn't happen ktuberling is unhappy
so enforce them

M  +46   -2    toplevel.cpp

https://invent.kde.org/games/ktuberling/commit/6ba5b71bfdaeaa396a631fa3d1a57499b01469c8