Changeset View
Changeset View
Standalone View
Standalone View
src/ioslaves/trash/tests/testtrash.cpp
Show First 20 Lines • Show All 412 Lines • ▼ Show 20 Line(s) | |||||
413 | void TestTrash::trashFileIntoOtherPartition() | 413 | void TestTrash::trashFileIntoOtherPartition() | ||
414 | { | 414 | { | ||
415 | if (m_otherPartitionTrashDir.isEmpty()) { | 415 | if (m_otherPartitionTrashDir.isEmpty()) { | ||
416 | qDebug() << " - SKIPPED"; | 416 | qDebug() << " - SKIPPED"; | ||
417 | return; | 417 | return; | ||
418 | } | 418 | } | ||
419 | const QString fileName = QStringLiteral("testtrash-file"); | 419 | const QString fileName = QStringLiteral("testtrash-file"); | ||
420 | const QString origFilePath = m_otherPartitionTopDir + fileName; | 420 | const QString origFilePath = m_otherPartitionTopDir + fileName; | ||
421 | const QString fileId = fileName; | 421 | const QString &fileId = fileName; | ||
422 | // cleanup | 422 | // cleanup | ||
423 | QFile::remove(m_otherPartitionTrashDir + QLatin1String("/info/") + fileId + QLatin1String(".trashinfo")); | 423 | QFile::remove(m_otherPartitionTrashDir + QLatin1String("/info/") + fileId + QLatin1String(".trashinfo")); | ||
424 | QFile::remove(m_otherPartitionTrashDir + QLatin1String("/files/") + fileId); | 424 | QFile::remove(m_otherPartitionTrashDir + QLatin1String("/files/") + fileId); | ||
425 | 425 | | |||
426 | // setup | 426 | // setup | ||
427 | if (!QFile::exists(origFilePath)) { | 427 | if (!QFile::exists(origFilePath)) { | ||
428 | createTestFile(origFilePath); | 428 | createTestFile(origFilePath); | ||
429 | } | 429 | } | ||
▲ Show 20 Lines • Show All 907 Lines • Show Last 20 Lines |