summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qt_s60_p.h
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-05-05 16:30:28 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2011-05-05 16:30:28 (GMT)
commit9e95890804d8b5114f8090496b82327178055348 (patch)
treedbc17e0bceadcbd771e45a29cb1addcdd7fa18c2 /src/gui/kernel/qt_s60_p.h
parent671fff6071d1064094bf41364b11df3b55e7a65c (diff)
parentd1ac6af4f30e822e161fd8772104aa2e30e55a2f (diff)
downloadQt-9e95890804d8b5114f8090496b82327178055348.zip
Qt-9e95890804d8b5114f8090496b82327178055348.tar.gz
Qt-9e95890804d8b5114f8090496b82327178055348.tar.bz2
Merge remote-tracking branch 'origin/4.8'
Diffstat (limited to 'src/gui/kernel/qt_s60_p.h')
-rw-r--r--src/gui/kernel/qt_s60_p.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h
index 8aba53a..02977ce 100644
--- a/src/gui/kernel/qt_s60_p.h
+++ b/src/gui/kernel/qt_s60_p.h
@@ -97,6 +97,10 @@ static const int qt_symbian_max_screens = 4;
//this macro exists because EColor16MAP enum value doesn't exist in Symbian OS 9.2
#define Q_SYMBIAN_ECOLOR16MAP TDisplayMode(13)
+class QSymbianTypeFaceExtras;
+typedef QHash<QString, const QSymbianTypeFaceExtras *> QSymbianTypeFaceExtrasHash;
+typedef void (*QThreadLocalReleaseFunc)();
+
class Q_AUTOTEST_EXPORT QS60ThreadLocalData
{
public:
@@ -105,6 +109,8 @@ public:
bool usingCONEinstances;
RWsSession wsSession;
CWsScreenDevice *screenDevice;
+ QSymbianTypeFaceExtrasHash fontData;
+ QVector<QThreadLocalReleaseFunc> releaseFuncs;
};
class QS60Data
@@ -175,6 +181,8 @@ public:
inline CWsScreenDevice* screenDevice(const QWidget *widget);
inline CWsScreenDevice* screenDevice(int screenNumber);
static inline int screenNumberForWidget(const QWidget *widget);
+ inline QSymbianTypeFaceExtrasHash& fontData();
+ inline void addThreadLocalReleaseFunc(QThreadLocalReleaseFunc func);
static inline CCoeAppUi* appUi();
static inline CEikMenuBar* menuBar();
#ifdef Q_WS_S60
@@ -470,6 +478,24 @@ inline int QS60Data::screenNumberForWidget(const QWidget *widget)
return qt_widget_private(const_cast<QWidget *>(w))->symbianScreenNumber;
}
+inline QSymbianTypeFaceExtrasHash& QS60Data::fontData()
+{
+ if (!tls.hasLocalData()) {
+ tls.setLocalData(new QS60ThreadLocalData);
+ }
+ return tls.localData()->fontData;
+}
+
+inline void QS60Data::addThreadLocalReleaseFunc(QThreadLocalReleaseFunc func)
+{
+ if (!tls.hasLocalData()) {
+ tls.setLocalData(new QS60ThreadLocalData);
+ }
+ QS60ThreadLocalData *data = tls.localData();
+ if (!data->releaseFuncs.contains(func))
+ data->releaseFuncs.append(func);
+}
+
inline CCoeAppUi* QS60Data::appUi()
{
return CCoeEnv::Static()-> AppUi();