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 35 of file workerbase.h.

Constructor & Destructor Documentation

◆ WorkerResult() [1/2]

KIO::WorkerResult::WorkerResult ( )
delete

Use fail() or pass();.

◆ WorkerResult() [2/2]

KIO::WorkerResult::WorkerResult ( const WorkerResult & rhs)

Definition at line 438 of file workerbase.cpp.

Member Function Documentation

◆ error()

int KIO::WorkerResult::error ( ) const

The error code (or ERR_UNKNOWN) of the result.

Definition at line 460 of file workerbase.cpp.

◆ errorString()

QString KIO::WorkerResult::errorString ( ) const

The localized error description if applicable.

Definition at line 465 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 470 of file workerbase.cpp.

◆ operator=()

WorkerResult & KIO::WorkerResult::operator= ( const WorkerResult & rhs)

Definition at line 443 of file workerbase.cpp.

◆ pass()

WorkerResult KIO::WorkerResult::pass ( )
static

Constructs a success result.

Definition at line 475 of file workerbase.cpp.

◆ success()

bool KIO::WorkerResult::success ( ) const

Whether or not the result was a success.

Definition at line 455 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-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:48:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.