apply some code analyzer recommendations

This commit is contained in:
2024-11-20 20:02:09 +03:00
parent 1becca7519
commit 04b40d367c
9 changed files with 25 additions and 33 deletions

View File

@@ -5,23 +5,15 @@
// GraphicType
GraphicType::GraphicType(QString name_, QColor color, Qt::PenStyle style, double width, bool visible_) {
GraphicType::GraphicType(QString name_, QColor color, Qt::PenStyle style, double width, bool visible_): name(name_), visible(visible_) {
pen.setColor(color);
pen.setStyle(style);
lines = true;
points = false;
fill = false;
fill_color = Qt::yellow;
if (qRound(width) == width)
pen.setWidth(qRound(width));
else
pen.setWidthF(width);
pen.setWidth(1);
pen.setCosmetic(true);
max_x = 0.;
name = name_;
visible = visible_;
pointWidth = 2.;
}

View File

@@ -49,16 +49,16 @@ struct QAD_GRAPHIC_EXPORT GraphicType {
QVector<QPolygonF> _lod;
QVector<QPolygonF> _lod_pause;
QPen pen;
QColor fill_color;
bool lines;
bool points;
bool fill;
double pointWidth;
double max_x;
double max_x_pause;
QCheckBox * pb = nullptr;
QColor fill_color = Qt::yellow;
bool lines = true;
bool points = false;
bool fill = false;
double pointWidth = 2.;
double max_x = 0.;
double max_x_pause = 0.;
QCheckBox * pb = nullptr;
QIcon icon;
bool visible;
bool visible = true;
QRectF cvrect;
int last_lod = 0;
};