Skip to content
Commit a825e1bd authored by Felix Ernst's avatar Felix Ernst 🇺🇦 Committed by Elvis Angelaccio
Browse files

Avoid KJob::exec() in DolphinView

This commit replaces an error-prone usage of KIO::StatJob::exec() in
DolphinView with the recommended KIO::StatJob::start().

The containing method DolphinView::statusBarText() is changed to be a
method without return value: requestStatusBarText()
The new status bar text is instead returned through a new
setStatusBarText() signal that will be emitted asynchronously if
necessary.

The calling code that deals with status bar text is refactored to
correctly work despite the new asynchronicity. The helper method
calculateItemCount() is moved into requestStatusBarText() and some
other code from requestStatusBarText() is moved into a new helper
method emitStatusBarText().

The documentation of KIO::KJob::exec() explains why it should be
avoided. A reproducible crash is the reason for this commit.
parent 7eae6bba
Pipeline #50231 canceled with stage
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment