Changeset View
Changeset View
Standalone View
Standalone View
plugins/debuggercommon/midebuggerplugin.h
Show All 30 Lines | |||||
31 | 31 | | |||
32 | #include <interfaces/iplugin.h> | 32 | #include <interfaces/iplugin.h> | ||
33 | #include <interfaces/istatus.h> | 33 | #include <interfaces/istatus.h> | ||
34 | #include <interfaces/iuicontroller.h> | 34 | #include <interfaces/iuicontroller.h> | ||
35 | #include <sublime/view.h> | 35 | #include <sublime/view.h> | ||
36 | 36 | | |||
37 | #include <QHash> | 37 | #include <QHash> | ||
38 | 38 | | |||
39 | class QDBusInterface; | | |||
40 | class QSignalMapper; | | |||
41 | class QUrl; | 39 | class QUrl; | ||
42 | 40 | | |||
43 | namespace KDevelop { | 41 | namespace KDevelop { | ||
44 | class Context; | 42 | class Context; | ||
45 | } | 43 | } | ||
46 | 44 | | |||
47 | namespace KDevMI { | 45 | namespace KDevMI { | ||
46 | class MIAttachProcessJob; | ||||
48 | class MIDebugSession; | 47 | class MIDebugSession; | ||
48 | class DBusProxy; | ||||
49 | class MIDebuggerPlugin : public KDevelop::IPlugin, public KDevelop::IStatus | 49 | class MIDebuggerPlugin : public KDevelop::IPlugin, public KDevelop::IStatus | ||
50 | { | 50 | { | ||
51 | Q_OBJECT | 51 | Q_OBJECT | ||
52 | Q_INTERFACES(KDevelop::IStatus) | 52 | Q_INTERFACES(KDevelop::IStatus) | ||
53 | 53 | | |||
54 | public: | 54 | public: | ||
55 | MIDebuggerPlugin(const QString& componentName, const QString& displayName, QObject *parent); | 55 | MIDebuggerPlugin(const QString& componentName, const QString& displayName, QObject *parent); | ||
56 | ~MIDebuggerPlugin() override; | 56 | ~MIDebuggerPlugin() override; | ||
Show All 30 Lines | 82 | Q_SIGNALS: | |||
87 | void runUntil(const QUrl &url, int line); | 87 | void runUntil(const QUrl &url, int line); | ||
88 | void jumpTo(const QUrl &url, int line); | 88 | void jumpTo(const QUrl &url, int line); | ||
89 | void addWatchVariable(const QString& var); | 89 | void addWatchVariable(const QString& var); | ||
90 | void evaluateExpression(const QString& expr); | 90 | void evaluateExpression(const QString& expr); | ||
91 | void raiseDebuggerConsoleViews(); | 91 | void raiseDebuggerConsoleViews(); | ||
92 | 92 | | |||
93 | protected Q_SLOTS: | 93 | protected Q_SLOTS: | ||
94 | 94 | | |||
95 | void slotDebugExternalProcess(QObject* interface); | 95 | void slotDebugExternalProcess(DBusProxy* proxy); | ||
96 | void slotExamineCore(); | 96 | void slotExamineCore(); | ||
97 | 97 | | |||
98 | #if KF5SysGuard_FOUND | 98 | #if KF5SysGuard_FOUND | ||
99 | void slotAttachProcess(); | 99 | void slotAttachProcess(); | ||
100 | #endif | 100 | #endif | ||
101 | 101 | | |||
102 | void slotDBusServiceRegistered(const QString& service); | 102 | void slotDBusOwnerChanged(const QString& service, const QString& oldOwner, const QString& newOwner); | ||
103 | void slotDBusServiceUnregistered(const QString& service); | | |||
104 | void slotCloseDrKonqi(); | | |||
105 | 103 | | |||
106 | protected: | 104 | protected: | ||
107 | void setupActions(const QString& displayName); | 105 | void setupActions(); | ||
108 | void setupDBus(); | 106 | void setupDBus(); | ||
109 | 107 | | |||
110 | void attachProcess(int pid); | 108 | MIAttachProcessJob* attachProcess(int pid); | ||
111 | void showStatusMessage(const QString& msg, int timeout); | 109 | void showStatusMessage(const QString& msg, int timeout); | ||
112 | 110 | | |||
113 | private: | 111 | private: | ||
114 | QHash<QString, QDBusInterface*> m_drkonqis; | 112 | QHash<QString, DBusProxy*> m_drkonqis; | ||
115 | QSignalMapper* m_drkonqiMap; | 113 | const QString m_displayName; | ||
116 | QString m_drkonqi; | | |||
117 | }; | 114 | }; | ||
118 | 115 | | |||
119 | template<class T, class Plugin = MIDebuggerPlugin> | 116 | template<class T, class Plugin = MIDebuggerPlugin> | ||
120 | class DebuggerToolFactory : public KDevelop::IToolViewFactory | 117 | class DebuggerToolFactory : public KDevelop::IToolViewFactory | ||
121 | { | 118 | { | ||
122 | public: | 119 | public: | ||
123 | DebuggerToolFactory(Plugin * plugin, const QString &id, Qt::DockWidgetArea defaultArea) | 120 | DebuggerToolFactory(Plugin * plugin, const QString &id, Qt::DockWidgetArea defaultArea) | ||
124 | : m_plugin(plugin), m_id(id), m_defaultArea(defaultArea) | 121 | : m_plugin(plugin), m_id(id), m_defaultArea(defaultArea) | ||
Show All 32 Lines |