Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
97dfdebf
Commit
97dfdebf
authored
Jan 28, 2009
by
hjk
Browse files
Fixes: debugger: reduce header dependencies
parent
19637bd3
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/debuggerplugin.cpp
View file @
97dfdebf
...
...
@@ -61,6 +61,7 @@
#include
<extensionsystem/pluginmanager.h>
#include
<projectexplorer/projectexplorer.h>
#include
<projectexplorer/projectexplorerconstants.h>
#include
<projectexplorer/session.h>
...
...
@@ -85,8 +86,6 @@
#include
<QtGui/QTextCursor>
namespace
ExtensionSystem
{
class
PluginManager
;
}
using
namespace
Core
;
using
namespace
Debugger
::
Constants
;
using
namespace
Debugger
::
Internal
;
...
...
@@ -144,6 +143,11 @@ const char * const ADD_TO_WATCH_KEY = "Ctrl+Alt+Q";
}
// namespace Debugger
static
ProjectExplorer
::
SessionManager
*
sessionManager
()
{
return
ProjectExplorer
::
ProjectExplorerPlugin
::
instance
()
->
session
();
}
///////////////////////////////////////////////////////////////////////
//
// DebugMode
...
...
@@ -660,9 +664,9 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *error_mes
//
// ProjectExplorer
connect
(
projectExplorer
()
->
session
(),
SIGNAL
(
sessionLoaded
()),
connect
(
session
Manager
(),
SIGNAL
(
sessionLoaded
()),
m_manager
,
SLOT
(
sessionLoaded
()));
connect
(
projectExplorer
()
->
session
(),
SIGNAL
(
aboutToSaveSession
()),
connect
(
session
Manager
(),
SIGNAL
(
aboutToSaveSession
()),
m_manager
,
SLOT
(
aboutToSaveSession
()));
// EditorManager
...
...
@@ -703,11 +707,6 @@ void DebuggerPlugin::extensionsInitialized()
{
}
ProjectExplorer
::
ProjectExplorerPlugin
*
DebuggerPlugin
::
projectExplorer
()
const
{
return
ProjectExplorer
::
ProjectExplorerPlugin
::
instance
();
}
/*! Activates the previous mode when the current mode is the debug mode. */
void
DebuggerPlugin
::
activatePreviousMode
()
{
...
...
@@ -819,17 +818,14 @@ void DebuggerPlugin::showToolTip(TextEditor::ITextEditor *editor,
void
DebuggerPlugin
::
setSessionValue
(
const
QString
&
name
,
const
QVariant
&
value
)
{
//qDebug() << "SET SESSION VALUE" << name << value;
ProjectExplorerPlugin
*
pe
=
projectExplorer
();
if
(
pe
->
session
())
pe
->
session
()
->
setValue
(
name
,
value
);
else
qDebug
()
<<
"FIXME: Session does not exist yet"
;
QTC_ASSERT
(
sessionManager
(),
return
);
sessionManager
()
->
setValue
(
name
,
value
);
}
void
DebuggerPlugin
::
querySessionValue
(
const
QString
&
name
,
QVariant
*
value
)
{
ProjectExplorerPlugin
*
pe
=
projectExplorer
(
);
*
value
=
pe
->
session
()
->
value
(
name
);
QTC_ASSERT
(
sessionManager
(),
return
);
*
value
=
session
Manager
()
->
value
(
name
);
//qDebug() << "GET SESSION VALUE: " << name << value;
}
...
...
src/plugins/debugger/debuggerplugin.h
View file @
97dfdebf
...
...
@@ -34,19 +34,26 @@
#ifndef DEBUGGERPLUGIN_H
#define DEBUGGERPLUGIN_H
#include
<projectexplorer/projectexplorer.h>
#include
<extensionsystem/iplugin.h>
#include
<QtCore/QObject>
QT_BEGIN_NAMESPACE
class
QAbstractItemView
;
class
QAction
;
class
QCursor
;
class
QAbstractItemView
;
class
QMenu
;
class
QPoint
;
QT_END_NAMESPACE
namespace
Core
{
class
IEditor
;
}
namespace
TextEditor
{
class
ITextEditor
;
}
namespace
Core
{
class
IEditor
;
class
IMode
;
}
namespace
TextEditor
{
class
ITextEditor
;
}
namespace
Debugger
{
namespace
Internal
{
...
...
@@ -99,8 +106,6 @@ private:
friend
class
GdbOptionPage
;
friend
class
DebugMode
;
// FIXME: Just a hack now so that it can access the views
ProjectExplorer
::
ProjectExplorerPlugin
*
projectExplorer
()
const
;
DebuggerManager
*
m_manager
;
DebugMode
*
m_debugMode
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment