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:
parent
398c844dac
commit
0589a221e2
@ -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})
|
||||
|
||||
|
@ -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) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -2,7 +2,7 @@
|
||||
layout = new LinearLayout(plasmoid);
|
||||
video = new VideoWidget();
|
||||
layout.addItem(video);
|
||||
video.file = startupArguments[0];
|
||||
video.url = startupArguments[0];
|
||||
video.play();
|
||||
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user