summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/3rdparty/phonon/gstreamer/backend.cpp3
-rw-r--r--src/3rdparty/phonon/phonon/factory.cpp3
-rw-r--r--src/script/bridge/qscriptqobject.cpp16
3 files changed, 20 insertions, 2 deletions
diff --git a/src/3rdparty/phonon/gstreamer/backend.cpp b/src/3rdparty/phonon/gstreamer/backend.cpp
index b285fd905f..647bb6f665 100644
--- a/src/3rdparty/phonon/gstreamer/backend.cpp
+++ b/src/3rdparty/phonon/gstreamer/backend.cpp
@@ -55,12 +55,13 @@ Backend::Backend(QObject *parent, const QVariantList &)
g_error_free(err);
qRegisterMetaType<Message>("Message");
-
+#ifndef QT_NO_PROPERTIES
setProperty("identifier", QLatin1String("phonon_gstreamer"));
setProperty("backendName", QLatin1String("Gstreamer"));
setProperty("backendComment", QLatin1String("Gstreamer plugin for Phonon"));
setProperty("backendVersion", QLatin1String("0.2"));
setProperty("backendWebsite", QLatin1String("http://qt.nokia.com/"));
+#endif //QT_NO_PROPERTIES
//check if we should enable debug output
QString debugLevelString = qgetenv("PHONON_GST_DEBUG");
diff --git a/src/3rdparty/phonon/phonon/factory.cpp b/src/3rdparty/phonon/phonon/factory.cpp
index e5adb4902d..881aca3b99 100644
--- a/src/3rdparty/phonon/phonon/factory.cpp
+++ b/src/3rdparty/phonon/phonon/factory.cpp
@@ -443,6 +443,7 @@ QObject *Factory::backend(bool createWhenNull)
return globalFactory->m_backendObject;
}
+#ifndef QT_NO_PROPERTIES
#define GET_STRING_PROPERTY(name) \
QString Factory::name() \
{ \
@@ -458,7 +459,7 @@ GET_STRING_PROPERTY(backendComment)
GET_STRING_PROPERTY(backendVersion)
GET_STRING_PROPERTY(backendIcon)
GET_STRING_PROPERTY(backendWebsite)
-
+#endif //QT_NO_PROPERTIES
QObject *Factory::registerQObject(QObject *o)
{
if (o) {
diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp
index 345489fa65..caf1018308 100644
--- a/src/script/bridge/qscriptqobject.cpp
+++ b/src/script/bridge/qscriptqobject.cpp
@@ -1190,6 +1190,7 @@ bool QObjectDelegate::getOwnPropertySlot(QScriptObject *object, JSC::ExecState *
const JSC::Identifier &propertyName,
JSC::PropertySlot &slot)
{
+#ifndef QT_NO_PROPERTIES
QByteArray name = QString(propertyName.ustring()).toLatin1();
QObject *qobject = data->value;
if (!qobject) {
@@ -1296,12 +1297,16 @@ bool QObjectDelegate::getOwnPropertySlot(QScriptObject *object, JSC::ExecState *
}
return QScriptObjectDelegate::getOwnPropertySlot(object, exec, propertyName, slot);
+#else //QT_NO_PROPERTIES
+ return false;
+#endif //QT_NO_PROPERTIES
}
void QObjectDelegate::put(QScriptObject *object, JSC::ExecState* exec,
const JSC::Identifier& propertyName,
JSC::JSValue value, JSC::PutPropertySlot &slot)
{
+#ifndef QT_NO_PROPERTIES
QByteArray name = ((QString)propertyName.ustring()).toLatin1();
QObject *qobject = data->value;
if (!qobject) {
@@ -1392,12 +1397,14 @@ void QObjectDelegate::put(QScriptObject *object, JSC::ExecState* exec,
}
QScriptObjectDelegate::put(object, exec, propertyName, value, slot);
+#endif //QT_NO_PROPERTIES
}
bool QObjectDelegate::deleteProperty(QScriptObject *object, JSC::ExecState *exec,
const JSC::Identifier& propertyName,
bool checkDontDelete)
{
+#ifndef QT_NO_PROPERTIES
QByteArray name = ((QString)propertyName.ustring()).toLatin1();
QObject *qobject = data->value;
if (!qobject) {
@@ -1436,6 +1443,9 @@ bool QObjectDelegate::deleteProperty(QScriptObject *object, JSC::ExecState *exec
}
return QScriptObjectDelegate::deleteProperty(object, exec, propertyName, checkDontDelete);
+#else //QT_NO_PROPERTIES
+ return false;
+#endif //QT_NO_PROPERTIES
}
bool QObjectDelegate::getPropertyAttributes(const QScriptObject *object,
@@ -1443,6 +1453,7 @@ bool QObjectDelegate::getPropertyAttributes(const QScriptObject *object,
const JSC::Identifier &propertyName,
unsigned &attributes) const
{
+#ifndef QT_NO_PROPERTIES
// ### try to avoid duplicating logic from getOwnPropertySlot()
QByteArray name = ((QString)propertyName.ustring()).toLatin1();
QObject *qobject = data->value;
@@ -1511,12 +1522,16 @@ bool QObjectDelegate::getPropertyAttributes(const QScriptObject *object,
}
return QScriptObjectDelegate::getPropertyAttributes(object, exec, propertyName, attributes);
+#else //QT_NO_PROPERTIES
+ return false;
+#endif //QT_NO_PROPERTIES
}
void QObjectDelegate::getOwnPropertyNames(QScriptObject *object, JSC::ExecState *exec,
JSC::PropertyNameArray &propertyNames,
bool includeNonEnumerable)
{
+#ifndef QT_NO_PROPERTIES
QObject *qobject = data->value;
if (!qobject) {
QString message = QString::fromLatin1("cannot get property names of deleted QObject");
@@ -1560,6 +1575,7 @@ void QObjectDelegate::getOwnPropertyNames(QScriptObject *object, JSC::ExecState
}
QScriptObjectDelegate::getOwnPropertyNames(object, exec, propertyNames, includeNonEnumerable);
+#endif //QT_NO_PROPERTIES
}
void QObjectDelegate::markChildren(QScriptObject *object, JSC::MarkStack& markStack)