Mercurial > hg > svcore
comparison transform/TransformFactory.cpp @ 473:47b41ec34407
* Avoid waiting on uninstalled transforms mutex in TransformFactory::
getTransformInstallStatus -- we can return TransformUnknown
* Don't follow link in SelectableLabel when clicking to select it
* Restore lost version number in plugin param dialog
author | Chris Cannam |
---|---|
date | Tue, 28 Oct 2008 18:06:06 +0000 |
parents | 5015e80cc919 |
children | a70dcfed59c1 |
comparison
equal
deleted
inserted
replaced
472:5015e80cc919 | 473:47b41ec34407 |
---|---|
132 | 132 |
133 TransformFactory::TransformInstallStatus | 133 TransformFactory::TransformInstallStatus |
134 TransformFactory::getTransformInstallStatus(TransformId id) | 134 TransformFactory::getTransformInstallStatus(TransformId id) |
135 { | 135 { |
136 populateTransforms(); | 136 populateTransforms(); |
137 populateUninstalledTransforms(); | |
138 | 137 |
139 if (m_transforms.find(id) != m_transforms.end()) { | 138 if (m_transforms.find(id) != m_transforms.end()) { |
140 return TransformInstalled; | 139 return TransformInstalled; |
141 } | 140 } |
141 | |
142 if (!m_uninstalledTransformsMutex.tryLock()) { | |
143 // uninstalled transforms are being populated; this may take some time, | |
144 // and they aren't critical | |
145 return TransformUnknown; | |
146 } | |
147 | |
148 if (!m_uninstalledTransformsPopulated) { | |
149 m_uninstalledTransformsMutex.unlock(); | |
150 populateUninstalledTransforms(); | |
151 m_uninstalledTransformsMutex.lock(); | |
152 } | |
153 | |
142 if (m_uninstalledTransforms.find(id) != m_uninstalledTransforms.end()) { | 154 if (m_uninstalledTransforms.find(id) != m_uninstalledTransforms.end()) { |
143 return TransformNotInstalled; | 155 return TransformNotInstalled; |
144 } | 156 } |
157 | |
158 m_uninstalledTransformsMutex.unlock(); | |
159 | |
145 return TransformUnknown; | 160 return TransformUnknown; |
146 } | 161 } |
147 | 162 |
148 | 163 |
149 std::vector<QString> | 164 std::vector<QString> |