QDebug operator<<(QDebug dbg, const QBrush &b)
{
#ifndef Q_BROKEN_DEBUG_STREAM
- static const char *BRUSH_STYLES[] = {
- "NoBrush",
- "SolidPattern",
- "Dense1Pattern",
- "Dense2Pattern",
- "Dense3Pattern",
- "Dense4Pattern",
- "Dense5Pattern",
- "Dense6Pattern",
- "Dense7Pattern",
- "HorPattern",
- "VerPattern",
- "CrossPattern",
- "BDiagPattern",
- "FDiagPattern",
- "DiagCrossPattern",
- "LinearGradientPattern",
- "RadialGradientPattern",
- "ConicalGradientPattern",
- "TexturePattern"
+ static const char *brushStylesTbl[] = {
+ "NoBrush",
+ "SolidPattern",
+ "Dense1Pattern",
+ "Dense2Pattern",
+ "Dense3Pattern",
+ "Dense4Pattern",
+ "Dense5Pattern",
+ "Dense6Pattern",
+ "Dense7Pattern",
+ "HorPattern",
+ "VerPattern",
+ "CrossPattern",
+ "BDiagPattern",
+ "FDiagPattern",
+ "DiagCrossPattern",
+ "LinearGradientPattern",
+ "RadialGradientPattern",
+ "ConicalGradientPattern",
+ "TexturePattern"
};
- dbg.nospace() << "QBrush(" << b.color() << ',' << BRUSH_STYLES[b.style()] << ')';
+ dbg.nospace() << "QBrush(" << b.color() << ',' << brushStylesTbl[b.style()] << ')';
return dbg.space();
#else
qWarning("This compiler doesn't support streaming QBrush to QDebug");