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:
Andy Shaw 2012-11-24 10:40:29 +01:00 committed by The Qt Project
parent 6d1acac613
commit c7c9daa161
2 changed files with 2 additions and 2 deletions

View File

@ -449,7 +449,7 @@ void QTextLayout::setTextOption(const QTextOption &option)
\sa setTextOption()
*/
QTextOption QTextLayout::textOption() const
const QTextOption &QTextLayout::textOption() const
{
return d->option;
}

View File

@ -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;