summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/painting/qpainter.cpp6
-rw-r--r--src/gui/painting/qpainterpath.cpp6
-rw-r--r--src/gui/painting/qpdf.cpp2
-rw-r--r--src/gui/text/qtextdocument.cpp6
-rw-r--r--src/gui/text/qtextdocumentfragment.cpp6
-rw-r--r--src/widgets/widgets/qtabbar.cpp1
6 files changed, 14 insertions, 13 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 570f750645..95e6bda78b 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -4219,7 +4219,7 @@ void QPainter::drawRoundRect(const QRectF &r, int xRnd, int yRnd)
*/
void QPainter::drawRoundRect(const QRect &rect, int xRnd, int yRnd)
{
- drawRoundRect(QRectF(rect), xRnd, yRnd);
+ drawRoundedRect(QRectF(rect), xRnd, yRnd, Qt::RelativeSize);
}
/*!
@@ -4233,7 +4233,7 @@ void QPainter::drawRoundRect(const QRect &rect, int xRnd, int yRnd)
*/
void QPainter::drawRoundRect(int x, int y, int w, int h, int xRnd, int yRnd)
{
- drawRoundRect(QRectF(x, y, w, h), xRnd, yRnd);
+ drawRoundedRect(QRectF(x, y, w, h), xRnd, yRnd, Qt::RelativeSize);
}
#endif
@@ -8349,7 +8349,7 @@ void QPainter::resetTransform()
d->state->ww = d->state->vw = d->device->metric(QPaintDevice::PdmWidth);
d->state->wh = d->state->vh = d->device->metric(QPaintDevice::PdmHeight);
d->state->worldMatrix = QTransform();
- setMatrixEnabled(false);
+ setWorldMatrixEnabled(false);
setViewTransformEnabled(false);
if (d->extended)
d->extended->transformChanged();
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index cb8bb9dfcf..42f94d038f 100644
--- a/src/gui/painting/qpainterpath.cpp
+++ b/src/gui/painting/qpainterpath.cpp
@@ -3318,7 +3318,7 @@ void QPainterPath::addRoundRect(const QRectF &rect,
xRnd = int(roundness * rect.height()/rect.width());
else
yRnd = int(roundness * rect.width()/rect.height());
- addRoundRect(rect, xRnd, yRnd);
+ addRoundedRect(rect, xRnd, yRnd, Qt::RelativeSize);
}
/*!
@@ -3339,7 +3339,7 @@ void QPainterPath::addRoundRect(const QRectF &rect,
void QPainterPath::addRoundRect(qreal x, qreal y, qreal w, qreal h,
int xRnd, int yRnd)
{
- addRoundRect(QRectF(x, y, w, h), xRnd, yRnd);
+ addRoundedRect(QRectF(x, y, w, h), xRnd, yRnd, Qt::RelativeSize);
}
/*!
@@ -3363,7 +3363,7 @@ void QPainterPath::addRoundRect(qreal x, qreal y, qreal w, qreal h,
void QPainterPath::addRoundRect(qreal x, qreal y, qreal w, qreal h,
int roundness)
{
- addRoundRect(QRectF(x, y, w, h), roundness);
+ addRoundedRect(QRectF(x, y, w, h), roundness, Qt::RelativeSize);
}
#endif
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index b23cc903b1..6bdc82a8e9 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -1542,7 +1542,7 @@ bool QPdfEngine::end()
Q_D(QPdfEngine);
d->writeTail();
- d->stream->unsetDevice();
+ d->stream->setDevice(nullptr);
qDeleteAll(d->fonts);
d->fonts.clear();
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index 4f187c6701..fd3473b32e 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -2663,10 +2663,10 @@ void QTextHtmlExporter::emitFragment(const QTextFragment &fragment)
bool closeAnchor = false;
if (format.isAnchor()) {
- const QString name = format.anchorName();
- if (!name.isEmpty()) {
+ const auto names = format.anchorNames();
+ if (!names.isEmpty()) {
html += QLatin1String("<a name=\"");
- html += name.toHtmlEscaped();
+ html += names.constFirst().toHtmlEscaped();
html += QLatin1String("\"></a>");
}
const QString href = format.anchorHref();
diff --git a/src/gui/text/qtextdocumentfragment.cpp b/src/gui/text/qtextdocumentfragment.cpp
index e7eaa54a45..d2fe87d560 100644
--- a/src/gui/text/qtextdocumentfragment.cpp
+++ b/src/gui/text/qtextdocumentfragment.cpp
@@ -542,8 +542,10 @@ void QTextHtmlImporter::import()
}
}
- if (currentNode->charFormat.isAnchor() && !currentNode->charFormat.anchorName().isEmpty()) {
- namedAnchors.append(currentNode->charFormat.anchorName());
+ if (currentNode->charFormat.isAnchor()) {
+ const auto names = currentNode->charFormat.anchorNames();
+ if (!names.isEmpty())
+ namedAnchors.append(names.constFirst());
}
if (appendNodeText())
diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp
index 05a98fc1a5..b13f4da9d2 100644
--- a/src/widgets/widgets/qtabbar.cpp
+++ b/src/widgets/widgets/qtabbar.cpp
@@ -2093,7 +2093,6 @@ void QTabBarPrivate::setupMovableTab()
grabImage.setDevicePixelRatio(q->devicePixelRatioF());
grabImage.fill(Qt::transparent);
QStylePainter p(&grabImage, q);
- p.initFrom(q);
QStyleOptionTab tab;
q->initStyleOption(&tab, pressedIndex);