Mercurial > hg > easyhg
comparison src/changesetdetailitem.cpp @ 671:ce29dc775650 qt5
Fix compiler warnings
author | Chris Cannam |
---|---|
date | Wed, 05 Dec 2018 09:43:26 +0000 |
parents | ae67ea0af696 |
children | c0b46d0514a7 751b21af6b6f |
comparison
equal
deleted
inserted
replaced
670:8f3075eeaac2 | 671:ce29dc775650 |
---|---|
63 return v; | 63 return v; |
64 } | 64 } |
65 | 65 |
66 void | 66 void |
67 ChangesetDetailItem::paint(QPainter *paint, | 67 ChangesetDetailItem::paint(QPainter *paint, |
68 const QStyleOptionGraphicsItem *option, | 68 const QStyleOptionGraphicsItem *, |
69 QWidget *w) | 69 QWidget *) |
70 { | 70 { |
71 paint->save(); | 71 paint->save(); |
72 | 72 |
73 ColourSet *colourSet = ColourSet::instance(); | 73 ColourSet *colourSet = ColourSet::instance(); |
74 QColor branchColour = colourSet->getColourFor(m_changeset->branch()); | 74 QColor branchColour = colourSet->getColourFor(m_changeset->branch()); |
75 QColor userColour = colourSet->getColourFor(m_changeset->author()); | |
76 | 75 |
77 QTransform t = paint->worldTransform(); | 76 QTransform t = paint->worldTransform(); |
78 float scale = std::min(t.m11(), t.m22()); | 77 float scale = std::min(t.m11(), t.m22()); |
79 | 78 |
80 if (scale < 0.1) { | 79 if (scale < 0.1) { |
103 pts.push_back(QPointF(0, height/3 + 5)); | 102 pts.push_back(QPointF(0, height/3 + 5)); |
104 pts.push_back(QPointF(-10, height/3)); | 103 pts.push_back(QPointF(-10, height/3)); |
105 pts.push_back(QPointF(0, height/3 - 5)); | 104 pts.push_back(QPointF(0, height/3 - 5)); |
106 paint->drawPolygon(QPolygonF(pts)); | 105 paint->drawPolygon(QPolygonF(pts)); |
107 | 106 |
108 /* | |
109 paint->setBrush(branchColour); | |
110 QVector<QPointF> pts; | |
111 pts.push_back(QPointF(width/2 - 5, 0)); | |
112 pts.push_back(QPointF(width/2 + 5, 0)); | |
113 pts.push_back(QPointF(width/2, -10)); | |
114 pts.push_back(QPointF(width/2 - 5, 0)); | |
115 paint->drawPolygon(QPolygonF(pts)); | |
116 */ | |
117 m_doc->drawContents(paint, r); | 107 m_doc->drawContents(paint, r); |
118 | 108 |
119 paint->restore(); | 109 paint->restore(); |
120 } | 110 } |
121 | 111 |