Bug 365200

Summary: Open Recent action is enabled while opening an archive
Product: [Applications] ark Reporter: Elvis Angelaccio <elvis.angelaccio>
Component: generalAssignee: Elvis Angelaccio <elvis.angelaccio>
Status: RESOLVED FIXED    
Severity: crash CC: rakuco, rthomsen6
Priority: NOR    
Version First Reported In: 16.04.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 16.12.0
Sentry Crash Report:

Description Elvis Angelaccio 2016-07-07 15:07:25 UTC
This means that the user can start another ListJob, leading to a crash.

Reproducible: Always

Steps to Reproduce:
1. Open an huge archive
2. Archive -> Open Recent while the previous archive is still loading

Actual Results:  
Crash

Expected Results:  
Archive -> Open Recent should not be enabled during a ListJob
Comment 1 Elvis Angelaccio 2016-11-12 20:03:05 UTC
Found the cause: the action is correctly disabled when the Part emits the busy signal, but then m_recentFilesAction->addUrl(url) in MainWindow::openUrl() unexpectedly enables the action again.
Comment 2 Elvis Angelaccio 2016-11-13 13:55:31 UTC
Git commit 61d9f87227711c9b9a7d0180479f94447c6039f7 by Elvis Angelaccio.
Committed on 13/11/2016 at 13:46.
Pushed by elvisangelaccio into branch 'master'.

mainwindow: properly disable 'Open Recent' action

KRecentFilesAction::addUrl() makes the action enabled. This is called in
MainWindow::openUrl() after `busy()` has been emitted by the Part, which
means the action is enabled while a LoadJob is running.

If we use a queued connection instead, addUrl() will be called first and then
MaindWindow::updateActions() will disable the action as expected.
FIXED-IN: 16.12.0

M  +3    -1    app/mainwindow.cpp

http://commits.kde.org/ark/61d9f87227711c9b9a7d0180479f94447c6039f7