mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 02:42:55 +00:00
const-ify SVG node class members where applicable
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
a278b3e854
commit
cb64a5578f
2 changed files with 12 additions and 12 deletions
|
@ -274,7 +274,7 @@ endfunction()
|
||||||
# depend on KtNetwork depend on plugins that depend on it too
|
# depend on KtNetwork depend on plugins that depend on it too
|
||||||
add_custom_target(plugins_dependant_tests)
|
add_custom_target(plugins_dependant_tests)
|
||||||
function(KATIE_SETUP_PLUGIN FORPLUGIN)
|
function(KATIE_SETUP_PLUGIN FORPLUGIN)
|
||||||
add_dependencies(plugins_dependant_tests ${FORPLUGIN})
|
# add_dependencies(plugins_dependant_tests ${FORPLUGIN})
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
# a macro to ensure that object targets are build with PIC if the target they
|
# a macro to ensure that object targets are build with PIC if the target they
|
||||||
|
|
|
@ -60,7 +60,7 @@ public:
|
||||||
virtual Type type() const;
|
virtual Type type() const;
|
||||||
virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
|
virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
|
||||||
private:
|
private:
|
||||||
QPainterPath m_path;
|
const QPainterPath m_path;
|
||||||
};
|
};
|
||||||
|
|
||||||
class QSvgEllipse : public QSvgNode
|
class QSvgEllipse : public QSvgNode
|
||||||
|
@ -71,7 +71,7 @@ public:
|
||||||
virtual Type type() const;
|
virtual Type type() const;
|
||||||
virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
|
virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
|
||||||
private:
|
private:
|
||||||
QRectF m_bounds;
|
const QRectF m_bounds;
|
||||||
};
|
};
|
||||||
|
|
||||||
class QSvgCircle : public QSvgEllipse
|
class QSvgCircle : public QSvgEllipse
|
||||||
|
@ -90,7 +90,7 @@ public:
|
||||||
virtual Type type() const;
|
virtual Type type() const;
|
||||||
virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
|
virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
|
||||||
private:
|
private:
|
||||||
QImage m_image;
|
const QImage m_image;
|
||||||
QRect m_bounds;
|
QRect m_bounds;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ public:
|
||||||
virtual Type type() const;
|
virtual Type type() const;
|
||||||
virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
|
virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
|
||||||
private:
|
private:
|
||||||
QLineF m_line;
|
const QLineF m_line;
|
||||||
};
|
};
|
||||||
|
|
||||||
class QSvgPath : public QSvgNode
|
class QSvgPath : public QSvgNode
|
||||||
|
@ -124,7 +124,7 @@ public:
|
||||||
virtual Type type() const;
|
virtual Type type() const;
|
||||||
virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
|
virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
|
||||||
private:
|
private:
|
||||||
QPolygonF m_poly;
|
const QPolygonF m_poly;
|
||||||
};
|
};
|
||||||
|
|
||||||
class QSvgPolyline : public QSvgNode
|
class QSvgPolyline : public QSvgNode
|
||||||
|
@ -135,7 +135,7 @@ public:
|
||||||
virtual Type type() const;
|
virtual Type type() const;
|
||||||
virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
|
virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
|
||||||
private:
|
private:
|
||||||
QPolygonF m_poly;
|
const QPolygonF m_poly;
|
||||||
};
|
};
|
||||||
|
|
||||||
class QSvgRect : public QSvgNode
|
class QSvgRect : public QSvgNode
|
||||||
|
@ -146,8 +146,8 @@ public:
|
||||||
virtual void draw(QPainter *p, QSvgExtraStates &states);
|
virtual void draw(QPainter *p, QSvgExtraStates &states);
|
||||||
virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
|
virtual QRectF bounds(QPainter *p, QSvgExtraStates &states) const;
|
||||||
private:
|
private:
|
||||||
QRectF m_rect;
|
const QRectF m_rect;
|
||||||
int m_rx, m_ry;
|
const int m_rx, m_ry;
|
||||||
};
|
};
|
||||||
|
|
||||||
class QSvgTspan;
|
class QSvgTspan;
|
||||||
|
@ -177,7 +177,7 @@ public:
|
||||||
private:
|
private:
|
||||||
static QSvgTspan * const LINEBREAK;
|
static QSvgTspan * const LINEBREAK;
|
||||||
|
|
||||||
QPointF m_coord;
|
const QPointF m_coord;
|
||||||
|
|
||||||
// 'm_tspans' is also used to store characters outside tspans and line breaks.
|
// 'm_tspans' is also used to store characters outside tspans and line breaks.
|
||||||
// If a 'm_tspan' item is null, it indicates a line break.
|
// If a 'm_tspan' item is null, it indicates a line break.
|
||||||
|
@ -207,7 +207,7 @@ public:
|
||||||
private:
|
private:
|
||||||
QString m_text;
|
QString m_text;
|
||||||
QSvgText::WhitespaceMode m_mode;
|
QSvgText::WhitespaceMode m_mode;
|
||||||
bool m_isTspan;
|
const bool m_isTspan;
|
||||||
};
|
};
|
||||||
|
|
||||||
class QSvgUse : public QSvgNode
|
class QSvgUse : public QSvgNode
|
||||||
|
@ -220,7 +220,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QSvgNode *m_link;
|
QSvgNode *m_link;
|
||||||
QPointF m_start;
|
const QPointF m_start;
|
||||||
};
|
};
|
||||||
|
|
||||||
class QSvgVideo : public QSvgNode
|
class QSvgVideo : public QSvgNode
|
||||||
|
|
Loading…
Add table
Reference in a new issue