D21955: [copyjob] Only set modification time if the kio-slave provided it

2019-06-21 Thread Wolfgang Bauer
This revision was automatically updated to reflect the committed changes. Closed by commit R241:5e791ef216c2: [copyjob] Only set modification time if the kio-slave provided it (authored by wbauer). REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D21955?vs=60227&id=6

D21955: [copyjob] Only set modification time if the kio-slave provided it

2019-06-21 Thread David Faure
dfaure accepted this revision. dfaure added a comment. I like this code. It's as good as if I had written it myself :-) REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D21955 To: wbauer, #frameworks, bruns, dfaure, ngraham Cc: ngraham, kde-frameworks-devel, #dolphin, LeGa

D21955: [copyjob] Only set modification time if the kio-slave provided it

2019-06-21 Thread Wolfgang Bauer
wbauer updated this revision to Diff 60227. wbauer edited the summary of this revision. wbauer added a comment. Check already when setting info.mtime in CopyJobPrivate::addCopyInfoFromUDSEntry(). REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D21955?vs=60202&id

D21955: [copyjob] Only set modification time if the kio-slave provided it

2019-06-21 Thread David Faure
dfaure added a comment. Ah sorry that was in your commit log. info.mtime = QDateTime::fromMSecsSinceEpoch(1000 * entry.numberValue(KIO::UDSEntry::UDS_MODIFICATION_TIME, -1), Qt::UTC); should be changed to: const auto timeVal = entry.numberValue(KIO::UDSEntry::UDS_MODIFICATI

D21955: [copyjob] Only set modification time if the kio-slave provided it

2019-06-21 Thread David Faure
dfaure added a comment. Then the bug is on the other side. Whoever is putting that value into a QDateTime, is doing something wrong. 31-Dec-1969 is NOT the normal way to represent an invalid time. Can you find out who is converting -1 to a QDateTime, and fix that instead? REPOSITORY R24

D21955: [copyjob] Only set modification time if the kio-slave provided it

2019-06-21 Thread Wolfgang Bauer
wbauer marked an inline comment as done. wbauer added inline comments. INLINE COMMENTS > wbauer wrote in copyjob.cpp:1709 > I don't think mtime would be null or invalid in this case, but I'll check. Nope. I added this debug line: qDebug() << "mtime=" << (*it).mtime << "null:" << (*it).mtime.i

D21955: [copyjob] Only set modification time if the kio-slave provided it

2019-06-21 Thread Wolfgang Bauer
wbauer added inline comments. INLINE COMMENTS > dfaure wrote in copyjob.cpp:1709 > Wouldn't mtime.isNull() or mtime.isValid() be simpler? I don't think mtime would be null or invalid in this case, but I'll check. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D21955 To: w

D21955: [copyjob] Only set modification time if the kio-slave provided it

2019-06-21 Thread David Faure
dfaure added inline comments. INLINE COMMENTS > copyjob.cpp:1709 > moveJob->setSourceSize((*it).size); > -moveJob->setModificationTime((*it).mtime); // #55804 > +if ((*it).mtime.toMSecsSinceEpoch() != 1000 * (-1)) { > +moveJob->setModificationT

D21955: [copyjob] Only set modification time if the kio-slave provided it

2019-06-21 Thread Nathaniel Graham
ngraham added reviewers: bruns, dfaure. ngraham accepted this revision. ngraham added a comment. This revision is now accepted and ready to land. Oh goodness. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D21955 To: wbauer, #frameworks, bruns, dfaure, ngraham Cc: ngraha

D21955: [copyjob] Only set modification time if the kio-slave provided it

2019-06-21 Thread Wolfgang Bauer
wbauer edited the summary of this revision. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D21955 To: wbauer, #frameworks Cc: kde-frameworks-devel, #dolphin, LeGast00n, michaelh, ngraham, bruns

D21955: [copyjob] Only set modification time if the kio-slave provided it

2019-06-21 Thread Wolfgang Bauer
wbauer edited the test plan for this revision. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D21955 To: wbauer, #frameworks Cc: kde-frameworks-devel, #dolphin, LeGast00n, michaelh, ngraham, bruns

D21955: [copyjob] Only set modification time if the kio-slave provided it

2019-06-21 Thread Wolfgang Bauer
wbauer created this revision. wbauer added a reviewer: Frameworks. wbauer added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. wbauer requested review of this revision. REVISION SUMMARY If the slave didn't pass a modification time (e.g. the http slave doesn't), it is se