From ea6292168a6acd4c263913f0ccd7dd64daf4f5cf Mon Sep 17 00:00:00 2001 From: Sandro Jäckel Date: Fri, 23 Feb 2018 01:45:58 +0100 Subject: Revert "Applied clang-format on source" This reverts commit 5e5c9c07291f6b09623d31c92b1fb61c4ede576e. --- src/logbuffer.h | 78 +++++++++++++++++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 35 deletions(-) (limited to 'src/logbuffer.h') diff --git a/src/logbuffer.h b/src/logbuffer.h index 0a35e91a..0cfecfa2 100644 --- a/src/logbuffer.h +++ b/src/logbuffer.h @@ -20,68 +20,76 @@ along with Mod Organizer. If not, see . #ifndef LOGBUFFER_H #define LOGBUFFER_H -#include #include +#include #include #include #include #include -class LogBuffer : public QAbstractItemModel { - Q_OBJECT + +class LogBuffer : public QAbstractItemModel +{ + Q_OBJECT public: - static void init(int messageCount, QtMsgType minMsgType, const QString& outputFileName); - static void log(QtMsgType type, const QMessageLogContext& context, const QString& message); - static void writeNow(); - static void cleanQuit(); + static void init(int messageCount, QtMsgType minMsgType, const QString &outputFileName); + static void log(QtMsgType type, const QMessageLogContext &context, const QString &message); - static LogBuffer* instance() { return s_Instance.data(); } + static void writeNow(); + static void cleanQuit(); + + static LogBuffer *instance() { return s_Instance.data(); } public: - virtual ~LogBuffer(); - void logMessage(QtMsgType type, const QString& message); + virtual ~LogBuffer(); + + void logMessage(QtMsgType type, const QString &message); - // QAbstractItemModel interface + // QAbstractItemModel interface public: - QModelIndex index(int row, int column, const QModelIndex& parent) const; - QModelIndex parent(const QModelIndex& child) const; - int rowCount(const QModelIndex& parent) const; - int columnCount(const QModelIndex& parent) const; - QVariant data(const QModelIndex& index, int role) const; + QModelIndex index(int row, int column, const QModelIndex &parent) const; + QModelIndex parent(const QModelIndex &child) const; + int rowCount(const QModelIndex &parent) const; + int columnCount(const QModelIndex &parent) const; + QVariant data(const QModelIndex &index, int role) const; signals: public slots: private: - explicit LogBuffer(int messageCount, QtMsgType minMsgType, const QString& outputFileName); - LogBuffer(const LogBuffer& reference); // not implemented - LogBuffer& operator=(const LogBuffer& reference); // not implemented - void write() const; + explicit LogBuffer(int messageCount, QtMsgType minMsgType, const QString &outputFileName); + LogBuffer(const LogBuffer &reference); // not implemented + LogBuffer &operator=(const LogBuffer &reference); // not implemented - static char msgTypeID(QtMsgType type); + void write() const; + + static char msgTypeID(QtMsgType type); private: - struct Message { - QtMsgType type; - QTime time; - QString message; - QString toString() const; - }; + + struct Message { + QtMsgType type; + QTime time; + QString message; + QString toString() const; + }; private: - static QScopedPointer s_Instance; - static QMutex s_Mutex; - - QString m_OutFileName; - bool m_ShutDown; - QtMsgType m_MinMsgType; - size_t m_NumMessages; - std::vector m_Messages; + + static QScopedPointer s_Instance; + static QMutex s_Mutex; + + QString m_OutFileName; + bool m_ShutDown; + QtMsgType m_MinMsgType; + size_t m_NumMessages; + std::vector m_Messages; + }; #endif // LOGBUFFER_H -- cgit v1.3.1