From 5360be909d8d5e8b3a3b6e391e80b86027d7f2a2 Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Tue, 7 Sep 2010 10:49:28 +0200 Subject: Make compile on gcce instead of friend use static to avoid gcce saying a formerly extern declaration turned into a static declaration. Reviewed-by: axis --- src/gui/image/qpixmap_s60.cpp | 11 +++++++---- src/gui/image/qpixmap_s60_p.h | 6 +++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp index dbdf0bc..68179d7 100644 --- a/src/gui/image/qpixmap_s60.cpp +++ b/src/gui/image/qpixmap_s60.cpp @@ -66,9 +66,10 @@ const uchar qt_pixmap_bit_mask[] = { 0x01, 0x02, 0x04, 0x08, static bool cleanup_function_registered = false; static QS60PixmapData *firstPixmap = 0; -static void qt_symbian_register_pixmap(QS60PixmapData *pd) +// static +void QS60PixmapData::qt_symbian_register_pixmap(QS60PixmapData *pd) { - if(!cleanup_function_registered) { + if (!cleanup_function_registered) { qAddPostRoutine(qt_symbian_release_pixmaps); cleanup_function_registered = true; } @@ -80,7 +81,8 @@ static void qt_symbian_register_pixmap(QS60PixmapData *pd) firstPixmap = pd; } -static void qt_symbian_unregister_pixmap(QS60PixmapData *pd) +// static +void QS60PixmapData::qt_symbian_unregister_pixmap(QS60PixmapData *pd) { if (pd->next) pd->next->prev = pd->prev; @@ -90,7 +92,8 @@ static void qt_symbian_unregister_pixmap(QS60PixmapData *pd) firstPixmap = pd->next; } -static void qt_symbian_release_pixmaps() +// static +void QS60PixmapData::qt_symbian_release_pixmaps() { // Scan all QS60PixmapData objects in the system and destroy them. QS60PixmapData *pd = firstPixmap; diff --git a/src/gui/image/qpixmap_s60_p.h b/src/gui/image/qpixmap_s60_p.h index a82f5c2..12885ec 100644 --- a/src/gui/image/qpixmap_s60_p.h +++ b/src/gui/image/qpixmap_s60_p.h @@ -128,9 +128,9 @@ private: 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(); + static void qt_symbian_register_pixmap(QS60PixmapData *pd); + static void qt_symbian_unregister_pixmap(QS60PixmapData *pd); + static void qt_symbian_release_pixmaps(); friend class QPixmap; friend class QS60WindowSurface; -- cgit v0.12