зеркало из https://github.com/mozilla/pjs.git
Bug 498873 - Remove use of unnecessary QPen pointer. r=pavlov
This commit is contained in:
Родитель
8ec3b542fd
Коммит
66e8ea2007
|
@ -1038,8 +1038,8 @@ struct PatternToBrushConverter {
|
|||
|
||||
struct PatternToPenConverter {
|
||||
PatternToPenConverter (const cairo_pattern_t *source,
|
||||
cairo_stroke_style_t *style)
|
||||
: mBrushConverter(source)
|
||||
cairo_stroke_style_t *style) :
|
||||
mBrushConverter(source)
|
||||
{
|
||||
Qt::PenJoinStyle join = Qt::MiterJoin;
|
||||
Qt::PenCapStyle cap = Qt::SquareCap;
|
||||
|
@ -1068,8 +1068,8 @@ struct PatternToPenConverter {
|
|||
break;
|
||||
}
|
||||
|
||||
mPen = new QPen (mBrushConverter, style->line_width, Qt::SolidLine, cap, join);
|
||||
mPen->setMiterLimit (style->miter_limit);
|
||||
mPen = QPen(mBrushConverter, style->line_width, Qt::SolidLine, cap, join);
|
||||
mPen.setMiterLimit (style->miter_limit);
|
||||
|
||||
if (style->dash && style->num_dashes) {
|
||||
Qt::PenStyle pstyle = Qt::NoPen;
|
||||
|
@ -1090,7 +1090,7 @@ struct PatternToPenConverter {
|
|||
}
|
||||
|
||||
if (pstyle != Qt::NoPen) {
|
||||
mPen->setStyle(pstyle);
|
||||
mPen.setStyle(pstyle);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1107,20 +1107,18 @@ struct PatternToPenConverter {
|
|||
}
|
||||
}
|
||||
|
||||
mPen->setDashPattern (dashes);
|
||||
mPen->setDashOffset (style->dash_offset / style->line_width);
|
||||
mPen.setDashPattern(dashes);
|
||||
mPen.setDashOffset(style->dash_offset / style->line_width);
|
||||
}
|
||||
}
|
||||
|
||||
~PatternToPenConverter() {
|
||||
delete mPen;
|
||||
}
|
||||
~PatternToPenConverter() { }
|
||||
|
||||
operator QPen& () {
|
||||
return *mPen;
|
||||
return mPen;
|
||||
}
|
||||
|
||||
QPen *mPen;
|
||||
QPen mPen;
|
||||
PatternToBrushConverter mBrushConverter;
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче