summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qdnd.cpp13
-rw-r--r--src/gui/kernel/qplatformdrag_qpa.h2
-rw-r--r--src/gui/opengl/qopengltriangulatingstroker.cpp7
-rw-r--r--src/gui/painting/qcosmeticstroker.cpp1
-rw-r--r--src/gui/text/qtextodfwriter.cpp1
5 files changed, 12 insertions, 12 deletions
diff --git a/src/gui/kernel/qdnd.cpp b/src/gui/kernel/qdnd.cpp
index 6cf986ff66..4edcfa886f 100644
--- a/src/gui/kernel/qdnd.cpp
+++ b/src/gui/kernel/qdnd.cpp
@@ -169,9 +169,13 @@ QDragManager *QDragManager::self()
QPixmap QDragManager::dragCursor(Qt::DropAction action) const
{
- QDragPrivate * d = dragPrivate();
- if (d && d->customCursors.contains(action))
- return d->customCursors[action];
+ typedef QMap<Qt::DropAction, QPixmap>::const_iterator Iterator;
+
+ if (const QDragPrivate *d = dragPrivate()) {
+ const Iterator it = d->customCursors.constFind(action);
+ if (it != d->customCursors.constEnd())
+ return it.value();
+ }
Qt::CursorShape shape = Qt::ForbiddenCursor;
switch (action) {
@@ -187,8 +191,7 @@ QPixmap QDragManager::dragCursor(Qt::DropAction action) const
default:
shape = Qt::ForbiddenCursor;
}
-
- return QGuiApplicationPrivate::instance()->getPixmapCursor(Qt::DragMoveCursor);
+ return QGuiApplicationPrivate::instance()->getPixmapCursor(shape);
}
Qt::DropAction QDragManager::defaultAction(Qt::DropActions possibleActions,
diff --git a/src/gui/kernel/qplatformdrag_qpa.h b/src/gui/kernel/qplatformdrag_qpa.h
index 76d890b8c6..0b65174f71 100644
--- a/src/gui/kernel/qplatformdrag_qpa.h
+++ b/src/gui/kernel/qplatformdrag_qpa.h
@@ -60,7 +60,7 @@ public:
virtual QMimeData *platformDropData() = 0;
- virtual void startDrag() {};
+ virtual void startDrag() {}
virtual void move(const QMouseEvent *me) = 0;
virtual void drop(const QMouseEvent *me) = 0;
virtual void cancel() = 0;
diff --git a/src/gui/opengl/qopengltriangulatingstroker.cpp b/src/gui/opengl/qopengltriangulatingstroker.cpp
index 3dc3452b60..4d1a8f86b2 100644
--- a/src/gui/opengl/qopengltriangulatingstroker.cpp
+++ b/src/gui/opengl/qopengltriangulatingstroker.cpp
@@ -513,21 +513,18 @@ void QDashedStrokeProcessor::process(const QVectorPath &path, const QPen &pen, c
m_dash_stroker.setMiterLimit(pen.miterLimit());
m_dash_stroker.setClipRect(clip);
- float curvynessAdd, curvynessMul, roundness = 0;
+ float curvynessAdd, curvynessMul;
- // simplfy pens that are thin in device size (2px wide or less)
+ // simplify pens that are thin in device size (2px wide or less)
if (width < 2.5 && (cosmetic || m_inv_scale == 1)) {
curvynessAdd = 0.5;
curvynessMul = CURVE_FLATNESS / m_inv_scale;
- roundness = 1;
} else if (cosmetic) {
curvynessAdd= width / 2;
curvynessMul= CURVE_FLATNESS;
- roundness = qMax<int>(4, width * CURVE_FLATNESS);
} else {
curvynessAdd = width * m_inv_scale;
curvynessMul = CURVE_FLATNESS / m_inv_scale;
- roundness = qMax<int>(4, width * curvynessMul);
}
if (count < 2)
diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp
index 3528e6f215..eb00ec87d8 100644
--- a/src/gui/painting/qcosmeticstroker.cpp
+++ b/src/gui/painting/qcosmeticstroker.cpp
@@ -518,7 +518,6 @@ void QCosmeticStroker::drawPath(const QVectorPath &path)
Q_ASSERT(type == path.elements() || *type == QPainterPath::MoveToElement);
QPointF p = QPointF(points[0], points[1]) * state->matrix;
- QPointF movedTo = p;
patternOffset = state->lastPen.dashOffset()*64;
lastPixel.x = -1;
diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp
index 1619c9c3e7..8776b926c5 100644
--- a/src/gui/text/qtextodfwriter.cpp
+++ b/src/gui/text/qtextodfwriter.cpp
@@ -596,6 +596,7 @@ void QTextOdfWriter::writeCharacterFormat(QXmlStreamWriter &writer, QTextCharFor
case QTextCharFormat::AlignSubScript: value = QString::fromLatin1("sub"); break;
case QTextCharFormat::AlignTop: value = QString::fromLatin1("100%"); break;
case QTextCharFormat::AlignBottom : value = QString::fromLatin1("-100%"); break;
+ case QTextCharFormat::AlignBaseline: break;
}
writer.writeAttribute(styleNS, QString::fromLatin1("text-position"), value);
}