chore: change Dexpected to DExpected

Derror和Dunexpected同理

Log: Dexpected改名为DExpected
This commit is contained in:
heyuming 2022-10-20 15:13:57 +08:00 committed by groveer
parent d7cd2fd226
commit 01fc362af0
2 changed files with 226 additions and 226 deletions

View File

@ -12,14 +12,14 @@ DCORE_BEGIN_NAMESPACE
/**
* @brief
*/
class Derror
class DError
{
public:
/*!
* @brief
* @attention -1
*/
Derror() noexcept
DError() noexcept
: m_code(-1)
, m_msg()
{
@ -28,7 +28,7 @@ public:
/*!
* @brief
*/
Derror(const Derror &e) noexcept
DError(const DError &e) noexcept
: m_code(e.m_code)
, m_msg(e.m_msg)
{
@ -38,7 +38,7 @@ public:
* @brief
* @attention
*/
Derror(Derror &&e) noexcept
DError(DError &&e) noexcept
: m_code(e.m_code)
, m_msg(std::move(e).m_msg)
{
@ -49,7 +49,7 @@ public:
* @param[in] code
* @param[in] msg
*/
Derror(qint64 code, const QString &msg) noexcept
DError(qint64 code, const QString &msg) noexcept
: m_code(code)
, m_msg(msg)
{
@ -61,7 +61,7 @@ public:
* @param[in] msg
* @attention 使
*/
Derror(qint64 code, QString &&msg) noexcept
DError(qint64 code, QString &&msg) noexcept
: m_code(code)
, m_msg(std::move(msg))
{
@ -70,7 +70,7 @@ public:
/*!
* @brief
*/
Derror &operator=(const Derror &e)
DError &operator=(const DError &e)
{
m_code = e.m_code;
m_msg = e.m_msg;
@ -81,7 +81,7 @@ public:
* @brief
* @attention
*/
Derror &operator=(Derror &&e)
DError &operator=(DError &&e)
{
m_code = e.m_code;
m_msg = std::move(e).m_msg;
@ -91,7 +91,7 @@ public:
/*!
* @brief
*/
~Derror() = default;
~DError() = default;
/*!
* @brief
@ -127,17 +127,17 @@ public:
/*!
* @brief
*/
friend bool operator==(const Derror &x, const Derror &y) noexcept { return x.m_code == y.m_code and x.m_msg == y.m_msg; }
friend bool operator==(const DError &x, const DError &y) noexcept { return x.m_code == y.m_code and x.m_msg == y.m_msg; }
/*!
* @brief
*/
friend bool operator!=(const Derror &x, const Derror &y) noexcept { return !(x == y); }
friend bool operator!=(const DError &x, const DError &y) noexcept { return !(x == y); }
/*!
* @brief
*/
friend QDebug operator<<(QDebug debug, const Derror &e)
friend QDebug operator<<(QDebug debug, const DError &e)
{
debug << "Error Code:" << e.m_code << "Message:" << e.m_msg;
return debug;

File diff suppressed because it is too large Load Diff