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 437 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 459 of file workerbase.cpp.

◆ errorString()

QString KIO::WorkerResult::errorString ( ) const

The localized error description if applicable.

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

◆ operator=()

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

Definition at line 442 of file workerbase.cpp.

◆ pass()

WorkerResult KIO::WorkerResult::pass ( )
static

Constructs a success result.

Definition at line 474 of file workerbase.cpp.

◆ success()

bool KIO::WorkerResult::success ( ) const

Whether or not the result was a success.

Definition at line 454 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 Tue Mar 26 2024 11:18:52 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.