http://kdenlive.org/mantis/view.php?id=2297
svn path=/trunk/kdenlive/; revision=5842
#include <KFileDialog>
#include <KIO/NetAccess>
#include <KIO/CopyJob>
#include <KFileDialog>
#include <KIO/NetAccess>
#include <KIO/CopyJob>
+#include <KIO/JobUiDelegate>
#include <KApplication>
#include <KGlobal>
#include <KBookmarkManager>
#include <KApplication>
#include <KGlobal>
#include <KBookmarkManager>
void KdenliveDoc::moveProjectData(KUrl url)
{
QList <DocClipBase*> list = m_clipManager->documentClipList();
void KdenliveDoc::moveProjectData(KUrl url)
{
QList <DocClipBase*> list = m_clipManager->documentClipList();
for (int i = 0; i < list.count(); i++) {
DocClipBase *clip = list.at(i);
if (clip->clipType() == TEXT) {
for (int i = 0; i < list.count(); i++) {
DocClipBase *clip = list.at(i);
if (clip->clipType() == TEXT) {
KUrl oldVideoThumbUrl = KUrl(m_projectFolder.path(KUrl::AddTrailingSlash) + "thumbs/" + hash + ".png");
KUrl oldAudioThumbUrl = KUrl(m_projectFolder.path(KUrl::AddTrailingSlash) + "thumbs/" + hash + ".thumb");
if (KIO::NetAccess::exists(oldVideoThumbUrl, KIO::NetAccess::SourceSide, 0)) {
KUrl oldVideoThumbUrl = KUrl(m_projectFolder.path(KUrl::AddTrailingSlash) + "thumbs/" + hash + ".png");
KUrl oldAudioThumbUrl = KUrl(m_projectFolder.path(KUrl::AddTrailingSlash) + "thumbs/" + hash + ".thumb");
if (KIO::NetAccess::exists(oldVideoThumbUrl, KIO::NetAccess::SourceSide, 0)) {
- KUrl newUrl = KUrl(url.path(KUrl::AddTrailingSlash) + "thumbs/" + hash + ".png");
- KIO::Job *job = KIO::copy(oldVideoThumbUrl, newUrl);
- KIO::NetAccess::synchronousRun(job, 0);
+ cacheUrls << oldVideoThumbUrl;
}
if (KIO::NetAccess::exists(oldAudioThumbUrl, KIO::NetAccess::SourceSide, 0)) {
}
if (KIO::NetAccess::exists(oldAudioThumbUrl, KIO::NetAccess::SourceSide, 0)) {
- KUrl newUrl = KUrl(url.path(KUrl::AddTrailingSlash) + "thumbs/" + hash + ".thumb");
- KIO::Job *job = KIO::copy(oldAudioThumbUrl, newUrl);
- if (KIO::NetAccess::synchronousRun(job, 0)) clip->refreshThumbUrl();
+ cacheUrls << oldAudioThumbUrl;
+ if (!cacheUrls.isEmpty()) {
+ KIO::Job *job = KIO::copy(cacheUrls, KUrl(url.path(KUrl::AddTrailingSlash) + "thumbs/"));
+ job->ui()->setWindow(kapp->activeWindow());
+ KIO::NetAccess::synchronousRun(job, 0);
+ }
}
const QString &KdenliveDoc::profilePath() const
}
const QString &KdenliveDoc::profilePath() const