QTextItemInt: replace 0 with nullptr
While touching the code, move initialization from body of ctor to initializer list Change-Id: Idfcb4fb771d1414268f8685874395ca54b20621a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
4d898a73e6
commit
6f9c5c85ca
@ -3510,19 +3510,31 @@ QStackTextEngine::QStackTextEngine(const QString &string, const QFont &f)
|
||||
}
|
||||
|
||||
QTextItemInt::QTextItemInt(const QScriptItem &si, QFont *font, const QTextCharFormat &format)
|
||||
: justified(false), underlineStyle(QTextCharFormat::NoUnderline), charFormat(format),
|
||||
num_chars(0), chars(0), logClusters(0), f(0), fontEngine(0)
|
||||
: justified(false),
|
||||
underlineStyle(QTextCharFormat::NoUnderline),
|
||||
charFormat(format),
|
||||
num_chars(0),
|
||||
chars(nullptr),
|
||||
logClusters(nullptr),
|
||||
f(font),
|
||||
fontEngine(font->d->engineForScript(si.analysis.script))
|
||||
{
|
||||
f = font;
|
||||
fontEngine = f->d->engineForScript(si.analysis.script);
|
||||
Q_ASSERT(fontEngine);
|
||||
|
||||
initWithScriptItem(si);
|
||||
}
|
||||
|
||||
QTextItemInt::QTextItemInt(const QGlyphLayout &g, QFont *font, const QChar *chars_, int numChars, QFontEngine *fe, const QTextCharFormat &format)
|
||||
: flags(0), justified(false), underlineStyle(QTextCharFormat::NoUnderline), charFormat(format),
|
||||
num_chars(numChars), chars(chars_), logClusters(0), f(font), glyphs(g), fontEngine(fe)
|
||||
: flags(0),
|
||||
justified(false),
|
||||
underlineStyle(QTextCharFormat::NoUnderline),
|
||||
charFormat(format),
|
||||
num_chars(numChars),
|
||||
chars(chars_),
|
||||
logClusters(nullptr),
|
||||
f(font),
|
||||
glyphs(g),
|
||||
fontEngine(fe)
|
||||
{
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user