Guest User

KIO::move attempt

a guest
Jun 10th, 2013
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1. QStringList contents = root.entryList(QDir::NoDotAndDotDot | QDir::System | QDir::Hidden  | QDir::AllDirs | QDir::Files);
  2. KUrl::List fileList;
  3. foreach (QString file, contents) {
  4. //              QFile(rootNode + QString::fromLatin1("/", 1) + file).rename(QString::fromAscii("../", 3) + file);
  5.     KIO::Job *job = KIO::move(KUrl(rootNode + QString::fromLatin1("/", 1) + file), KUrl(QString::fromAscii("../", 3) + file));
  6.     fileList.append(KUrl::fromPath(workingDirectory + QString::fromLatin1("/", 1) + rootNode + file));
  7. };
  8. KIO::CopyJob * job = KIO::move(fileList, KUrl::fromPath(destinationDirectory));
  9. connect(job, SIGNAL(result(KJob *)), this, SLOT(moveResult(KJob *)));
  10. job->start();
Advertisement
Add Comment
Please, Sign In to add comment