fix build on windows, duplicated constant names...

This commit is contained in:
lasconic 2017-11-15 18:22:16 +01:00
parent eab64f8cb6
commit d628176897
3 changed files with 13 additions and 13 deletions

View file

@ -39,8 +39,8 @@ Score::FileError importMusicXMLfromBuffer(Score* score, const QString& /*name*/,
// score, qPrintable(name), dev);
MxmlLogger logger;
logger.setLoggingLevel(MxmlLogger::Level::INFO);
//logger.setLoggingLevel(MxmlLogger::Level::TRACE); // also include tracing
logger.setLoggingLevel(MxmlLogger::Level::MXML_INFO);
//logger.setLoggingLevel(MxmlLogger::Level::MXML_TRACE); // also include tracing
// pass 1
dev->seek(0);

View file

@ -36,9 +36,9 @@ static void log(MxmlLogger::Level level, const QString& text, const QXmlStreamRe
{
QString str;
switch (level) {
case MxmlLogger::Level::TRACE: str = "Trace"; break;
case MxmlLogger::Level::INFO: str = "Info"; break;
case MxmlLogger::Level::ERROR: str = "Error"; break;
case MxmlLogger::Level::MXML_TRACE: str = "Trace"; break;
case MxmlLogger::Level::MXML_INFO: str = "Info"; break;
case MxmlLogger::Level::MXML_ERROR: str = "Error"; break;
default: str = "Unknown"; break;
}
@ -59,8 +59,8 @@ static void log(MxmlLogger::Level level, const QString& text, const QXmlStreamRe
void MxmlLogger::logDebugTrace(const QString& trace, const QXmlStreamReader* const xmlreader)
{
if (_level <= Level::TRACE) {
log(Level::TRACE, trace, xmlreader);
if (_level <= Level::MXML_TRACE) {
log(Level::MXML_TRACE, trace, xmlreader);
}
}
@ -74,8 +74,8 @@ void MxmlLogger::logDebugTrace(const QString& trace, const QXmlStreamReader* con
void MxmlLogger::logDebugInfo(const QString& info, const QXmlStreamReader* const xmlreader)
{
if (_level <= Level::INFO) {
log(Level::INFO, info, xmlreader);
if (_level <= Level::MXML_INFO) {
log(Level::MXML_INFO, info, xmlreader);
}
}
@ -89,8 +89,8 @@ void MxmlLogger::logDebugInfo(const QString& info, const QXmlStreamReader* const
void MxmlLogger::logError(const QString& error, const QXmlStreamReader* const xmlreader)
{
if (_level <= Level::ERROR) {
log(Level::ERROR, error, xmlreader);
if (_level <= Level::MXML_ERROR) {
log(Level::MXML_ERROR, error, xmlreader);
}
}

View file

@ -20,7 +20,7 @@ namespace Ms {
class MxmlLogger {
public:
enum class Level : char {
TRACE, INFO, ERROR
MXML_TRACE, MXML_INFO, MXML_ERROR
};
MxmlLogger() {}
void logDebugTrace(const QString& trace, const QXmlStreamReader* const xmlreader = 0);
@ -28,7 +28,7 @@ public:
void logError(const QString& error, const QXmlStreamReader* const xmlreader = 0);
void setLoggingLevel(const Level level) { _level = level; }
private:
Level _level = Level::INFO;
Level _level = Level::MXML_INFO;
};
} // namespace Ms