32 #ifdef SIGNON_INTERNAL
39 #include <SignOn/libsignoncommon.h>
50 #ifdef SIGNON_INTERNAL
51 :
public QObject { Q_OBJECT
68 InternalCommunication = 3,
89 IdentityOperationCanceled,
97 MechanismNotAvailable,
106 OperationNotSupported,
122 MethodOrMechanismNotAllowed,
132 Error() : m_type((int)Unknown), m_message(QString()) { registerType(); }
140 #ifdef SIGNON_INTERNAL
143 m_type(src.type()), m_message(src.message()) {}
150 Error(
int type,
const QString &message = QString()):
151 m_type(type), m_message(message) { registerType(); }
158 { m_type = src.
type(); m_message = src.
message();
return *
this; }
178 void setMessage(
const QString &message) { m_message = message; }
183 int type()
const {
return m_type; }
191 inline void registerType();
202 void SignOn::Error::registerType() {
203 qRegisterMetaType<SignOn::Error>(
"SignOn::Error");
definition for Signon error handling.
Error(const Error &src)
Copy constructor.
Error(int type, const QString &message=QString())
For convenience constructor.
Error & operator=(const Error &src)
Assignment operator.
ErrorType
Error codes for all the Signon by default supported errors.
@ CredentialsNotAvailable
void setType(int type)
Sets the type of the error.
void setMessage(const QString &message)
Sets the error message.
virtual ~Error()
Destructor.