QmlJsDebugger: Replace QDDesignView by QDViewObserver

Don't force users to inherit from QDeclarativeDesignView. Instead we're
using now event filters to let a user attach a QDeclarativeViewObserver
object to a QDeclarativeDesignView.
This commit is contained in:
Kai Koehne
2010-09-14 13:39:32 +02:00
parent 0fa0d00fcd
commit 63cae2981b
29 changed files with 316 additions and 251 deletions

View File

@@ -307,11 +307,11 @@ static DebuggerEngineType engineForToolChain(int toolChainType)
// unless the toolchain provides a hint.
DebuggerEngineType DebuggerRunControl::engineForExecutable(const QString &executable)
{
if (executable.endsWith(_("qmlviewer"))) {
/*if (executable.endsWith(_("qmlviewer"))) {
if (d->m_enabledEngines & QmlEngineType)
return QmlEngineType;
d->m_errorMessage = msgEngineNotAvailable("Qml Engine");
}
}*/
if (executable.endsWith(_(".js"))) {
if (d->m_enabledEngines & ScriptEngineType)
@@ -380,13 +380,13 @@ void DebuggerRunControl::createEngine(const DebuggerStartParameters &startParams
// Figure out engine according to toolchain, executable, attach or default.
DebuggerEngineType engineType = NoEngineType;
DebuggerLanguages activeLangs = DebuggerPlugin::instance()->activeLanguages();
bool isQmlExecutable = sp.executable.endsWith(_("qmlviewer")) || sp.executable.endsWith(_("qmlobserver"));
/*bool isQmlExecutable = sp.executable.endsWith(_("qmlviewer")) || sp.executable.endsWith(_("qmlobserver"));
#ifdef Q_OS_MAC
isQmlExecutable = sp.executable.endsWith(_("QMLViewer.app")) || sp.executable.endsWith(_("QMLObserver.app"));
#endif
if (isQmlExecutable)
if (isQmlExecutable && sp.startMode != AttachCore)
engineType = QmlEngineType;
else if (sp.executable.endsWith(_(".js")))
else */if (sp.executable.endsWith(_(".js")))
engineType = ScriptEngineType;
else if (sp.executable.endsWith(_(".py")))
engineType = PdbEngineType;