Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QSystemError Class Reference

#include <qsystemerror_p.h>

+ Collaboration diagram for QSystemError:

Public Types

enum  ErrorScope { NoError , StandardLibraryError , NativeError }
 

Public Member Functions

constexpr QSystemError (int error, ErrorScope scope)
 
constexpr QSystemError ()=default
 
QString toString () const
 
constexpr ErrorScope scope () const
 
constexpr int error () const
 

Static Public Member Functions

static Q_CORE_EXPORT QString string (ErrorScope errorScope, int errorCode)
 
static Q_CORE_EXPORT QString stdString (int errorCode=-1)
 

Public Attributes

int errorCode = 0
 
ErrorScope errorScope = NoError
 

Detailed Description

Definition at line 23 of file qsystemerror_p.h.

Member Enumeration Documentation

◆ ErrorScope

Enumerator
NoError 
StandardLibraryError 
NativeError 

Definition at line 26 of file qsystemerror_p.h.

Constructor & Destructor Documentation

◆ QSystemError() [1/2]

constexpr QSystemError::QSystemError ( int  error,
ErrorScope  scope 
)
inlineexplicitconstexpr

Definition at line 33 of file qsystemerror_p.h.

◆ QSystemError() [2/2]

constexpr QSystemError::QSystemError ( )
constexprdefault

Member Function Documentation

◆ error()

constexpr int QSystemError::error ( ) const
inlineconstexpr

Definition at line 41 of file qsystemerror_p.h.

References errorCode.

◆ scope()

constexpr ErrorScope QSystemError::scope ( ) const
inlineconstexpr

Definition at line 40 of file qsystemerror_p.h.

References errorScope.

◆ stdString()

QString QSystemError::stdString ( int  errorCode = -1)
static

Definition at line 126 of file qsystemerror.cpp.

References errorCode, and standardLibraryErrorString().

Referenced by QFSFileEnginePrivate::closeFdFh(), QFSFileEnginePrivate::flushFh(), QResourceFileEngine::open(), QFSFileEnginePrivate::openFd(), QFSFileEnginePrivate::openFh(), QFSFileEnginePrivate::readFdFh(), QFSFileEnginePrivate::readLineFdFh(), QFSFileEnginePrivate::seekFdFh(), and QFSFileEnginePrivate::writeFdFh().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ string()

QString QSystemError::string ( ErrorScope  errorScope,
int  errorCode 
)
static

Definition at line 109 of file qsystemerror.cpp.

References errorCode, errorScope, NativeError, NoError, Q_FALLTHROUGH, qWarning, StandardLibraryError, and standardLibraryErrorString().

+ Here is the call graph for this function:

◆ toString()

QString QSystemError::toString ( ) const
inline

Definition at line 39 of file qsystemerror_p.h.

References errorCode, and errorScope.

Referenced by QFile::rename().

+ Here is the caller graph for this function:

Member Data Documentation

◆ errorCode

int QSystemError::errorCode = 0

Definition at line 52 of file qsystemerror_p.h.

Referenced by error(), stdString(), string(), and toString().

◆ errorScope

ErrorScope QSystemError::errorScope = NoError

Definition at line 53 of file qsystemerror_p.h.

Referenced by scope(), string(), and toString().


The documentation for this class was generated from the following files: