本文整理汇总了C++中kurl::List::back方法的典型用法代码示例。如果您正苦于以下问题:C++ List::back方法的具体用法?C++ List::back怎么用?C++ List::back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kurl::List
的用法示例。
在下文中一共展示了List::back方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: slotUrlsDropped
void ScanGallery::slotUrlsDropped(QDropEvent *ev, FileTreeViewItem *item)
{
KUrl::List urls = ev->mimeData()->urls();
if (urls.isEmpty()) return;
kDebug() << "onto" << (item==NULL ? "NULL" : item->url().prettyUrl())
<< "srcs" << urls.count() << "first" << urls.first();
if (item==NULL) return;
KUrl dest = item->url();
// Check whether the drop is on top of a directory (in which case we
// want to move/copy into it) or a file (move/copy into its containing
// directory).
if (!item->isDir()) dest.setFileName(QString::null);
dest.adjustPath(KUrl::AddTrailingSlash);
kDebug() << "resolved destination" << dest;
// Make the last URL to copy the one to select next
KUrl nextSel = dest;
nextSel.addPath(urls.back().fileName(KUrl::ObeyTrailingSlash));
m_nextUrlToShow = nextSel;
KIO::Job *job;
// TODO: top level window as 3rd parameter?
if (ev->dropAction()==Qt::MoveAction) job = KIO::move(urls, dest);
else job = KIO::copy(urls, dest);
connect(job, SIGNAL(result(KJob *)), SLOT(slotJobResult(KJob *)));
}