Diffstat (limited to 'noncore/apps/opie-write/qrichtext.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-write/qrichtext.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/noncore/apps/opie-write/qrichtext.cpp b/noncore/apps/opie-write/qrichtext.cpp index c27eb1e..f040f1e 100644 --- a/noncore/apps/opie-write/qrichtext.cpp +++ b/noncore/apps/opie-write/qrichtext.cpp | |||
@@ -6059,17 +6059,16 @@ struct QPixmapInt | |||
6059 | static QMap<QString, QPixmapInt> *pixmap_map = 0; | 6059 | static QMap<QString, QPixmapInt> *pixmap_map = 0; |
6060 | 6060 | ||
6061 | QTextImage::QTextImage( QTextDocument *p, const QMap<QString, QString> &attr, const QString& context, | 6061 | QTextImage::QTextImage( QTextDocument *p, const QMap<QString, QString> &attr, const QString& context, |
6062 | QMimeSourceFactory &factory ) | 6062 | QMimeSourceFactory &factory ) |
6063 | : QTextCustomItem( p ) | 6063 | : QTextCustomItem( p ), reg( 0 ) |
6064 | { | 6064 | { |
6065 | width = height = 0; | 6065 | width = height = 0; |
6066 | if ( attr.contains("width") ) | 6066 | if ( attr.contains("width") ) |
6067 | width = attr["width"].toInt(); | 6067 | width = attr["width"].toInt(); |
6068 | if ( attr.contains("height") ) | 6068 | if ( attr.contains("height") ) |
6069 | height = attr["height"].toInt(); | 6069 | height = attr["height"].toInt(); |
6070 | 6070 | ||
6071 | reg = 0; | ||
6072 | QString imageName = attr["src"]; | 6071 | QString imageName = attr["src"]; |
6073 | 6072 | ||
6074 | if (!imageName) | 6073 | if (!imageName) |
6075 | imageName = attr["source"]; | 6074 | imageName = attr["source"]; |
@@ -6148,8 +6147,9 @@ QTextImage::QTextImage( QTextDocument *p, const QMap<QString, QString> &attr, co | |||
6148 | } | 6147 | } |
6149 | 6148 | ||
6150 | QTextImage::~QTextImage() | 6149 | QTextImage::~QTextImage() |
6151 | { | 6150 | { |
6151 | delete reg; | ||
6152 | if ( pixmap_map && pixmap_map->contains( imgId ) ) { | 6152 | if ( pixmap_map && pixmap_map->contains( imgId ) ) { |
6153 | QPixmapInt& pmi = pixmap_map->operator[](imgId); | 6153 | QPixmapInt& pmi = pixmap_map->operator[](imgId); |
6154 | pmi.ref--; | 6154 | pmi.ref--; |
6155 | if ( !pmi.ref ) { | 6155 | if ( !pmi.ref ) { |
@@ -6159,9 +6159,8 @@ QTextImage::~QTextImage() | |||
6159 | pixmap_map = 0; | 6159 | pixmap_map = 0; |
6160 | } | 6160 | } |
6161 | } | 6161 | } |
6162 | } | 6162 | } |
6163 | delete reg; | ||
6164 | } | 6163 | } |
6165 | 6164 | ||
6166 | QString QTextImage::richText() const | 6165 | QString QTextImage::richText() const |
6167 | { | 6166 | { |