summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qstatictext.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eblomfel@trolltech.com>2009-08-04 11:41:36 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-01-14 12:48:58 (GMT)
commit4cfca7cf456722ee8659b595f231f3cc2033b80d (patch)
tree696924de1d76bfabf14b5c9f91b9a938ab55983b /src/gui/text/qstatictext.h
parentc8621912c17ed15446da2f25760868bc177808c0 (diff)
downloadQt-4cfca7cf456722ee8659b595f231f3cc2033b80d.zip
Qt-4cfca7cf456722ee8659b595f231f3cc2033b80d.tar.gz
Qt-4cfca7cf456722ee8659b595f231f3cc2033b80d.tar.bz2
Speed optimization for QStaticText
Don't use QVector to store the text items, but put them in a regular array for quick access. drawStaticText() is now about 2.7 times the speed of drawText().
Diffstat (limited to 'src/gui/text/qstatictext.h')
-rw-r--r--src/gui/text/qstatictext.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/text/qstatictext.h b/src/gui/text/qstatictext.h
index bcafaa9..7247bf7 100644
--- a/src/gui/text/qstatictext.h
+++ b/src/gui/text/qstatictext.h
@@ -73,6 +73,8 @@ public:
QString toString() const;
+ bool isEmpty() const;
+
private:
void detach();