#include <KHBox>
#ifdef USE_NEPOMUK
-#include <nepomuk/global.h>
-#include <nepomuk/resourcemanager.h>
-#include <Nepomuk/Resource>
-//#include <nepomuk/tag.h>
+ #include <nepomuk/global.h>
+ #include <nepomuk/resourcemanager.h>
+ #include <Nepomuk/Resource>
+ //#include <nepomuk/tag.h>
#endif
#ifdef USE_NEPOMUKCORE
-#include <nepomuk2/resourcemanager.h>
-#include <Nepomuk2/Resource>
+ #include <nepomuk2/resourcemanager.h>
+ #include <Nepomuk2/Resource>
#endif
#include <QMouseEvent>
#include <QtConcurrentRun>
#include <QVBoxLayout>
#include <KPassivePopup>
+#include <QGLWidget>
MyMessageWidget::MyMessageWidget(QWidget *parent) : KMessageWidget(parent) {}
}
-ProjectList::ProjectList(QWidget *parent) :
+ProjectList::ProjectList(QGLWidget *glContext, QWidget *parent) :
QWidget(parent)
, m_render(NULL)
, m_fps(-1)
, m_abortAllJobs(false)
, m_closing(false)
, m_invalidClipDialog(NULL)
+ , m_mainGLContext(glContext)
{
qRegisterMetaType<stringMap> ("stringMap");
QVBoxLayout *layout = new QVBoxLayout;
emit clipNameChanged(clip->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();
}
}
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);