rebuildShape();
}
-void OnMonitorPathItem::rebuildShape() {
+void OnMonitorPathItem::rebuildShape()
+{
if (m_activePoint > m_points.count()) m_activePoint = -1;
QPainterPath p;
QPainterPath shape;
setPath(p);
}
-void OnMonitorPathItem::getMode(QPointF pos)
+void OnMonitorPathItem::getMode(const QPointF &pos)
{
double dist = 8;
if (getView()) {
if (m_view)
return true;
- if (scene() && scene()->views().count()) {
- m_view = scene()->views()[0];
+ if (scene() && !scene()->views().isEmpty()) {
+ m_view = scene()->views().first();
return true;
} else {
return false;