Qt 4.8
Public Types | Public Functions | Public Variables | List of all members
QSystemError Class Reference

#include <qsystemerror_p.h>

Public Types

enum  ErrorScope { NoError, StandardLibraryError, NativeError }
 

Public Functions

int error ()
 
 QSystemError (int error, ErrorScope scope)
 
 QSystemError ()
 
ErrorScope scope ()
 
QString toString ()
 

Public Variables

int errorCode
 
ErrorScope errorScope
 

Detailed Description

Definition at line 60 of file qsystemerror_p.h.

Enumerations

◆ ErrorScope

Enumerator
NoError 
StandardLibraryError 
NativeError 

Definition at line 63 of file qsystemerror_p.h.

Constructors and Destructors

◆ QSystemError() [1/2]

QSystemError::QSystemError ( int  error,
QSystemError::ErrorScope  scope 
)
inline

Definition at line 82 of file qsystemerror_p.h.

84 {
85 
86 }
ErrorScope scope()
ErrorScope errorScope

◆ QSystemError() [2/2]

QSystemError::QSystemError ( )
inline

Definition at line 88 of file qsystemerror_p.h.

90 {
91 
92 }
ErrorScope errorScope

Functions

◆ error()

int QSystemError::error ( )
inline

Definition at line 99 of file qsystemerror_p.h.

100 {
101  return errorCode;
102 }

◆ scope()

QSystemError::ErrorScope QSystemError::scope ( )
inline

Definition at line 94 of file qsystemerror_p.h.

95 {
96  return errorScope;
97 }
ErrorScope errorScope

◆ toString()

QString QSystemError::toString ( )

Definition at line 206 of file qsystemerror.cpp.

Referenced by QFSFileEngine::copy(), QFSFileEngine::link(), QFSFileEnginePrivate::longFileName(), QFSFileEnginePrivate::nativeSize(), QTemporaryFileEngine::open(), QFSFileEngine::remove(), QFSFileEngine::rename(), and QFSFileEngine::setPermissions().

207 {
208  switch(errorScope) {
209  case NativeError:
210 #if defined (Q_OS_WIN)
212 #elif defined (Q_OS_SYMBIAN)
213  return symbianErrorString(errorCode);
214 #else
215  //unix: fall through as native and standard library are the same
216 #endif
219  default:
220  qWarning("invalid error scope");
221  //fall through
222  case NoError:
223  return QLatin1String("No error");
224  }
225 }
static QString windowsErrorString(int errorCode)
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
static QString standardLibraryErrorString(int errorCode)
Q_CORE_EXPORT void qWarning(const char *,...)
ErrorScope errorScope

Properties

◆ errorCode

int QSystemError::errorCode

Definition at line 78 of file qsystemerror_p.h.

Referenced by error(), and toString().

◆ errorScope

ErrorScope QSystemError::errorScope

Definition at line 79 of file qsystemerror_p.h.

Referenced by scope(), and toString().


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