Commit 4984b268 authored by Méven Car's avatar Méven Car Committed by Méven Car
Browse files

trash:/ set the UDS_LOCAL_PATH

BUG: 368104
parent 023d9584
Pipeline #180999 passed with stage
in 27 minutes and 35 seconds
......@@ -468,7 +468,7 @@ bool TrashProtocol::createUDSEntry(const QString &physicalPath,
KIO::UDSEntry &entry,
const TrashedFileInfo &info)
{
entry.reserve(13);
entry.reserve(14);
QByteArray physicalPath_c = QFile::encodeName(physicalPath);
QT_STATBUF buff;
if (QT_LSTAT(physicalPath_c.constData(), &buff) == -1) {
......@@ -505,6 +505,7 @@ bool TrashProtocol::createUDSEntry(const QString &physicalPath,
entry.fastInsert(KIO::UDSEntry::UDS_NAME, internalFileName); // internal filename, like "0-foo"
entry.fastInsert(KIO::UDSEntry::UDS_DISPLAY_NAME, displayFileName); // user-visible filename, like "foo"
entry.fastInsert(KIO::UDSEntry::UDS_FILE_TYPE, type);
entry.fastInsert(KIO::UDSEntry::UDS_LOCAL_PATH, physicalPath);
// if ( !url.isEmpty() )
// entry.insert( KIO::UDSEntry::UDS_URL, url );
......
......@@ -761,7 +761,7 @@ void TestTrash::mostLocalUrlTest()
url.setPath(QLatin1String("0-") + file);
KIO::StatJob *statJob = KIO::mostLocalUrl(url, KIO::HideProgressInfo);
QVERIFY(statJob->exec());
QCOMPARE(url, statJob->mostLocalUrl());
QCOMPARE(QUrl::fromLocalFile(m_trashDir + QStringLiteral("/files/") + file), statJob->mostLocalUrl());
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment