QXmlInputSource is deprecated in qt5.15
Details
autotest ok
Diff Detail
- Repository
- R237 KConfig
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Looks good otherwise, this code is pretty well tested too, so I quite trust we aren't breaking it horribly.
Trying to compile the rest of KDE Software against this patch would also be useful.
src/gui/kconfigloader.cpp | ||
---|---|---|
125–131 | You can trim before toString, this way we save some string allocations. |
src/gui/kconfigloader.cpp | ||
---|---|---|
77 | No need to construct a QString if it's just to check if it's empty. | |
105–106 | This comparison doesn't need to be onto a converted QString. You can compare against the QStringRef and use QStringRef::compare to make it case insensitive. | |
138–139 | Use QStringRef::compare() | |
193–194 | I'd also use QStringRef::compare here |
src/gui/kconfigloader.cpp | ||
---|---|---|
124–125 | You can use QStringRef::compare() in this if sequence over here too. |
src/gui/kconfigloader.cpp | ||
---|---|---|
87 | This logic is inverted., no? We should be at token document end when reader.atEnd() turns true. In any case on successful parse this condition is met here and false returned. No caller seems to check the return value of ConfigLoaderHandler::parse(), thus nobody noticed? |