Changeset View
Changeset View
Standalone View
Standalone View
src/provider/core/openglinfosource_p.h
Show First 20 Lines • Show All 147 Lines • ▼ Show 20 Line(s) | |||||
148 | 148 | | |||
149 | private: | 149 | private: | ||
150 | static inline QString normalizeVendorVersionString(const QString &s) | 150 | static inline QString normalizeVendorVersionString(const QString &s) | ||
151 | { | 151 | { | ||
152 | if (s.startsWith(QLatin1Char('(')) && s.endsWith(QLatin1Char(')'))) | 152 | if (s.startsWith(QLatin1Char('(')) && s.endsWith(QLatin1Char(')'))) | ||
153 | return s.mid(1, s.size() - 2); | 153 | return s.mid(1, s.size() - 2); | ||
154 | if (s.startsWith(QLatin1String("- "))) | 154 | if (s.startsWith(QLatin1String("- "))) | ||
155 | return s.mid(2); | 155 | return s.mid(2); | ||
156 | if (s.startsWith(QLatin1Char('('))) { | ||||
157 | const auto idx = s.indexOf(QLatin1String(") ")); | ||||
158 | if (idx > 0) | ||||
159 | return s.mid(idx + 2); | ||||
160 | } | ||||
156 | return s; | 161 | return s; | ||
157 | } | 162 | } | ||
158 | }; | 163 | }; | ||
159 | 164 | | |||
160 | } | 165 | } | ||
161 | 166 | | |||
162 | #endif // KUSERFEEDBACK_OPENGLINFOSOURCE_P_H | 167 | #endif // KUSERFEEDBACK_OPENGLINFOSOURCE_P_H |