Bug 365200 - Open Recent action is enabled while opening an archive
Summary: Open Recent action is enabled while opening an archive
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (other bugs)
Version First Reported In: 16.04.2
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-07 15:07 UTC by Elvis Angelaccio
Modified: 2016-11-13 13:55 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 16.12.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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