QTextEdit: remove unused member 'textFormat'

The member 'textFormat' is not used since Qt4 so remove it.

Change-Id: I019db92ede108fbce26d55ad4ae9a3f1a59e54b0
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
bb10
Christian Ehrlicher 2023-11-05 11:29:32 +01:00
parent c96ef6aee6
commit d759c5c5ac
2 changed files with 2 additions and 9 deletions

View File

@ -88,8 +88,7 @@ QTextEditPrivate::QTextEditPrivate()
: control(nullptr),
autoFormatting(QTextEdit::AutoNone), tabChangesFocus(false),
lineWrap(QTextEdit::WidgetWidth), lineWrapColumnOrWidth(0),
wordWrap(QTextOption::WrapAtWordBoundaryOrAnywhere), clickCausedFocus(0),
textFormat(Qt::AutoText)
wordWrap(QTextOption::WrapAtWordBoundaryOrAnywhere), clickCausedFocus(0)
{
ignoreAutomaticScrollbarAdjustment = false;
preferRichText = false;
@ -2652,10 +2651,7 @@ bool QTextEdit::find(const QRegularExpression &exp, QTextDocument::FindFlags opt
*/
void QTextEdit::setText(const QString &text)
{
Q_D(QTextEdit);
Qt::TextFormat format = d->textFormat;
if (d->textFormat == Qt::AutoText)
format = Qt::mightBeRichText(text) ? Qt::RichText : Qt::PlainText;
Qt::TextFormat format = Qt::mightBeRichText(text) ? Qt::RichText : Qt::PlainText;
#ifndef QT_NO_TEXTHTMLPARSER
if (format == Qt::RichText)
setHtml(text);

View File

@ -94,9 +94,6 @@ public:
uint inDrag : 1;
uint clickCausedFocus : 1;
// Qt3 COMPAT only, for setText
Qt::TextFormat textFormat;
QString anchorToScrollToWhenVisible;
QString placeholderText;