Bug 507069 - "Auto save output as" still become "Stop Autosave" when cancel selecting in file dialog
Summary: "Auto save output as" still become "Stop Autosave" when cancel selecting in f...
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: history (other bugs)
Version First Reported In: 25.04.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-15 13:34 UTC by jackyzy823
Modified: 2025-09-11 06:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jackyzy823 2025-07-15 13:34:51 UTC
SUMMARY
"Auto save output as" still become "Stop Autosave" when cancel selecting in file dialog

STEPS TO REPRODUCE
1.  Open Konsole, Click menu "File -> Auto save output as“
2. Click "Cancel" in the opening file dialog
3. Click menu "File " again 

OBSERVED RESULT
it shows "stop auto save"

EXPECTED RESULT
it should show "Auto save output as". since we haven't choose an output file.


ADDITIONAL INFORMATION

The result of the dialog doesn't affect the change of visible of autosaveaction button
https://invent.kde.org/utilities/konsole/-/blob/master/src/session/SessionController.cpp#L1819

https://invent.kde.org/utilities/konsole/-/blob/master/src/SaveHistoryAutoTask.cpp#L68

the `execute` should return the  the result that whether task is starting or rejected (due to dialog cancel, or file operation failed)
Comment 1 jackyzy823 2025-09-11 06:23:06 UTC
Git commit 95c324615ef696a785691905fb7fa9c33042d7cf by Jack Xu.
Committed on 11/09/2025 at 02:01.
Pushed by waqar into branch 'master'.

Do not change auto save action visibility and title when auto save task failed to be spawned.

"Auto save output as" still became "Stop Autosave" when cancelling in file dialog.

Make SessionTask::execute return value that indicates the task has been spawned
successfully or not. So SessionController::autoSaveHistory could decide whether
to change the visibility of _startAutoSaveAction and _stopAutoSaveAction.

M  +5    -4    src/SaveHistoryAutoTask.cpp
M  +1    -1    src/SaveHistoryAutoTask.h
M  +2    -1    src/SaveHistoryTask.cpp
M  +1    -1    src/SaveHistoryTask.h
M  +2    -1    src/SearchHistoryTask.cpp
M  +1    -1    src/SearchHistoryTask.h
M  +15   -10   src/session/SessionController.cpp
M  +2    -1    src/session/SessionTask.h

https://invent.kde.org/utilities/konsole/-/commit/95c324615ef696a785691905fb7fa9c33042d7cf