D23586: Improve code that detects useful elements in an Svg file
apol updated this revision to Diff 73324. apol added a comment. address fregl's commetn REPOSITORY R242 Plasma Framework (Library) CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D23586?vs=65005=73324 BRANCH arcpatch-D23586 REVISION DETAIL https://phabricator.kde.org/D23586 AFFECTED FILES src/plasma/svg.cpp To: apol, #plasma, #frameworks Cc: gladhorn, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
D23586: Improve code that detects useful elements in an Svg file
apol marked an inline comment as done. REPOSITORY R242 Plasma Framework (Library) REVISION DETAIL https://phabricator.kde.org/D23586 To: apol, #plasma, #frameworks Cc: gladhorn, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
D23586: Improve code that detects useful elements in an Svg file
gladhorn added inline comments. INLINE COMMENTS > svg.cpp:103 > while (!reader.atEnd()) { > -if (reader.readNext() == QXmlStreamReader::StartElement && > +const auto t = reader.readNext(); > +if (t == QXmlStreamReader::StartElement) { Maybe use "element" instead of "t" as variable name? REPOSITORY R242 Plasma Framework (Library) REVISION DETAIL https://phabricator.kde.org/D23586 To: apol, #plasma, #frameworks Cc: gladhorn, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
D23586: Improve code that detects useful elements in an Svg file
apol created this revision. apol added reviewers: Plasma, Frameworks. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. apol requested review of this revision. REVISION SUMMARY Detect any that contains a "-[a-z]" (i.e. a dash and a lowercase letter. So far it was taking "digit*-digit*-anything*", which is clearly not enough. Also since we're already parsing the svg file in some cases, use that parsing to detect the interesting ids. TEST PLAN Tests pass, plasma works REPOSITORY R242 Plasma Framework (Library) BRANCH master REVISION DETAIL https://phabricator.kde.org/D23586 AFFECTED FILES src/plasma/svg.cpp To: apol, #plasma, #frameworks Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns