X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=core%2Fquassel.h;h=a054e0881b9419d58d2bfcf5fb85f33adbcb7606;hp=0c2a11b53ce3e83e811fef01ff5f71a5850db7ae;hb=33c58d75d27a8f72492cb71adbc43bf75281718c;hpb=294db46231ea91d70fff258b884fb9c5d8c806bf diff --git a/core/quassel.h b/core/quassel.h index 0c2a11b5..a054e088 100644 --- a/core/quassel.h +++ b/core/quassel.h @@ -22,32 +22,44 @@ #define _QUASSEL_H_ class Logger; -class QIcon; -class QString; #include +#include /** * A static class containing global data. + * This is used in both core and GUI modules. Where appropriate, accessors are thread-safe + * to account for that fact. */ class Quassel { + Q_OBJECT public: static void init(); static Logger *getLogger(); static void setLogger(Logger *); - static QIcon *getIcon(QString symbol); +// static QIcon *getIcon(QString symbol); private: static void initIconMap(); static Logger *logger; - static QString iconPath; +// static QString iconPath; static QHash iconMap; }; +class Exception { + public: + Exception(QString msg = "Unknown Exception") : _msg(msg) {}; + virtual inline QString msg() { return _msg; } + + protected: + QString _msg; + +}; + #endif