don't try to use the videowidget if we don't have phonon

svn path=/trunk/KDE/kdebase/workspace/plasma/scriptengines/javascript/; revision=923932
This commit is contained in:
Marco Martin 2009-02-09 18:47:16 +00:00
parent de7ebc6d69
commit a478c54582

View File

@ -45,7 +45,9 @@
#include <Plasma/ToolButton> #include <Plasma/ToolButton>
#include <Plasma/TreeView> #include <Plasma/TreeView>
#include <Plasma/WebView> #include <Plasma/WebView>
#ifdef HAVE_PHONON
#include <Plasma/VideoWidget> #include <Plasma/VideoWidget>
#endif
QGraphicsWidget *createBusyWidget(QGraphicsWidget *parent) { return new Plasma::BusyWidget(parent); } QGraphicsWidget *createBusyWidget(QGraphicsWidget *parent) { return new Plasma::BusyWidget(parent); }
QGraphicsWidget *createCheckBox(QGraphicsWidget *parent) { return new Plasma::CheckBox(parent); } QGraphicsWidget *createCheckBox(QGraphicsWidget *parent) { return new Plasma::CheckBox(parent); }
@ -68,7 +70,9 @@ QGraphicsWidget *createTabBar(QGraphicsWidget *parent) { return new Plasma::TabB
QGraphicsWidget *createTextEdit(QGraphicsWidget *parent) { return new Plasma::TextEdit(parent); } QGraphicsWidget *createTextEdit(QGraphicsWidget *parent) { return new Plasma::TextEdit(parent); }
QGraphicsWidget *createToolButton(QGraphicsWidget *parent) { return new Plasma::ToolButton(parent); } QGraphicsWidget *createToolButton(QGraphicsWidget *parent) { return new Plasma::ToolButton(parent); }
QGraphicsWidget *createTreeView(QGraphicsWidget *parent) { return new Plasma::TreeView(parent); } QGraphicsWidget *createTreeView(QGraphicsWidget *parent) { return new Plasma::TreeView(parent); }
#ifdef HAVE_PHONON
QGraphicsWidget *createVideoWidget(QGraphicsWidget *parent) { return new Plasma::VideoWidget(parent); } QGraphicsWidget *createVideoWidget(QGraphicsWidget *parent) { return new Plasma::VideoWidget(parent); }
#endif
UiLoader::UiLoader() UiLoader::UiLoader()
{ {
@ -93,7 +97,9 @@ UiLoader::UiLoader()
m_widgetCtors.insert("TextEdit", createTextEdit); m_widgetCtors.insert("TextEdit", createTextEdit);
m_widgetCtors.insert("ToolButton", createToolButton); m_widgetCtors.insert("ToolButton", createToolButton);
m_widgetCtors.insert("TreeView", createTreeView); m_widgetCtors.insert("TreeView", createTreeView);
#ifdef HAVE_PHONON
m_widgetCtors.insert("VideoWidget", createVideoWidget); m_widgetCtors.insert("VideoWidget", createVideoWidget);
#endif
} }
UiLoader::~UiLoader() UiLoader::~UiLoader()