forked from qt-creator/qt-creator
Enhance logging capabilities for wizard classes
* Added QDebug operator<< for the Field classes so that they could be inspected during runtime (i.e. logged) * Added optional QDebug operator<< overloads for QVariant (wizarddebug.h) - to better visualize the data parsed from the wizard.json files (QVariant objects), by using a format more in the like of json. Change-Id: I53a729b24e4f2d9c9acf1ed802ac9dc3bb67f373 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -64,6 +64,21 @@ public:
|
||||
GeneratedFile::Attributes attributes;
|
||||
};
|
||||
|
||||
inline QDebug &operator<<(QDebug &debug, const Core::GeneratedFilePrivate &file)
|
||||
{
|
||||
debug << "path: " << file.path
|
||||
<< "; editorId: " << file.editorId.toString()
|
||||
<< "; binary: " << file.binary
|
||||
<< "; contents: " << file.contents.size();
|
||||
return debug;
|
||||
}
|
||||
|
||||
QDebug &operator<<(QDebug &debug, const Core::GeneratedFile &file)
|
||||
{
|
||||
debug << "GeneratedFile{_: " << *file.m_d << "}";
|
||||
return debug;
|
||||
}
|
||||
|
||||
GeneratedFilePrivate::GeneratedFilePrivate(const QString &path) : // FIXME Don't use - Remove when possible
|
||||
path(FilePath::fromString(path).cleanPath()),
|
||||
attributes({})
|
||||
|
||||
Reference in New Issue
Block a user