void ScColorProfileCache::addProfile(const ScColorProfile& profile) { QString path = profile.profilePath(); if (path.isEmpty()) return; QMap<QString, QWeakPointer<ScColorProfileData> >::iterator iter = m_profileMap.find(path); if (iter != m_profileMap.end()) { QSharedPointer<ScColorProfileData> strongRef = iter.value().toStrongRef(); if (strongRef) return; } m_profileMap.insert(path, profile.weakRef()); }
void ScColorProfileCache::removeProfile(const ScColorProfile& profile) { m_profileMap.remove(profile.profilePath()); }