forked from qt-creator/qt-creator
Core: Add debug stream operator for Core::Id
Change-Id: Ieeb299709d9e18d1db0632b245b735fe07230a89 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -349,7 +349,6 @@ QString Id::suffixAfter(Id baseId) const
|
|||||||
|
|
||||||
} // namespace Core
|
} // namespace Core
|
||||||
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
QDataStream &operator<<(QDataStream &ds, Core::Id id)
|
QDataStream &operator<<(QDataStream &ds, Core::Id id)
|
||||||
@@ -365,4 +364,9 @@ QDataStream &operator>>(QDataStream &ds, Core::Id &id)
|
|||||||
return ds;
|
return ds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDebug operator<<(QDebug dbg, const Core::Id &id)
|
||||||
|
{
|
||||||
|
return dbg << id.name();
|
||||||
|
}
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@@ -92,6 +92,7 @@ Q_DECLARE_METATYPE(QList<Core::Id>)
|
|||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
QDataStream &operator<<(QDataStream &ds, Core::Id id);
|
QDataStream &operator<<(QDataStream &ds, Core::Id id);
|
||||||
QDataStream &operator>>(QDataStream &ds, Core::Id &id);
|
QDataStream &operator>>(QDataStream &ds, Core::Id &id);
|
||||||
|
CORE_EXPORT QDebug operator<<(QDebug dbg, const Core::Id &id);
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // CORE_ID_H
|
#endif // CORE_ID_H
|
||||||
|
Reference in New Issue
Block a user