Commit 9a089680 authored by con's avatar con
Browse files

Missing bookkeeping when removing Qt Versions.

Reviewed-by: dt
parent 68c2156f
......@@ -158,6 +158,7 @@ QtVersionManager *QtVersionManager::instance()
void QtVersionManager::addVersion(QtVersion *version)
{
QTC_ASSERT(version != 0, return);
m_versions.append(version);
m_uniqueIdToIndex.insert(version->uniqueId(), m_versions.count() - 1);
emit qtVersionsChanged();
......@@ -166,7 +167,9 @@ void QtVersionManager::addVersion(QtVersion *version)
void QtVersionManager::removeVersion(QtVersion *version)
{
QTC_ASSERT(version != 0, return);
m_versions.removeAll(version);
m_uniqueIdToIndex.remove(version->uniqueId());
emit qtVersionsChanged();
writeVersionsIntoSettings();
delete version;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment