summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qrawfont_p.h
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2011-09-02 13:58:57 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2011-09-02 13:58:57 +0200
commit4d8cd11179e6cca162efe650d308124dc7aefb14 (patch)
tree5d4c44e03c5856d6287dac4ad6942fbf0ebdeb99 /src/gui/text/qrawfont_p.h
parent106a896b2e9326b25a704ed683bca5ee739e7c78 (diff)
micro optimizations
use an inlined version of isValid() everywhere; don't detach where is non required; get rid of extra checks where possible Merge-request: 1343 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Diffstat (limited to 'src/gui/text/qrawfont_p.h')
-rw-r--r--src/gui/text/qrawfont_p.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/text/qrawfont_p.h b/src/gui/text/qrawfont_p.h
index 84e83cf822..3557751637 100644
--- a/src/gui/text/qrawfont_p.h
+++ b/src/gui/text/qrawfont_p.h
@@ -54,7 +54,9 @@
//
#include "qrawfont.h"
+
#include "qfontengine_p.h"
+#include <QtCore/qthread.h>
#include <QtCore/qthreadstorage.h>
#if !defined(QT_NO_RAWFONT)
@@ -92,6 +94,12 @@ public:
cleanUp();
}
+ inline bool isValid() const
+ {
+ Q_ASSERT(thread == 0 || thread == QThread::currentThread());
+ return fontEngine != 0;
+ }
+
void cleanUp();
void platformCleanUp();
void platformLoadFromData(const QByteArray &fontData,