QWindowsXPStyle: Add debug operators for the theme data
This helps to debug style issues. Change-Id: If2c236d6666512bf1658d951f9b304ce4d129357 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
parent
84f006b671
commit
bf15e22cee
@ -3963,6 +3963,40 @@ QWindowsXPStyle::QWindowsXPStyle(QWindowsXPStylePrivate &dd) : QWindowsStyle(dd)
|
||||
{
|
||||
}
|
||||
|
||||
#ifndef QT_NO_DEBUG_STREAM
|
||||
QDebug operator<<(QDebug d, const XPThemeData &t)
|
||||
{
|
||||
QDebugStateSaver saver(d);
|
||||
d.nospace();
|
||||
d << "XPThemeData(" << t.widget << ", theme=#" << t.theme << ", " << t.htheme
|
||||
<< ", partId=" << t.partId << ", stateId=" << t.stateId << ", rect=" << t.rect
|
||||
<< ", mirrorHorizontally=" << t.mirrorHorizontally << ", mirrorVertically="
|
||||
<< t.mirrorVertically << ", noBorder=" << t.noBorder << ", noContent=" << t.noContent
|
||||
<< ", rotate=" << t.rotate << ')';
|
||||
return d;
|
||||
}
|
||||
|
||||
QDebug operator<<(QDebug d, const ThemeMapKey &k)
|
||||
{
|
||||
QDebugStateSaver saver(d);
|
||||
d.nospace();
|
||||
d << "ThemeMapKey(theme=#" << k.theme
|
||||
<< ", partId=" << k.partId << ", stateId=" << k.stateId
|
||||
<< ", noBorder=" << k.noBorder << ", noContent=" << k.noContent << ')';
|
||||
return d;
|
||||
}
|
||||
|
||||
QDebug operator<<(QDebug d, const ThemeMapData &td)
|
||||
{
|
||||
QDebugStateSaver saver(d);
|
||||
d.nospace();
|
||||
d << "ThemeMapData(alphaType=" << td.alphaType
|
||||
<< ", dataValid=" << td.dataValid << ", partIsTransparent=" << td.partIsTransparent
|
||||
<< ", hasAlphaChannel=" << td.hasAlphaChannel << ", wasAlphaSwapped=" << td.wasAlphaSwapped
|
||||
<< ", hadInvalidAlpha=" << td.hadInvalidAlpha << ')';
|
||||
return d;
|
||||
}
|
||||
#endif // QT_NO_DEBUG_STREAM
|
||||
|
||||
// Debugging code ---------------------------------------------------------------------[ START ]---
|
||||
// The code for this point on is not compiled by default, but only used as assisting
|
||||
|
@ -64,6 +64,8 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QDebug;
|
||||
|
||||
// TMT_TEXTSHADOWCOLOR is wrongly defined in mingw
|
||||
#if TMT_TEXTSHADOWCOLOR != 3818
|
||||
#undef TMT_TEXTSHADOWCOLOR
|
||||
@ -181,6 +183,12 @@ struct ThemeMapData {
|
||||
hasAlphaChannel(false), wasAlphaSwapped(false), hadInvalidAlpha(false) {}
|
||||
};
|
||||
|
||||
#ifndef QT_NO_DEBUG_STREAM
|
||||
QDebug operator<<(QDebug d, const XPThemeData &t);
|
||||
QDebug operator<<(QDebug d, const ThemeMapKey &k);
|
||||
QDebug operator<<(QDebug d, const ThemeMapData &td);
|
||||
#endif
|
||||
|
||||
class QWindowsXPStylePrivate : public QWindowsStylePrivate
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QWindowsXPStyle)
|
||||
|
Loading…
Reference in New Issue
Block a user