QtBase  v6.3.1
Public Types | Public Member Functions | List of all members
QPropertyBindingError Class Reference

#include <qproperty.h>

Public Types

enum  Type { NoError , BindingLoop , EvaluationError , UnknownError }
 

Public Member Functions

 QPropertyBindingError ()
 
 QPropertyBindingError (Type type, const QString &description=QString())
 
 QPropertyBindingError (const QPropertyBindingError &other)
 
QPropertyBindingErroroperator= (const QPropertyBindingError &other)
 
 QPropertyBindingError (QPropertyBindingError &&other)
 
QPropertyBindingErroroperator= (QPropertyBindingError &&other)
 
 ~QPropertyBindingError ()
 
bool hasError () const
 
Type type () const
 
QString description () const
 

Detailed Description

\inmodule QtCore

Since
6.0

QPropertyBindingError is used by \l{The Property System}{the property system} to report errors that occurred when a binding was evaluated. Use \l type() to query which error occurred, and \l description() to extract an error message which might contain more details. If there is no error, QPropertyBindingError has type QPropertyBindingError::NoError and hasError() returns false.

extern QProperty<int> prop;
if (error.hasError())
qDebug() << error.description();
FT_Error error
Definition: cffdrivr.c:657
QPropertyBinding< T > binding() const
Definition: qproperty.h:471
#define qDebug
[1]
Definition: qlogging.h:177

Definition at line 140 of file qproperty.h.

Member Enumeration Documentation

◆ Type

This enum specifies which error occurred.

\value NoError No error occurred while evaluating the binding. \value BindingLoop Binding evaluation was stopped because a property depended on its own value. \value EvaluationError Binding evaluation was stopped for any other reason than a binding loop. For example, this value is used in the QML engine when an exception occurs while a binding is evaluated. \value UnknownError A generic error type used when neither of the other values is suitable. Calling \l description() might provide details.

Enumerator
NoError 
BindingLoop 
EvaluationError 
UnknownError 

Definition at line 143 of file qproperty.h.

Constructor & Destructor Documentation

◆ QPropertyBindingError() [1/4]

QPropertyBindingError::QPropertyBindingError ( )

Default constructs QPropertyBindingError. hasError() will return false, type will return NoError and \l description() will return an empty string.

Definition at line 818 of file qproperty.cpp.

◆ QPropertyBindingError() [2/4]

QPropertyBindingError::QPropertyBindingError ( Type  type,
const QString description = QString() 
)

Constructs a QPropertyBindingError of type type with description as its description.

Definition at line 826 of file qproperty.cpp.

◆ QPropertyBindingError() [3/4]

QPropertyBindingError::QPropertyBindingError ( const QPropertyBindingError other)

Copy-constructs QPropertyBindingError from other.

Definition at line 838 of file qproperty.cpp.

◆ QPropertyBindingError() [4/4]

QPropertyBindingError::QPropertyBindingError ( QPropertyBindingError &&  other)

Move-constructs QPropertyBindingError from other. other will be left in its default state.

Definition at line 856 of file qproperty.cpp.

◆ ~QPropertyBindingError()

QPropertyBindingError::~QPropertyBindingError ( )

Destroys the QPropertyBindingError.

Definition at line 874 of file qproperty.cpp.

Member Function Documentation

◆ description()

QString QPropertyBindingError::description ( ) const

Returns a descriptive error message for the QPropertyBindingError if it has been set.

Definition at line 894 of file qproperty.cpp.

◆ hasError()

bool QPropertyBindingError::hasError ( ) const
inline

Definition at line 159 of file qproperty.h.

◆ operator=() [1/2]

QPropertyBindingError & QPropertyBindingError::operator= ( const QPropertyBindingError other)

Copies other to this QPropertyBindingError.

Definition at line 846 of file qproperty.cpp.

Here is the call graph for this function:

◆ operator=() [2/2]

QPropertyBindingError & QPropertyBindingError::operator= ( QPropertyBindingError &&  other)

Move-assigns other to this QPropertyBindingError. other will be left in its default state.

Definition at line 865 of file qproperty.cpp.

Here is the call graph for this function:

◆ type()

QPropertyBindingError::Type QPropertyBindingError::type ( ) const

Returns the type of the QPropertyBindingError.

See also
QPropertyBindingError::Type

Definition at line 883 of file qproperty.cpp.


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