summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qfont_p.h4
-rw-r--r--src/gui/text/qtextdocumentfragment.cpp12
-rw-r--r--src/gui/text/qtextformat.cpp4
3 files changed, 11 insertions, 9 deletions
diff --git a/src/gui/text/qfont_p.h b/src/gui/text/qfont_p.h
index d1509e4a251..75550439521 100644
--- a/src/gui/text/qfont_p.h
+++ b/src/gui/text/qfont_p.h
@@ -166,6 +166,7 @@ public:
QFontPrivate();
QFontPrivate(const QFontPrivate &other);
+ QFontPrivate &operator=(const QFontPrivate &) = delete;
~QFontPrivate();
QFontEngine *engineForScript(int script) const;
@@ -206,9 +207,6 @@ public:
void setVariableAxis(QFont::Tag tag, float value);
void unsetVariableAxis(QFont::Tag tag);
bool hasVariableAxis(QFont::Tag tag, float value) const;
-
-private:
- QFontPrivate &operator=(const QFontPrivate &) { return *this; }
};
diff --git a/src/gui/text/qtextdocumentfragment.cpp b/src/gui/text/qtextdocumentfragment.cpp
index 1b6e76c2017..5797d1a68b4 100644
--- a/src/gui/text/qtextdocumentfragment.cpp
+++ b/src/gui/text/qtextdocumentfragment.cpp
@@ -16,6 +16,7 @@
#include <qbytearray.h>
#include <qdatastream.h>
#include <qdatetime.h>
+#include <QtCore/private/qstringiterator_p.h>
QT_BEGIN_NAMESPACE
@@ -582,8 +583,11 @@ bool QTextHtmlImporter::appendNodeText()
QString textToInsert;
textToInsert.reserve(text.size());
- for (QChar ch : text) {
- if (ch.isSpace()
+ QStringIterator it(text);
+ while (it.hasNext()) {
+ char32_t ch = it.next();
+
+ if (QChar::isSpace(ch)
&& ch != QChar::Nbsp
&& ch != QChar::ParagraphSeparator) {
@@ -646,12 +650,12 @@ bool QTextHtmlImporter::appendNodeText()
format.setAnchor(true);
format.setAnchorNames(namedAnchors);
- cursor.insertText(ch, format);
+ cursor.insertText(QString::fromUcs4(&ch, 1), format);
namedAnchors.clear();
format.clearProperty(QTextFormat::IsAnchor);
format.clearProperty(QTextFormat::AnchorName);
} else {
- textToInsert += ch;
+ textToInsert += QChar::fromUcs4(ch);
}
}
}
diff --git a/src/gui/text/qtextformat.cpp b/src/gui/text/qtextformat.cpp
index 53a984306c6..d722bceb289 100644
--- a/src/gui/text/qtextformat.cpp
+++ b/src/gui/text/qtextformat.cpp
@@ -657,8 +657,8 @@ Q_GUI_EXPORT QDataStream &operator>>(QDataStream &stream, QTextTableCellFormat &
\value FontStyleName
\value FontPointSize
\value FontPixelSize
- \value FontSizeAdjustment Specifies the change in size given to the fontsize already set using
- FontPointSize or FontPixelSize.
+ \value FontSizeAdjustment Specifies an integer adjustment added to the base font size set using
+ \c FontPointSize or \c FontPixelSize.
\value FontFixedPitch
\omitvalue FontSizeIncrement
\value FontWeight