summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-22 18:10:03 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-22 18:10:03 (GMT)
commit5d3b132dd94f6c985fa3f9584dedb46823acddfe (patch)
tree1ac871378aee6532c8006057f562d56a2189cadc
parent2e29f107476428bba4aad5c2d56a2a19921931dc (diff)
parent32a798150ab3393d366626d9f58eddb3ae83f788 (diff)
downloadQt-5d3b132dd94f6c985fa3f9584dedb46823acddfe.zip
Qt-5d3b132dd94f6c985fa3f9584dedb46823acddfe.tar.gz
Qt-5d3b132dd94f6c985fa3f9584dedb46823acddfe.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Fix a crash on exit. Destruction order in font database. (Symbian^4)
-rw-r--r--src/gui/kernel/qapplication_s60.cpp3
-rw-r--r--src/gui/text/qfontdatabase_s60.cpp21
2 files changed, 18 insertions, 6 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index d5d4be6..a7c7310 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -1441,6 +1441,8 @@ void qt_init(QApplicationPrivate * /* priv */, int)
qRegisterMetaType<WId>("WId");
}
+extern void qt_cleanup_symbianFontDatabaseExtras(); // qfontdatabase_s60.cpp
+
/*****************************************************************************
qt_cleanup() - cleans up when the application is finished
*****************************************************************************/
@@ -1451,6 +1453,7 @@ void qt_cleanup()
qt_S60Beep = 0;
}
QFontCache::cleanup(); // Has to happen now, since QFontEngineS60 has FBS handles
+ qt_cleanup_symbianFontDatabaseExtras();
// S60 structure and window server session are freed in eventdispatcher destructor as they are needed there
// It's important that this happens here, before the event dispatcher gets
diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp
index cdfba3d..5148568 100644
--- a/src/gui/text/qfontdatabase_s60.cpp
+++ b/src/gui/text/qfontdatabase_s60.cpp
@@ -122,7 +122,6 @@ public:
}
};
-private:
#ifndef Q_SYMBIAN_HAS_FONTTABLE_API
RHeap* m_heap;
CFontStore *m_store;
@@ -159,20 +158,30 @@ QSymbianFontDatabaseExtrasImplementation::QSymbianFontDatabaseExtrasImplementati
#endif // !Q_SYMBIAN_HAS_FONTTABLE_API
}
-QSymbianFontDatabaseExtrasImplementation::~QSymbianFontDatabaseExtrasImplementation()
+void qt_cleanup_symbianFontDatabaseExtras()
{
+ const QSymbianFontDatabaseExtrasImplementation *dbExtras =
+ static_cast<const QSymbianFontDatabaseExtrasImplementation*>(privateDb()->symbianExtras);
#ifdef Q_SYMBIAN_HAS_FONTTABLE_API
- qDeleteAll(m_extrasHash);
+ qDeleteAll(dbExtras->m_extrasHash);
#else // Q_SYMBIAN_HAS_FONTTABLE_API
typedef QList<const QSymbianTypeFaceExtras *>::iterator iterator;
- for (iterator p = m_extras.begin(); p != m_extras.end(); ++p) {
- m_store->ReleaseFont((*p)->fontOwner());
+ for (iterator p = dbExtras->m_extras.begin(); p != dbExtras->m_extras.end(); ++p) {
+ dbExtras->m_store->ReleaseFont((*p)->fontOwner());
delete *p;
}
+ dbExtras->m_extras.clear();
+#endif // Q_SYMBIAN_HAS_FONTTABLE_API
+ dbExtras->m_extrasHash.clear();
+}
+QSymbianFontDatabaseExtrasImplementation::~QSymbianFontDatabaseExtrasImplementation()
+{
+ qt_cleanup_symbianFontDatabaseExtras();
+#ifndef Q_SYMBIAN_HAS_FONTTABLE_API
delete m_store;
m_heap->Close();
-#endif // Q_SYMBIAN_HAS_FONTTABLE_API
+#endif // !Q_SYMBIAN_HAS_FONTTABLE_API
}
#ifndef FNTSTORE_H_INLINES_SUPPORT_FMM