diff --git a/ApplicationCode/CommandFileInterface/Core/RicfMessages.cpp b/ApplicationCode/CommandFileInterface/Core/RicfMessages.cpp index 79581f1406..a3628113ba 100644 --- a/ApplicationCode/CommandFileInterface/Core/RicfMessages.cpp +++ b/ApplicationCode/CommandFileInterface/Core/RicfMessages.cpp @@ -25,7 +25,7 @@ //-------------------------------------------------------------------------------------------------- void RicfMessages::addWarning(const QString& message) { - m_messages.push_back(std::make_pair(WARNING, "Line " + QString::number(m_currentLineNumber) +": " + message)); + m_messages.push_back(std::make_pair(MESSAGE_WARNING, "Line " + QString::number(m_currentLineNumber) +": " + message)); } //-------------------------------------------------------------------------------------------------- @@ -33,7 +33,7 @@ void RicfMessages::addWarning(const QString& message) //-------------------------------------------------------------------------------------------------- void RicfMessages::addError(const QString& message) { - m_messages.push_back(std::make_pair(ERROR, "Line " + QString::number(m_currentLineNumber) +": " + message)); + m_messages.push_back(std::make_pair(MESSAGE_ERROR, "Line " + QString::number(m_currentLineNumber) +": " + message)); } //-------------------------------------------------------------------------------------------------- @@ -65,3 +65,17 @@ QChar RicfMessages::readCharWithLineNumberCount(QTextStream& inputStream) } return ch; } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QChar RicfMessages::peekNextChar(QTextStream& inputStream) +{ + QChar ch; + if (!inputStream.atEnd()) + { + inputStream >> ch; + inputStream.seek(inputStream.pos() - 1); + } + return ch; +} diff --git a/ApplicationCode/CommandFileInterface/Core/RicfMessages.h b/ApplicationCode/CommandFileInterface/Core/RicfMessages.h index c99e4219b3..00bb4a3190 100644 --- a/ApplicationCode/CommandFileInterface/Core/RicfMessages.h +++ b/ApplicationCode/CommandFileInterface/Core/RicfMessages.h @@ -29,8 +29,8 @@ public: enum MessageType { - WARNING, - ERROR + MESSAGE_WARNING, + MESSAGE_ERROR }; void addWarning(const QString& message); @@ -38,6 +38,7 @@ public: void skipWhiteSpaceWithLineNumberCount(QTextStream& inputStream); QChar readCharWithLineNumberCount(QTextStream& inputStream); + QChar peekNextChar(QTextStream& inputStream); QString currentCommand; QString currentArgument;