Summary: | I can`t save my project. App crash after open kde4 (not native, like in system settings!) save dialog | ||
---|---|---|---|
Product: | [Applications] ktuberling | Reporter: | Chernosov Denis <denis0.ru> |
Component: | general | Assignee: | Ilie Halip <lupuroshu> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | afiestas, jazeix, justin.zobel, kde-windows, lucanreisoficial, lupuroshu, schwarzer |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Microsoft Windows | ||
OS: | Microsoft Windows | ||
Latest Commit: | https://invent.kde.org/games/ktuberling/commit/af6d123514757649f355b8ecb81102728392f527 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | Windows patch |
Description
Chernosov Denis
2009-09-12 11:10:17 UTC
Is this still happening for you? KDE 4.4.0 file saved... but without automatic extension adding. And before saving was warnign message "file with this name already exist. Replace|Cancel". Any filename generate such message. After selecting Replace, file was saved. Reopen was fine (except null-extension of file). File dialog from Dolphin. Confirmed with 4.4.1 but only under Windows. Linux (here 4.4.3) is fine. Since there were no commits in the stable branch, it is likely windows-related. Hi. I'd like to do some further work on this bug if it's ok with you. Created attachment 43386 [details]
Windows patch
It seems that KFileDialog is a bit broken on Win - if I use KFileDialog::ConfirmOverwrite, it always asks me to overwrite the file (even though it doesn't exist), plus it doesn't add the extension, just like in the last comments.
What I did was check how other games do the saving. So in this patch, I'm using an empty KUrl on Windows which shows the native save dialog, saving the game correctly.
(In reply to Ilie Halip from comment #5) > Created attachment 43386 [details] > Windows patch > > It seems that KFileDialog is a bit broken on Win - if I use > KFileDialog::ConfirmOverwrite, it always asks me to overwrite the file (even > though it doesn't exist), plus it doesn't add the extension, just like in > the last comments. > > What I did was check how other games do the saving. So in this patch, I'm > using an empty KUrl on Windows which shows the native save dialog, saving > the game correctly. Thanks for the patch, can you please submit it on https://invent.kde.org/games/ktuberling/-/merge_requests (In reply to Justin Zobel from comment #6) > (In reply to Ilie Halip from comment #5) > > Created attachment 43386 [details] > > Windows patch > > > > It seems that KFileDialog is a bit broken on Win - if I use > > KFileDialog::ConfirmOverwrite, it always asks me to overwrite the file (even > > though it doesn't exist), plus it doesn't add the extension, just like in > > the last comments. > > > > What I did was check how other games do the saving. So in this patch, I'm > > using an empty KUrl on Windows which shows the native save dialog, saving > > the game correctly. > > Thanks for the patch, can you please submit it on > https://invent.kde.org/games/ktuberling/-/merge_requests The patch is 10 years old... It does not apply anymore as the code has moved to QFileDialog (https://invent.kde.org/games/ktuberling/-/blob/master/toplevel.cpp#L380). I downloaded it from https://binary-factory.kde.org/job/KTuberling_Nightly_win64/ and when I try to save a file, I have the error: "Could not save file." Git commit 5c6bfedc3e8d55035dc25fdc1ea84b452fac71d2 by Johnny Jazeix. Committed on 28/11/2020 at 15:48. Pushed by aacid into branch 'master'. Fix filename on saving on Windows. path() does not return a valid path. M +2 -2 toplevel.cpp https://invent.kde.org/games/ktuberling/commit/5c6bfedc3e8d55035dc25fdc1ea84b452fac71d2 Git commit af6d123514757649f355b8ecb81102728392f527 by Albert Astals Cid, on behalf of Johnny Jazeix. Committed on 28/11/2020 at 19:00. Pushed by aacid into branch 'release/20.12'. Fix filename on saving on Windows. path() does not return a valid path. (cherry picked from commit 5c6bfedc3e8d55035dc25fdc1ea84b452fac71d2) M +2 -2 toplevel.cpp https://invent.kde.org/games/ktuberling/commit/af6d123514757649f355b8ecb81102728392f527 |