From 7f4f4cafea5a196ddf824adf7c4e65cec5d44d88 Mon Sep 17 00:00:00 2001 From: Tannin Date: Tue, 17 Nov 2015 18:58:00 +0100 Subject: first work on interfacing with usvfs --- src/logbuffer.cpp | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'src/logbuffer.cpp') diff --git a/src/logbuffer.cpp b/src/logbuffer.cpp index a07ae264..2c3fc101 100644 --- a/src/logbuffer.cpp +++ b/src/logbuffer.cpp @@ -124,8 +124,6 @@ char LogBuffer::msgTypeID(QtMsgType type) } } -#if QT_VERSION >= QT_VERSION_CHECK(5,0,0) - void LogBuffer::log(QtMsgType type, const QMessageLogContext &context, const QString &message) { // QMutexLocker doesn't support timeout... @@ -141,6 +139,7 @@ void LogBuffer::log(QtMsgType type, const QMessageLogContext &context, const QSt s_Instance->logMessage(type, message); } // fprintf(stdout, "(%s:%u) %s\n", context.file, context.line, qPrintable(message)); + if (type == QtDebugMsg) { fprintf(stdout, "%s [%c] %s\n", qPrintable(QTime::currentTime().toString()), msgTypeID(type), qPrintable(message)); } else { @@ -154,21 +153,6 @@ void LogBuffer::log(QtMsgType type, const QMessageLogContext &context, const QSt fflush(stdout); } -#else - -void LogBuffer::log(QtMsgType type, const char *message) -{ - QMutexLocker guard(&s_Mutex); - if (!s_Instance.isNull()) { - s_Instance->logMessage(type, message); - } - fprintf(stdout, "%s [%c] %s\n", qPrintable(QTime::currentTime().toString()), msgTypeID(type), message); - fflush(stdout); -} - -#endif - - QModelIndex LogBuffer::index(int row, int column, const QModelIndex&) const { return createIndex(row, column, row); @@ -269,8 +253,6 @@ void log(const char *format, ...) va_end(argList); } - - QString LogBuffer::Message::toString() const { return QString("%1 [%2] %3").arg(time.toString()).arg(msgTypeID(type)).arg(message); -- cgit v1.3.1