summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qfontdatabase.cpp1
-rw-r--r--src/gui/text/qfontengine_x11.cpp2
-rw-r--r--src/gui/text/qtextcontrol.cpp8
-rw-r--r--src/gui/text/qtextodfwriter.cpp4
4 files changed, 10 insertions, 5 deletions
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index e8f6d39..738e36a 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -1354,6 +1354,7 @@ static void match(int script, const QFontDef &request,
#ifdef Q_WS_X11
load(family_name, script, forceXLFD);
#else
+ Q_UNUSED(forceXLFD);
load(family_name, script);
#endif
diff --git a/src/gui/text/qfontengine_x11.cpp b/src/gui/text/qfontengine_x11.cpp
index ffc0eb4..ff3f628 100644
--- a/src/gui/text/qfontengine_x11.cpp
+++ b/src/gui/text/qfontengine_x11.cpp
@@ -491,7 +491,7 @@ glyph_metrics_t QFontEngineXLFD::boundingBox(const QGlyphLayout &glyphs)
// XCharStruct::rbearing is defined as distance from left edge to rightmost pixel
xmax = qMax(xmax, overall.xoff + glyphs.offsets[i].x + xcs->rbearing);
ymax = qMax(ymax, y + xcs->ascent + xcs->descent);
- overall.xoff += glyphs.advances_x[i];
+ overall.xoff += glyphs.advances_x[i] + QFixed::fromFixed(glyphs.justifications[i].space_18d6);
} else {
QFixed size = _fs->ascent;
overall.x = qMin(overall.x, overall.xoff);
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
index db4c07c..ee8b751 100644
--- a/src/gui/text/qtextcontrol.cpp
+++ b/src/gui/text/qtextcontrol.cpp
@@ -505,9 +505,13 @@ void QTextControlPrivate::startDrag()
drag->setMimeData(data);
Qt::DropActions actions = Qt::CopyAction;
- if (interactionFlags & Qt::TextEditable)
+ Qt::DropAction action;
+ if (interactionFlags & Qt::TextEditable) {
actions |= Qt::MoveAction;
- Qt::DropAction action = drag->exec(actions, Qt::MoveAction);
+ action = drag->exec(actions, Qt::MoveAction);
+ } else {
+ action = drag->exec(actions, Qt::CopyAction);
+ }
if (action == Qt::MoveAction && drag->target() != contextWidget)
cursor.removeSelectedText();
diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp
index 3521ade..9b7e8de 100644
--- a/src/gui/text/qtextodfwriter.cpp
+++ b/src/gui/text/qtextodfwriter.cpp
@@ -550,9 +550,9 @@ void QTextOdfWriter::writeCharacterFormat(QXmlStreamWriter &writer, QTextCharFor
}
}
if (format.hasProperty(QTextFormat::FontLetterSpacing))
- writer.writeAttribute(foNS, QString::fromLatin1("letter-spacing"), pixelToPoint(format.fontLetterSpacing()) );
+ writer.writeAttribute(foNS, QString::fromLatin1("letter-spacing"), pixelToPoint(format.fontLetterSpacing()));
if (format.hasProperty(QTextFormat::FontWordSpacing))
- writer.writeAttribute(foNS, QString::fromLatin1("letter-spacing"), pixelToPoint(format.fontWordSpacing()) );
+ writer.writeAttribute(foNS, QString::fromLatin1("word-spacing"), pixelToPoint(format.fontWordSpacing()));
if (format.hasProperty(QTextFormat::FontUnderline))
writer.writeAttribute(styleNS, QString::fromLatin1("text-underline-type"),
format.fontUnderline() ? QString::fromLatin1("single") : QString::fromLatin1("none"));