From 1708311fd8c04fbce049c0634b33465603250264 Mon Sep 17 00:00:00 2001 From: Alexandre Quessy Date: Tue, 26 Jan 2016 23:54:47 -0500 Subject: [PATCH] Add a macro to check for Qt >= 5.4 --- ConsoleWindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ConsoleWindow.cpp b/ConsoleWindow.cpp index 7929862..8a73026 100644 --- a/ConsoleWindow.cpp +++ b/ConsoleWindow.cpp @@ -32,9 +32,11 @@ ConsoleWindow::ConsoleWindow(QWidget *parent) : QMainWindow(parent) // Make read-only but allow copy of text _console->setReadOnly(true); // Create and customize font +#if QT_VERSION >= 0x050400 QFont font(QFont(":/base-font", 10, QFont::Medium)); font.setStyleHint(QFont::Monospace, QFont::PreferAntialias); _console->setFont(font); +#endif // Set color scheme QPalette scheme = palette(); scheme.setColor(QPalette::Base, Qt::black); @@ -91,9 +93,11 @@ void ConsoleWindow::messageLog(QtMsgType type, const QMessageLogContext &context case QtDebugMsg: output = time + " | Debug: " + QString(message.constData()) + " - " + contexts; break; +#if QT_VERSION >= 0x050400 case QtInfoMsg: output = time + " | Info: " + QString(message.constData()) + " - " + contexts; break; +#endif case QtWarningMsg: output = time + " | Warning: " + QString(message.constData()) + " - " + contexts; break;