bruns added inline comments. INLINE COMMENTS
> kfileitem.cpp:198 > const QByteArray pathBA = QFile::encodeName(path); > if (QT_LSTAT(pathBA.constData(), &buf) == 0) { > + m_entry.replace(KIO::UDSEntry::UDS_DEVICE_ID, > buf.st_dev); m_entry.reserve(9) > kfileitem.cpp:198 > const QByteArray pathBA = QFile::encodeName(path); > if (QT_LSTAT(pathBA.constData(), &buf) == 0) { > + m_entry.replace(KIO::UDSEntry::UDS_DEVICE_ID, > buf.st_dev); Wouldn't it be better to call m_entry.clear() and m_entry.insert(...) here? For the call from the constructor, m_entry is empty, so you save the std::find_if() in the replace method calls. For any other caller, is there any useful info in m_entry() which is still valid when calling init() again? > udsentry.cpp:184 > +{ > + s << static_cast<int>(storage.size()); > quint32, see ..::load(...) below. > udsentry.cpp:341 > { > reserve(9); > insert(UDS_NAME, name); I can count 10 inserts below ... REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D12696 To: jtamate, dfaure, #frameworks Cc: kde-frameworks-devel, bruns, michaelh, ngraham