KIO::WorkerResult

Search for usage in LXR

#include <workerbase.h>

Public Member Functions

 WorkerResult ()=delete
 
 WorkerResult (const WorkerResult &)
 
 WorkerResult (WorkerResult &&) noexcept
 
int error () const
 
QString errorString () const
 
WorkerResultoperator= (const WorkerResult &)
 
WorkerResultoperator= (WorkerResult &&) noexcept
 
bool success () const
 

Static Public Member Functions

static WorkerResult fail (int _error=KIO::ERR_UNKNOWN, const QString &_errorString=QString())
 
static WorkerResult pass ()
 

Detailed Description

The result of a worker call When using the Result type always mark the function Q_REQUIRED_RESULT to enforce handling of the Result.

Definition at line 23 of file workerbase.h.

Constructor & Destructor Documentation

◆ WorkerResult()

KIO::WorkerResult::WorkerResult ( )
delete

Use fail() or pass();.

Member Function Documentation

◆ error()

int KIO::WorkerResult::error ( ) const

The error code (or ERR_UNKNOWN) of the result.

Definition at line 464 of file workerbase.cpp.

◆ errorString()

QString KIO::WorkerResult::errorString ( ) const

The localized error description if applicable.

Definition at line 469 of file workerbase.cpp.

◆ fail()

WorkerResult KIO::WorkerResult::fail ( int  _error = KIO::ERR_UNKNOWN,
const QString _errorString = QString() 
)
static

Constructs a failure results.

Definition at line 474 of file workerbase.cpp.

◆ pass()

WorkerResult KIO::WorkerResult::pass ( )
static

Constructs a success result.

Definition at line 479 of file workerbase.cpp.

◆ success()

bool KIO::WorkerResult::success ( ) const

Whether or not the result was a success.

Definition at line 459 of file workerbase.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue Dec 6 2022 03:56:08 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.