| 4179 | } |
| 4180 | |
| 4181 | void Config::removeActiveDisplay(const char * display) |
| 4182 | { |
| 4183 | if( !display || !display[0] ) |
| 4184 | { |
| 4185 | throw Exception("Active display could not be removed from config, display name was empty."); |
| 4186 | } |
| 4187 | |
| 4188 | auto it = std::find( getImpl()->m_activeDisplays.begin(), |
| 4189 | getImpl()->m_activeDisplays.end(), display ); |
| 4190 | |
| 4191 | if( it != getImpl()->m_activeDisplays.end() ) |
| 4192 | { |
| 4193 | getImpl()->m_activeDisplays.erase(it); |
| 4194 | } |
| 4195 | else |
| 4196 | { |
| 4197 | std::ostringstream os; |
| 4198 | os << "Active display could not be removed from config, display '" |
| 4199 | << display << "' was not found."; |
| 4200 | throw Exception(os.str().c_str()); |
| 4201 | } |
| 4202 | |
| 4203 | getImpl()->m_displayCache.clear(); |
| 4204 | AutoMutex lock(getImpl()->m_cacheidMutex); |
| 4205 | getImpl()->resetCacheIDs(); |
| 4206 | } |
| 4207 | |
| 4208 | void Config::clearActiveDisplays() |
| 4209 | { |