summaryrefslogtreecommitdiffstats
path: root/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2009-04-16 01:06:09 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-04-16 01:06:09 (GMT)
commit5174ef058693fb3c5420bd9ed555ebf0dfc758a2 (patch)
tree2e8272b2394c9beff850e08dd745559d11aad258 /src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp
parent3eb4aacf07c77876c6ce68e9746906424934433b (diff)
downloadQt-5174ef058693fb3c5420bd9ed555ebf0dfc758a2.zip
Qt-5174ef058693fb3c5420bd9ed555ebf0dfc758a2.tar.gz
Qt-5174ef058693fb3c5420bd9ed555ebf0dfc758a2.tar.bz2
Remove obsolete pre-processor directives that check QT_VERSION.
Reviewed-by: Kent Hansen
Diffstat (limited to 'src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp')
-rw-r--r--src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp b/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp
index 20350f6..fa30d84 100644
--- a/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp
+++ b/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp
@@ -410,11 +410,7 @@ void QScriptDebuggerScriptedConsoleCommandJob::start()
for (int i = 0; i < d->arguments.size(); ++i)
args.append(QScriptValue(engine, d->arguments.at(i)));
QScriptDebuggerConsoleGlobalObject *global;
-#if QT_VERSION >= 0x040500
global = qobject_cast<QScriptDebuggerConsoleGlobalObject*>(engine->globalObject().toQObject());
-#else
- global = qobject_cast<QScriptDebuggerConsoleGlobalObject*>(engine->globalObject().scope().toQObject());
-#endif
Q_ASSERT(global != 0);
global->setScheduler(this);
global->setResponseHandler(this);
@@ -444,11 +440,7 @@ void QScriptDebuggerScriptedConsoleCommandJob::handleResponse(
args.append(qScriptValueFromValue(engine, response));
args.append(QScriptValue(engine, commandId));
QScriptDebuggerConsoleGlobalObject *global;
-#if QT_VERSION >= 0x040500
global = qobject_cast<QScriptDebuggerConsoleGlobalObject*>(engine->globalObject().toQObject());
-#else
- global = qobject_cast<QScriptDebuggerConsoleGlobalObject*>(engine->globalObject().scope().toQObject());
-#endif
Q_ASSERT(global != 0);
global->setScheduler(this);
global->setResponseHandler(this);
@@ -566,12 +558,7 @@ QScriptDebuggerScriptedConsoleCommand *QScriptDebuggerScriptedConsoleCommand::pa
QScriptDebuggerConsoleGlobalObject *cppGlobal = new QScriptDebuggerConsoleGlobalObject();
QScriptValue global = engine->newQObject(cppGlobal,
QScriptEngine::ScriptOwnership,
-#if QT_VERSION >= 0x040500
QScriptEngine::ExcludeSuperClassContents);
-#else
- QScriptEngine::ExcludeSuperClassMethods
- | QScriptEngine::ExcludeSuperClassProperties);
-#endif
{
QScriptValueIterator it(engine->globalObject());
while (it.hasNext()) {
@@ -579,12 +566,7 @@ QScriptDebuggerScriptedConsoleCommand *QScriptDebuggerScriptedConsoleCommand::pa
global.setProperty(it.scriptName(), it.value(), it.flags());
}
}
-#if QT_VERSION >= 0x040500
engine->setGlobalObject(global);
-#else
- engine->globalObject().setScope(global);
- global = engine->globalObject();
-#endif
cppGlobal->setMessageHandler(messageHandler);
QScriptValue ret = engine->evaluate(program, fileName);