X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fprojectlist.cpp;h=fcbc8e56ce924160378e0b79b52ad1b6407f3a87;hb=a3eee7be24126f5a3458d488f44cd61c66135e17;hp=04150d1e2fa094536da118b15856cd6f5840fe39;hpb=87c20d036a2c530ea66bf6f00769073476879f28;p=kdenlive diff --git a/src/projectlist.cpp b/src/projectlist.cpp index 04150d1e..fcbc8e56 100644 --- a/src/projectlist.cpp +++ b/src/projectlist.cpp @@ -63,15 +63,15 @@ #include #ifdef USE_NEPOMUK -#include -#include -#include -//#include + #include + #include + #include + //#include #endif #ifdef USE_NEPOMUKCORE -#include -#include + #include + #include #endif #include @@ -86,6 +86,7 @@ #include #include #include +#include MyMessageWidget::MyMessageWidget(QWidget *parent) : KMessageWidget(parent) {} @@ -185,7 +186,7 @@ void SmallInfoLabel::slotSetJobCount(int jobCount) } -ProjectList::ProjectList(QWidget *parent) : +ProjectList::ProjectList(QGLWidget *glContext, QWidget *parent) : QWidget(parent) , m_render(NULL) , m_fps(-1) @@ -204,6 +205,7 @@ ProjectList::ProjectList(QWidget *parent) : , m_abortAllJobs(false) , m_closing(false) , m_invalidClipDialog(NULL) + , m_mainGLContext(glContext) { qRegisterMetaType ("stringMap"); QVBoxLayout *layout = new QVBoxLayout; @@ -970,17 +972,23 @@ void ProjectList::slotUpdateClipProperties(ProjectItem *clip, QMap clipId(), properties.value("name")); } if (properties.contains("description")) { +#ifdef USE_NEPOMUK ClipType type = clip->clipType(); +#endif monitorItemEditing(false); clip->setText(1, properties.value("description")); monitorItemEditing(true); -//#ifdef USE_NEPOMUK - if (KdenliveSettings::activate_nepomuk() && (type == Audio || type == Video || type == AV || type == Image || type == PLAYLIST)) { + +#ifdef USE_NEPOMUK + bool hasType = (type == Audio || type == Video || type == AV || + type == Image || type == Playlist); + + if (KdenliveSettings::activate_nepomuk() && hasType) { // Use Nepomuk system to store clip description Nepomuk::Resource f(clip->clipUrl().path()); f.setDescription(properties.value("description")); } -//#endif +#endif emit projectModified(); } } @@ -1525,6 +1533,10 @@ void ProjectList::getCachedThumbnail(SubProjectItem *item) void ProjectList::updateAllClips(bool displayRatioChanged, bool fpsChanged, const QStringList &brokenClips) { + // We are in a new thread, so we need a new OpenGL context for the remainder of the function. + QGLWidget ctx(0, m_mainGLContext); + ctx.makeCurrent(); + if (!m_allClipsProcessed) m_listView->setEnabled(false); m_listView->setSortingEnabled(false); QTreeWidgetItemIterator it(m_listView);