diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-09-06 15:03:38 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-09-06 15:03:38 (GMT) |
commit | 04f5b7c80917ebbe56f3ceadda517771238f3800 (patch) | |
tree | 50a08e10dfdec9b29c6de1d6e08cdfa73bb48875 /src | |
parent | b79f79399dac8a3e16c7d1a3724965b3e166f46c (diff) | |
parent | 08c34bfec8880600138846bb895e82f69cb3f92c (diff) | |
download | Qt-04f5b7c80917ebbe56f3ceadda517771238f3800.zip Qt-04f5b7c80917ebbe56f3ceadda517771238f3800.tar.gz Qt-04f5b7c80917ebbe56f3ceadda517771238f3800.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:
Fixed incorrect Symbian scoping.
Fixes for QMAKE_EXTRA_* variable handling in symbian-sbsv2
QPixmaps try to access FBS connection after the connection has been closed.
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/webkit/WebCore/WebCore.pro | 4 | ||||
-rw-r--r-- | src/gui/image/qpixmap_s60.cpp | 43 | ||||
-rw-r--r-- | src/gui/image/qpixmap_s60_p.h | 12 |
3 files changed, 55 insertions, 4 deletions
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 537cdd3..5ea1e77 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -2857,13 +2857,13 @@ contains(DEFINES, ENABLE_SYMBIAN_DIALOG_PROVIDERS) { } } -!symbian { +!symbian-abld:!symbian-sbsv2 { modfile.files = $$moduleFile modfile.path = $$[QMAKE_MKSPECS]/modules INSTALLS += modfile } else { - # INSTALLS is not implemented in qmake's s60 generators, copy headers manually + # INSTALLS is not implemented in qmake's mmp generators, copy headers manually inst_modfile.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT} inst_modfile.input = moduleFile diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp index 9d571b5..dbdf0bc 100644 --- a/src/gui/image/qpixmap_s60.cpp +++ b/src/gui/image/qpixmap_s60.cpp @@ -63,6 +63,42 @@ QT_BEGIN_NAMESPACE const uchar qt_pixmap_bit_mask[] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 }; +static bool cleanup_function_registered = false; +static QS60PixmapData *firstPixmap = 0; + +static void qt_symbian_register_pixmap(QS60PixmapData *pd) +{ + if(!cleanup_function_registered) { + qAddPostRoutine(qt_symbian_release_pixmaps); + cleanup_function_registered = true; + } + + pd->next = firstPixmap; + pd->prev = 0; + if (firstPixmap) + firstPixmap->prev = pd; + firstPixmap = pd; +} + +static void qt_symbian_unregister_pixmap(QS60PixmapData *pd) +{ + if (pd->next) + pd->next->prev = pd->prev; + if (pd->prev) + pd->prev->next = pd->next; + else + firstPixmap = pd->next; +} + +static void qt_symbian_release_pixmaps() +{ + // Scan all QS60PixmapData objects in the system and destroy them. + QS60PixmapData *pd = firstPixmap; + while (pd != 0) { + pd->release(); + pd = pd->next; + } +} /* \class QSymbianFbsClient @@ -356,15 +392,18 @@ QS60PixmapData::QS60PixmapData(PixelType type) : QRasterPixmapData(type), cfbsBitmap(0), pengine(0), bytes(0), - formatLocked(false) + formatLocked(false), + next(0), + prev(0) { - + qt_symbian_register_pixmap(this); } QS60PixmapData::~QS60PixmapData() { release(); delete symbianBitmapDataAccess; + qt_symbian_unregister_pixmap(this); } void QS60PixmapData::resize(int width, int height) diff --git a/src/gui/image/qpixmap_s60_p.h b/src/gui/image/qpixmap_s60_p.h index 85c9ebe..a82f5c2 100644 --- a/src/gui/image/qpixmap_s60_p.h +++ b/src/gui/image/qpixmap_s60_p.h @@ -63,6 +63,11 @@ class CFbsBitGc; class QSymbianBitmapDataAccess; +class QS60PixmapData; +void qt_symbian_register_pixmap(QS60PixmapData *pd); +void qt_symbian_unregister_pixmap(QS60PixmapData *pd); +void qt_symbian_release_pixmaps(); + class QSymbianFbsHeapLock { public: @@ -120,6 +125,13 @@ private: bool formatLocked; + QS60PixmapData *next; + QS60PixmapData *prev; + + friend void qt_symbian_register_pixmap(QS60PixmapData *pd); + friend void qt_symbian_unregister_pixmap(QS60PixmapData *pd); + friend void qt_symbian_release_pixmaps(); + friend class QPixmap; friend class QS60WindowSurface; friend class QS60PaintEngine; |