diff options
authorElvis Angelaccio <>2016-11-13 13:46:23 (GMT)
committerElvis Angelaccio <>2016-11-13 13:46:23 (GMT)
commit61d9f87227711c9b9a7d0180479f94447c6039f7 (patch)
parenta6a38b5bf64a58df332aa83441154fb85b68464d (diff)
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. BUG: 365200 FIXED-IN: 16.12.0
1 files changed, 3 insertions, 1 deletions
diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp
index 92e51cd..e12db4b 100644
--- a/app/mainwindow.cpp
+++ b/app/mainwindow.cpp
@@ -155,9 +155,11 @@ bool MainWindow::loadPart()
- connect(m_part, SIGNAL(busy()), this, SLOT(updateActions()));
connect(m_part, SIGNAL(ready()), this, SLOT(updateActions()));
connect(m_part, SIGNAL(quit()), this, SLOT(quit()));
+ // #365200: this will disable m_recentFilesAction, while openUrl() will enable it.
+ // So updateActions() needs to be called after openUrl() returns.
+ connect(m_part, SIGNAL(busy()), this, SLOT(updateActions()), Qt::QueuedConnection);
return true;