Skip to content
  • Felix Ernst's avatar
    Avoid KJob::exec() in DolphinView · a825e1bd
    Felix Ernst authored and Elvis Angelaccio's avatar Elvis Angelaccio committed
    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.
    a825e1bd