summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpen.cpp
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2020-07-06 11:55:39 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2020-07-07 20:35:05 +0200
commit471e4fcb226c4523efe93b1bdaf0db026495da94 (patch)
treebb963937b2446eb32d7632568433083a386f2c68 /src/gui/painting/qpen.cpp
parent7f400522c39f6a1abf083dc1af49ea3109635cc8 (diff)
Use QList instead of QVector in gui implementation
Task-number: QTBUG-84469 Change-Id: I366e845249203d80d640355a7780ac2f91a762f1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/gui/painting/qpen.cpp')
-rw-r--r--src/gui/painting/qpen.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/painting/qpen.cpp b/src/gui/painting/qpen.cpp
index 01e581d2ed..5790b74497 100644
--- a/src/gui/painting/qpen.cpp
+++ b/src/gui/painting/qpen.cpp
@@ -129,7 +129,7 @@ typedef QPenPrivate QPenData;
Since Qt 4.1 it is also possible to specify a custom dash pattern
using the setDashPattern() function which implicitly converts the
style of the pen to Qt::CustomDashLine. The pattern argument, a
- QVector, must be specified as an even number of \l qreal entries
+ QList, must be specified as an even number of \l qreal entries
where the entries 1, 3, 5... are the dashes and 2, 4, 6... are the
spaces. For example, the custom pattern shown above is created
using the following code:
@@ -453,11 +453,11 @@ void QPen::setStyle(Qt::PenStyle s)
\sa style(), isSolid()
*/
-QVector<qreal> QPen::dashPattern() const
+QList<qreal> QPen::dashPattern() const
{
QPenData *dd = static_cast<QPenData *>(d);
if (d->style == Qt::SolidLine || d->style == Qt::NoPen) {
- return QVector<qreal>();
+ return QList<qreal>();
} else if (dd->dashPattern.isEmpty()) {
const qreal space = 2;
const qreal dot = 1;
@@ -517,7 +517,7 @@ QVector<qreal> QPen::dashPattern() const
\sa setStyle(), dashPattern(), setCapStyle(), setCosmetic()
*/
-void QPen::setDashPattern(const QVector<qreal> &pattern)
+void QPen::setDashPattern(const QList<qreal> &pattern)
{
if (pattern.isEmpty())
return;
@@ -928,7 +928,7 @@ QDataStream &operator<<(QDataStream &s, const QPen &p)
// ensure that we write doubles here instead of streaming the pattern
// directly; otherwise, platforms that redefine qreal might generate
// data that cannot be read on other platforms.
- QVector<qreal> pattern = p.dashPattern();
+ QList<qreal> pattern = p.dashPattern();
s << quint32(pattern.size());
for (int i = 0; i < pattern.size(); ++i)
s << double(pattern.at(i));
@@ -959,7 +959,7 @@ QDataStream &operator>>(QDataStream &s, QPen &p)
QColor color;
QBrush brush;
double miterLimit = 2;
- QVector<qreal> dashPattern;
+ QList<qreal> dashPattern;
double dashOffset = 0;
bool cosmetic = false;
bool defaultWidth = false;