Explorar o código

添加遗漏文件

lichanglin %!s(int64=3) %!d(string=hai) anos
pai
achega
1ddebfaa85
Modificáronse 3 ficheiros con 37 adicións e 0 borrados
  1. 11 0
      include/DebugUtil.h
  2. 23 0
      include/MessageException.h
  3. 3 0
      include/charcode.h

+ 11 - 0
include/DebugUtil.h

@@ -0,0 +1,11 @@
+#ifndef DEBUGUTIL_H
+#define DEBUGUTIL_H
+#include <QDebug>
+
+#ifndef NODEBUG
+    #define Debug(x) qDebug() << #x << ":" << (x);
+#else
+    #define Debug(x)
+#endif // DEBUG
+
+#endif // DEBUGUTIL_H

+ 23 - 0
include/MessageException.h

@@ -0,0 +1,23 @@
+#ifndef MESSAGEEXCEPTION_H
+#define MESSAGEEXCEPTION_H
+
+#include <exception>
+#include <QString>
+
+class MessageException : public std::exception
+{
+public:
+    MessageException(const QString &msg):message(msg){};
+    ~MessageException() throw() {};
+
+    virtual const char* what() const throw () {
+        return "MessageException";
+    }
+
+    QString getMessage() const {return message;};
+
+private:
+    QString message;
+};
+
+#endif // MESSAGEEXCEPTION_H

+ 3 - 0
include/charcode.h

@@ -0,0 +1,3 @@
+#if _MSC_VER >= 1600
+#pragma execution_character_set("utf-8")
+#endif