diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2010-02-10 10:05:59 (GMT) |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2010-02-10 10:05:59 (GMT) |
commit | 31ba9218c63b6c0177fabae3ff33cc5f3c2df8d5 (patch) | |
tree | 969172925db0c1bf630f9fb100ed37a26d130ae3 /tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp | |
parent | ecf66e5825d186f57468c6bf682dce32c0cd96d7 (diff) | |
download | Qt-31ba9218c63b6c0177fabae3ff33cc5f3c2df8d5.zip Qt-31ba9218c63b6c0177fabae3ff33cc5f3c2df8d5.tar.gz Qt-31ba9218c63b6c0177fabae3ff33cc5f3c2df8d5.tar.bz2 |
Fix warnings ~QX11PixmapData(): QPixmap objects must be destroyed..
in the property browser solution.
Reviewed-by: Trond Kjernåsen <trond@trolltech.com>
Task-number: QTBUG-8046
Diffstat (limited to 'tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp')
-rw-r--r-- | tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp b/tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp index b84de11..0b14292 100644 --- a/tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp +++ b/tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp @@ -93,15 +93,23 @@ QtCursorDatabase::QtCursorDatabase() QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-busy.png"))); } +void QtCursorDatabase::clear() +{ + m_cursorNames.clear(); + m_cursorIcons.clear(); + m_valueToCursorShape.clear(); + m_cursorShapeToValue.clear(); +} + void QtCursorDatabase::appendCursor(Qt::CursorShape shape, const QString &name, const QIcon &icon) { if (m_cursorShapeToValue.contains(shape)) return; - int value = m_cursorNames.count(); + const int value = m_cursorNames.count(); m_cursorNames.append(name); - m_cursorIcons[value] = icon; - m_valueToCursorShape[value] = shape; - m_cursorShapeToValue[shape] = value; + m_cursorIcons.insert(value, icon); + m_valueToCursorShape.insert(value, shape); + m_cursorShapeToValue.insert(shape, value); } QStringList QtCursorDatabase::cursorShapeNames() const |