revert the phonon check, it appears HAVE_PHONON isn't defined and phonon

is required anyways

svn path=/trunk/KDE/kdebase/workspace/plasma/scriptengines/javascript/; revision=924894
This commit is contained in:
Marco Martin 2009-02-11 21:31:26 +00:00
parent 398c844dac
commit 0589a221e2
5 changed files with 8 additions and 15 deletions

View File

@ -12,6 +12,9 @@ set(simple_javascript_engine_SRCS
qtgui/timer.cpp
)
include_directories(${PHONON_INCLUDES})
kde4_add_plugin(plasma_appletscript_simple_javascript
${simple_javascript_engine_SRCS})

View File

@ -636,13 +636,7 @@ void SimpleJavaScriptApplet::installWidgets(QScriptEngine *engine)
globalObject.setProperty(widget, fun);
}
#ifndef HAVE_PHONON
QScriptValue fun = engine->newFunction(notSupported);
fun.setProperty( QString("message"),
QScriptValue(engine, i18n("Phonon support was not available")),
QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration );
globalObject.setProperty(QString("VideoWidget"), fun);
#endif
}
QScriptValue SimpleJavaScriptApplet::createWidget(QScriptContext *context, QScriptEngine *engine)
@ -680,7 +674,7 @@ QScriptValue SimpleJavaScriptApplet::createWidget(QScriptContext *context, QScri
QScriptValue SimpleJavaScriptApplet::notSupported(QScriptContext *context, QScriptEngine *engine)
{
QString message = context->callee().property("message").toString();
return context->throwError(i18n("This operation was not supported, %1").arg(message) );
return context->throwError(i18n("This operation was not supported, %1", message) );
}

View File

@ -76,6 +76,7 @@ private:
static KSharedPtr<UiLoader> s_widgetLoader;
QScriptEngine *m_engine;
QScriptValue m_self;
QVariantList m_args;
AppletInterface *m_interface;
friend class AppletInterface;
};

View File

@ -2,7 +2,7 @@
layout = new LinearLayout(plasmoid);
video = new VideoWidget();
layout.addItem(video);
video.file = startupArguments[0];
video.url = startupArguments[0];
video.play();

View File

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