summaryrefslogtreecommitdiff
path: root/src/gui/painting/qcolormap_s60.cpp
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-06-05 10:30:46 +0200
committerJason Barron <jbarron@trolltech.com>2009-06-05 10:30:46 +0200
commitec4fd914b3b34ae14b996fd525f3f6f9b68ddd9e (patch)
tree305cd05282b3d7ee69ad98908484363e62200c28 /src/gui/painting/qcolormap_s60.cpp
parentfd6e80b7cc36ebc111d062301ba8bfca5e6e6f50 (diff)
downloadqt4-tools-ec4fd914b3b34ae14b996fd525f3f6f9b68ddd9e.tar.gz
Make QColormap::instance() not crash.
This doesn't really need a static instance lying around and this current implementation crashes since we never call the constructor. Just recreate it on the fly when instance() is called which apparently is never.
Diffstat (limited to 'src/gui/painting/qcolormap_s60.cpp')
-rw-r--r--src/gui/painting/qcolormap_s60.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/gui/painting/qcolormap_s60.cpp b/src/gui/painting/qcolormap_s60.cpp
index c21eba9a49..1b585982e4 100644
--- a/src/gui/painting/qcolormap_s60.cpp
+++ b/src/gui/painting/qcolormap_s60.cpp
@@ -53,22 +53,18 @@ public:
QAtomicInt ref;
};
-static QColormap *qt_symbian_color_map = 0;
void QColormap::initialize()
{
- qt_symbian_color_map = new QColormap;
}
void QColormap::cleanup()
{
- delete qt_symbian_color_map;
- qt_symbian_color_map = 0;
}
QColormap QColormap::instance(int)
{
- return *qt_symbian_color_map;
+ return QColormap();
}
QColormap::QColormap() : d(new QColormapPrivate)