feat: add debug printing for Version
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:

committed by
Edgars Cīrulis

parent
730f714e97
commit
9934537e19
@ -1,5 +1,6 @@
|
||||
#include "Version.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QUrl>
|
||||
#include <QRegularExpression>
|
||||
#include <QRegularExpressionMatch>
|
||||
@ -93,3 +94,20 @@ void Version::parse()
|
||||
m_sections.append(Section(currentSection));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// qDebug print support for the BlockedMod struct
|
||||
QDebug operator<<(QDebug debug, const Version& v)
|
||||
{
|
||||
QDebugStateSaver saver(debug);
|
||||
|
||||
debug.nospace() << "Version{ string: " << v.toString() << ", sections: [ ";
|
||||
|
||||
for (auto s : v.m_sections) {
|
||||
debug.nospace() << s.m_fullString << ", ";
|
||||
}
|
||||
|
||||
debug.nospace() << " ]" << " }";
|
||||
|
||||
return debug;
|
||||
}
|
Reference in New Issue
Block a user