----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/121447/#review71804 -----------------------------------------------------------
Your current fix is probably working fine, but it's not a one time (initialization only) thing the way you implemented it. It could potentially be called numerous times. I think you want to fix this in some place that does the udsentry parsing. That's probably the init or readUDSEntry function. I drafted up a possible solution for readUDSEntry(...), but am unable to test it at this moment. Could you perhaps run this and see if it works for you? Note: i'm not sure which value i need, but i used "inode/directory". Perhaps "inode-directory"? LAst thing, this issue is unit testable. It's just a udsentry on a folder that lacks the UDS_MIME_TYPE field. Could you add a testcase for that (udsentrytest.cpp)? src/core/kfileitem.cpp <https://git.reviewboard.kde.org/r/121447/#comment50049> --> add here } else { // Fix for IO slaves that don't set UDS_MIME_TYPE for a folder. if (m_fileMode & QT_STAT_MASK) == QT_STAT_DIR) { m_entry.insert(KIO::UDSEntry::UDS_MIME_TYPE, "inode/directory"); m_mimeType = db.mimeTypeForName("inode/directory"); m_bMimeTypeKnown = true; } } Not tested! Just written in comment box :) I think that's about all you'd need to fix this. But if this is accaptable is probably up to David to decide. I'm also not 100% sure that you catch all cases when readUDSEntry(). - Mark Gaiser On dec 11, 2014, 1:22 p.m., Àlex Fiestas wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/121447/ > ----------------------------------------------------------- > > (Updated dec 11, 2014, 1:22 p.m.) > > > Review request for KDE Frameworks. > > > Repository: kio > > > Description > ------- > > If we know that the item is a dir, return directly the correct mimetype for > directories. > > More info of why this is needed at: > https://git.reviewboard.kde.org/r/120909/ > > > Diffs > ----- > > src/core/kfileitem.cpp 6a2cfa5 > > Diff: https://git.reviewboard.kde.org/r/121447/diff/ > > > Testing > ------- > > > Thanks, > > Àlex Fiestas > >
_______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel