summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-07-13 16:40:40 +0200
committerKent Hansen <khansen@trolltech.com>2009-07-13 16:40:40 +0200
commitb8e928ce1d4aa7b405f10ff223178f61b0588293 (patch)
treeecd1f0cb3320fb1a09866d68cdc236d1d99ec8a4
parent25e76959da84fe4c40f98cf32b7b8c69e5087681 (diff)
don't assert in QScriptEngine::setGlobalObject()
allow stuff to run, even though it's likely to crash/not work...
-rw-r--r--examples/script/calculator/main.cpp4
-rw-r--r--examples/script/qstetrix/main.cpp4
-rw-r--r--src/script/api/qscriptengine.cpp4
3 files changed, 6 insertions, 6 deletions
diff --git a/examples/script/calculator/main.cpp b/examples/script/calculator/main.cpp
index ea03b58840..6d9984a93c 100644
--- a/examples/script/calculator/main.cpp
+++ b/examples/script/calculator/main.cpp
@@ -60,7 +60,7 @@ int main(int argc, char **argv)
QScriptEngine engine;
//! [0a]
-#if 0 && defined(QT_NO_SCRIPTTOOLS)
+#if !defined(QT_NO_SCRIPTTOOLS)
QScriptEngineDebugger debugger;
debugger.attachTo(&engine);
QMainWindow *debugWindow = debugger.standardWindow();
@@ -89,7 +89,7 @@ int main(int argc, char **argv)
QScriptValue calc = ctor.construct(QScriptValueList() << scriptUi);
//! [2]
-#if 0 && defined(QT_NO_SCRIPTTOOLS)
+#if !defined(QT_NO_SCRIPTTOOLS)
QLineEdit *display = qFindChild<QLineEdit*>(ui, "display");
QObject::connect(display, SIGNAL(returnPressed()),
debugWindow, SLOT(show()));
diff --git a/examples/script/qstetrix/main.cpp b/examples/script/qstetrix/main.cpp
index d3ea412690..52d369043d 100644
--- a/examples/script/qstetrix/main.cpp
+++ b/examples/script/qstetrix/main.cpp
@@ -96,7 +96,7 @@ int main(int argc, char *argv[])
engine.globalObject().setProperty("Qt", Qt);
//! [1]
-#if 0 && defined(QT_NO_SCRIPTTOOLS)
+#if !defined(QT_NO_SCRIPTTOOLS)
QScriptEngineDebugger debugger;
debugger.attachTo(&engine);
QMainWindow *debugWindow = debugger.standardWindow();
@@ -122,7 +122,7 @@ int main(int argc, char *argv[])
//! [3]
QPushButton *debugButton = qFindChild<QPushButton*>(ui, "debugButton");
-#if 0 && defined(QT_NO_SCRIPTTOOLS)
+#if !defined(QT_NO_SCRIPTTOOLS)
QObject::connect(debugButton, SIGNAL(clicked()),
debugger.action(QScriptEngineDebugger::InterruptAction),
SIGNAL(triggered()));
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 4800286cb9..e5435721e9 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -1270,8 +1270,8 @@ QScriptValue QScriptEngine::globalObject() const
*/
void QScriptEngine::setGlobalObject(const QScriptValue &object)
{
- Q_ASSERT_X(false, Q_FUNC_INFO, "not implemented");
- // not possible with JSC?
+ qWarning("QScriptEngine::setGlobalObject() is not implemented");
+ // ### not possible with JSC?
Q_UNUSED(object);
}