本文整理汇总了C++中kio::CopyJob::destUrl方法的典型用法代码示例。如果您正苦于以下问题:C++ CopyJob::destUrl方法的具体用法?C++ CopyJob::destUrl怎么用?C++ CopyJob::destUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kio::CopyJob
的用法示例。
在下文中一共展示了CopyJob::destUrl方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: KonqOperations
KonqOperations *KonqOperations::doPasteV2(QWidget *parent, const KUrl &destUrl, const QPoint &pos)
{
QClipboard *clipboard = QApplication::clipboard();
const QMimeData *data = clipboard->mimeData();
const bool move = KonqMimeData::decodeIsCutSelection(data);
KIO::Job *job = KIO::pasteClipboard(destUrl, parent, move);
if (job) {
KonqOperations *op = new KonqOperations(parent);
KIOPasteInfo *pi = new KIOPasteInfo;
pi->mousePos = pos;
op->setPasteInfo(pi);
KIO::CopyJob *copyJob = qobject_cast<KIO::CopyJob*>(job);
if (copyJob) {
op->setOperation(job, move ? MOVE : COPY, copyJob->destUrl());
KIO::FileUndoManager::self()->recordJob(move ? KIO::FileUndoManager::Move : KIO::FileUndoManager::Copy, KUrl::List(), destUrl, job);
connect(copyJob, SIGNAL(copyingDone(KIO::Job*,KUrl,KUrl,time_t,bool,bool)),
op, SLOT(slotCopyingDone(KIO::Job*,KUrl,KUrl)));
connect(copyJob, SIGNAL(copyingLinkDone(KIO::Job*,KUrl,QString,KUrl)),
op, SLOT(slotCopyingLinkDone(KIO::Job*,KUrl,QString,KUrl)));
} else if (KIO::SimpleJob *simpleJob = qobject_cast<KIO::SimpleJob*>(job)) {
op->setOperation(job, PUT, simpleJob->url());
KIO::FileUndoManager::self()->recordJob(KIO::FileUndoManager::Put, KUrl::List(), simpleJob->url(), job);
}
return op;
}
return 0;
}
示例2: slotCopyDone
void Importer::slotCopyDone(KJob* _job)
{
KIO::CopyJob* job = static_cast<KIO::CopyJob*>(_job);
KUrl url = job->destUrl();
if (job->error()) {
kWarning() << "FIXME: What do we do with failed urls?";
advance();
d->importNext();
return;
}
d->renameImportedUrl(url);
}