diff options
author | Andy Shaw <andy.shaw@digia.com> | 2012-11-24 10:40:29 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-26 09:05:39 +0100 |
commit | c7c9daa1617bcf832f353ace8a9824ec934b3b92 (patch) | |
tree | 60c955c63dcc9eadb361bf44abc1247fb8702c36 | |
parent | 6d1acac613d59ecd1c48e3577ed42facb38a5e5a (diff) |
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>
-rw-r--r-- | src/gui/text/qtextlayout.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qtextlayout.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index 6b30e6ab65..65820687da 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -449,7 +449,7 @@ void QTextLayout::setTextOption(const QTextOption &option) \sa setTextOption() */ -QTextOption QTextLayout::textOption() const +const QTextOption &QTextLayout::textOption() const { return d->option; } diff --git a/src/gui/text/qtextlayout.h b/src/gui/text/qtextlayout.h index fbd188ce4e..2eec9fb2b6 100644 --- a/src/gui/text/qtextlayout.h +++ b/src/gui/text/qtextlayout.h @@ -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; |