Change QTextLayout::textOption() to return a const reference instead
By changing textOption() to return a const reference we will get a performance increase when accessing this function internally. Task-number: QTBUG-28193 Change-Id: I65b594d844ebaee6d72f4a95d11bd2c5e801fab4 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This commit is contained in:
parent
6d1acac613
commit
c7c9daa161
@ -449,7 +449,7 @@ void QTextLayout::setTextOption(const QTextOption &option)
|
||||
|
||||
\sa setTextOption()
|
||||
*/
|
||||
QTextOption QTextLayout::textOption() const
|
||||
const QTextOption &QTextLayout::textOption() const
|
||||
{
|
||||
return d->option;
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ public:
|
||||
QString text() const;
|
||||
|
||||
void setTextOption(const QTextOption &option);
|
||||
QTextOption textOption() const;
|
||||
const QTextOption &textOption() const;
|
||||
|
||||
void setPreeditArea(int position, const QString &text);
|
||||
int preeditAreaPosition() const;
|
||||
|
Loading…
Reference in New Issue
Block a user