D11982: Use statbuf consistently

Stefan BrĂ¼ns noreply at phabricator.kde.org
Fri Apr 6 17:58:22 UTC 2018


bruns added inline comments.

INLINE COMMENTS

> basicindexingjob.cpp:54
>      QT_STATBUF statBuf;
> -    if (QT_LSTAT(url.data(), &statBuf) != 0) {
> +    if (filePathToStat(url.constData(), statBuf) != 0) {
>          return false;

Unneeded conversion, filePathToStat takes QByteArray

> fileinfo.cpp:31
>      Q_ASSERT(!filePath.endsWith('/'));
> -    if (QT_LSTAT(filePath.data(), &m_statBuf) != 0) {
> +    if (filePathToStat(filePath.constData(), m_statBuf) != 0) {
>          m_exists = false;

dito

> kio_search.cpp:96
>          QT_STATBUF statBuf;
> -        if (QT_LSTAT(QFile::encodeName(filePath).data(), &statBuf) == 0) {
> +        if (filePathToStat(QFile::encodeName(filePath).constData(), statBuf) == 0) {
>              uds.insert(KIO::UDSEntry::UDS_MODIFICATION_TIME, statBuf.st_mtime);

Temporary variable url = encodeName(filePath), like above?

> kio_timeline.cpp:83
>      QT_STATBUF statBuf;
> -    if( QT_LSTAT(QFile::encodeName(filePath).data(), &statBuf) == 0) {
> +    if (filePathToStat(QFile::encodeName(filePath).constData(), statBuf) == 0) {
>          uds.insert(KIO::UDSEntry::UDS_MODIFICATION_TIME, statBuf.st_mtime);

dito

REPOSITORY
  R293 Baloo

REVISION DETAIL
  https://phabricator.kde.org/D11982

To: michaelh, #baloo, bruns
Cc: #frameworks, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, alexeymin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180406/722ad252/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list