| 23 | namespace |
| 24 | { |
| 25 | QString ParseColor(const QString &subject, const QString &colorName, const QString &fallback) |
| 26 | { |
| 27 | const QString pattern = QString("%1\\s*[=:]\\s*(#[0-9a-f]{6})").arg(colorName); |
| 28 | |
| 29 | QRegularExpression re(pattern, QRegularExpression::CaseInsensitiveOption); |
| 30 | auto match = re.match(subject); |
| 31 | |
| 32 | return match.hasMatch() |
| 33 | ? match.captured(1) |
| 34 | : fallback; |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | QIcon QmitkStyleManager::ThemeIcon(const QByteArray &originalSVG) |
no test coverage detected