summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qstatictext.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-03-26 14:00:46 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-03-29 14:09:54 +0200
commit732fbde53bd39d9b99e65e4aad7b028df246fce2 (patch)
tree46b132a0ab99c7d12153b9e16a7d1f036cc348f6 /src/gui/text/qstatictext.h
parent3cebc02818d2025cda96528bbf289db15ef1bf89 (diff)
Make QStaticText layout lazy
To avoid the unnecessary overhead of doing the text layout every time a part of the QStaticText object is changed, we mark it as invalid instead and do the layout when we have to. This means an overhead on the first paint event for most users. The overhead can be avoided by using the QStaticText::prepare() function and will probably not be noticable anyway, since it's a one-time thing. Task-number: QTBUG-9030 Reviewed-by: Gunnar
Diffstat (limited to 'src/gui/text/qstatictext.h')
-rw-r--r--src/gui/text/qstatictext.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qstatictext.h b/src/gui/text/qstatictext.h
index c37194c083..f3bef93f05 100644
--- a/src/gui/text/qstatictext.h
+++ b/src/gui/text/qstatictext.h
@@ -81,7 +81,7 @@ public:
QSizeF size() const;
- void prepare(const QTransform &matrix, const QFont &font);
+ void prepare(const QTransform &matrix = QTransform(), const QFont &font = QFont());
void setPerformanceHint(PerformanceHint performanceHint);
PerformanceHint performanceHint() const;