Skip to content
Permalink
Browse files

Fix misleading indentation warnings caused by messy qtermwidget code …

…formatting
  • Loading branch information
nyalldawson committed Nov 22, 2016
1 parent dc82ad4 commit ee80be4317f25bc997bad7bc5f5ecd36590fd949
Showing with 12 additions and 5 deletions.
  1. +12 −5 src/plugins/grass/qtermwidget/CharacterColor.h
@@ -256,16 +256,23 @@ inline bool operator != (const CharacterColor& a, const CharacterColor& b)
inline const QColor color256(quint8 u, const ColorEntry* base)
{
// 0.. 16: system colors
if (u < 8) return base[u+2 ].color; u -= 8;
if (u < 8) return base[u+2+BASE_COLORS].color; u -= 8;
if (u < 8)
return base[u+2].color;
u -= 8;
if (u < 8)
return base[u+2+BASE_COLORS].color;
u -= 8;

// 16..231: 6x6x6 rgb color cube
if (u < 216) return QColor(((u/36)%6) ? (40*((u/36)%6)+55) : 0,
if (u < 216)
return QColor(((u/36)%6) ? (40*((u/36)%6)+55) : 0,
((u/ 6)%6) ? (40*((u/ 6)%6)+55) : 0,
((u/ 1)%6) ? (40*((u/ 1)%6)+55) : 0); u -= 216;
((u/ 1)%6) ? (40*((u/ 1)%6)+55) : 0);
u -= 216;

// 232..255: gray, leaving out black and white
int gray = u*10+8; return QColor(gray,gray,gray);
int gray = u*10+8;
return QColor(gray,gray,gray);
}

inline QColor CharacterColor::color(const ColorEntry* base) const

0 comments on commit ee80be4

Please sign in to comment.
You can’t perform that action at this time.