D28478: [FileProtocol] change statx stat_dev() to return makedev(major, minor)
    Méven Car 
    noreply at phabricator.kde.org
       
    Thu Apr  2 12:23:26 BST 2020
    
    
  
meven added a comment.
  Just a few nitpicks in test and this is good IMHO
INLINE COMMENTS
> jobtest.cpp:1516
> +    QVERIFY2(job->exec(), qPrintable(job->errorString()));
> +    // TODO set setSide
> +    const KIO::UDSEntry &entry = job->statResult();
Can remove
> jobtest.cpp:1530
> +#if 1 // should be #ifdef HAVE_STATX
> +    QVERIFY(entry.contains(KIO::UDSEntry::UDS_CREATION_TIME));
> +    QCOMPARE(entry.count(), 11);
If you want to avoid doing this you can remove fields asked from statDetails `KIO::StatBasic | KIO::StatUser | KIO::StatInode` for instance.
And have a more focused test.
> jobtest.cpp:1566
> +        const int otherDevice = otherEntry.numberValue(KIO::UDSEntry::UDS_DEVICE_ID);
> +        qDebug() << "device ID:" << device << "; otherDevice ID:" << otherDevice;
> +        QVERIFY(device != otherDevice);
You can remove this now ;)
> jobtest.cpp:1568
> +        QVERIFY(device != otherDevice);
> +    }
> +}
You can have an else with just ` QCOMPARE(device, otherDevice);` and move most of the  code inside of `if (!otherTmpDirIsOnSamePartition())` outside of the if branch.
REPOSITORY
  R241 KIO
REVISION DETAIL
  https://phabricator.kde.org/D28478
To: ahmadsamir, #frameworks, dfaure, meven, bruns
Cc: kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200402/0b69a61a/attachment.html>
    
    
More information about the Kde-frameworks-devel
mailing list