summaryrefslogtreecommitdiffstats
path: root/tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2010-02-15 08:24:36 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2010-02-15 08:24:36 (GMT)
commit22157cb26419ddcaa927cbfa88ad04486b1d1ee0 (patch)
treef84ff6878248c791319fc6be1f1956f2177b5bdb /tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp
parentfa6dc19b9212706532f3f88da0fb3542e9c3eafe (diff)
parenta14b8805945c5e00be26092406a468fd8b8acc14 (diff)
downloadQt-22157cb26419ddcaa927cbfa88ad04486b1d1ee0.zip
Qt-22157cb26419ddcaa927cbfa88ad04486b1d1ee0.tar.gz
Qt-22157cb26419ddcaa927cbfa88ad04486b1d1ee0.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml
Diffstat (limited to 'tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp')
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp16
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