From e9ae80694875f869892f13f4fcaf1170a00dea41 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- .../debugger/interfaces/debuggerclient.cpp | 160 +++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 quanta/components/debugger/interfaces/debuggerclient.cpp (limited to 'quanta/components/debugger/interfaces/debuggerclient.cpp') diff --git a/quanta/components/debugger/interfaces/debuggerclient.cpp b/quanta/components/debugger/interfaces/debuggerclient.cpp new file mode 100644 index 00000000..8c3196d9 --- /dev/null +++ b/quanta/components/debugger/interfaces/debuggerclient.cpp @@ -0,0 +1,160 @@ +/*************************************************************************** + debuggerclient.cpp + ------------------- + begin : 2004-03-12 + copyright : (C) 2004 Linus McCabe + Based on work by Mathieu Kooiman + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "debuggerclient.h" +#include "debuggerinterface.h" +#include +#include +#include + + +// CTor +DebuggerClient::DebuggerClient(QObject *parent, const char* name) + : QObject(parent, name) +{ + m_active = false; +} + + +DebuggerInterface* DebuggerClient::debuggerInterface() +{ + return static_cast( parent()->child( 0, "DebuggerInterface" ) ); +} + +// Active state of session +bool DebuggerClient::isActive() +{ + return m_active; +} + +void DebuggerClient::unSupportedAction(const QString &action) +{ + KMessageBox::error(NULL, i18n("The current debugger, %1, does not support the \"%2\" instruction.").arg(this->getName()).arg(action), i18n("Unsupported Debugger Function")); + +} + +// Unimplemented defaults - Pause execution +void DebuggerClient::pause() +{ + unSupportedAction(i18n("Pause")); +} + +// Unimplemented defaults - Send Request +void DebuggerClient::request() +{ + unSupportedAction(i18n("Send HTTP Request")); +} + +// Unimplemented defaults - step over +void DebuggerClient::stepOver() +{ + unSupportedAction(i18n("Step Over")); + +} + +// Unimplemented defaults - step out +void DebuggerClient::stepOut() +{ + unSupportedAction(i18n("Step Out")); + +} + +// Unimplemented defaults - trace +void DebuggerClient::trace() +{ + unSupportedAction(i18n("Trace")); +} +// Unimplemented defaults - Run +void DebuggerClient::run() +{ + unSupportedAction(i18n("Run")); +} +// Unimplemented defaults - skip +void DebuggerClient::skip() +{ + unSupportedAction(i18n("Skip")); +} +// Unimplemented defaults - stepInto +void DebuggerClient::stepInto() +{ + unSupportedAction(i18n("Step Into")); +} +// Unimplemented defaults - kill +void DebuggerClient::kill() +{ + unSupportedAction(i18n("Kill")); + +} + +// Unimplemented defaults +void DebuggerClient::profilerOpen( ) +{ + unSupportedAction(i18n("Open Profiler Output")); +} + +// Unimplemented defaults +void DebuggerClient::fileOpened(const QString&) +{ + return; +} + +// Unimplemented defaults +void DebuggerClient::addBreakpoint(DebuggerBreakpoint*) +{ + unSupportedAction(i18n("Set Breakpoint")); + +} + +// Unimplemented defaults +void DebuggerClient::removeBreakpoint(DebuggerBreakpoint*) +{ + unSupportedAction(i18n("Remove Breakpoint")); +} + + +// Unimplemented defaults +void DebuggerClient::showConfig(QDomNode) +{ + KMessageBox::error(NULL, i18n("%1 does not have any specific settings.").arg(this->getName()), i18n("Settings")); +} + +// Unimplemented defaults +void DebuggerClient::readConfig(QDomNode) +{ + +} + +// Unimplemented defaults: add watch +void DebuggerClient::addWatch(const QString &) +{ + KMessageBox::error(NULL, i18n("%1 does not support watches.").arg(this->getName()), i18n("Unsupported Debugger Function")); +} + +// Unimplemented defaults: Remove watch +void DebuggerClient::removeWatch(DebuggerVariable *) +{ + // Giving an error seems pointless, since you shouldnt be able to add a watch in the first place... + KMessageBox::error(NULL, i18n("%1 does not support watches.").arg(this->getName()), i18n("Unsupported Debugger Function")); +} + +// Unimplemented defaults: set value of varialbe +void DebuggerClient::variableSetValue(const DebuggerVariable &) +{ + KMessageBox::error(NULL, i18n("%1 does not support setting the value of variables.").arg(this->getName()), i18n("Unsupported Debugger Function")); +} + +#include "debuggerclient.moc" -- cgit v1.2.1