Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
27e3a1dd
Commit
27e3a1dd
authored
Jan 07, 2011
by
hjk
Browse files
debugger: remove engine type parameter from runcontrol constructor
parent
129c958a
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/debuggerrunner.cpp
View file @
27e3a1dd
...
...
@@ -104,8 +104,7 @@ class DebuggerRunControlPrivate
{
public:
DebuggerRunControlPrivate
(
DebuggerRunControl
*
parent
,
RunConfiguration
*
runConfiguration
,
unsigned
enabledEngines
);
unsigned
enabledEngines
()
const
;
RunConfiguration
*
runConfiguration
);
DebuggerEngineType
engineForExecutable
(
unsigned
enabledEngineTypes
,
const
QString
&
executable
);
...
...
@@ -117,28 +116,16 @@ public:
DebuggerEngine
*
m_engine
;
const
QWeakPointer
<
RunConfiguration
>
m_myRunConfiguration
;
bool
m_running
;
const
unsigned
m_cmdLineEnabledEngines
;
QString
m_errorMessage
;
QString
m_settingsIdHint
;
};
unsigned
DebuggerRunControlPrivate
::
enabledEngines
()
const
{
unsigned
rc
=
m_cmdLineEnabledEngines
;
#ifdef CDB_ENABLED
if
(
!
isCdbEngineEnabled
()
&&
!
Cdb
::
isCdbEngineEnabled
())
rc
&=
~
CdbEngineType
;
#endif
return
rc
;
}
DebuggerRunControlPrivate
::
DebuggerRunControlPrivate
(
DebuggerRunControl
*
parent
,
RunConfiguration
*
runConfiguration
,
unsigned
enabledEngines
)
RunConfiguration
*
runConfiguration
)
:
q
(
parent
)
,
m_engine
(
0
)
,
m_myRunConfiguration
(
runConfiguration
)
,
m_running
(
false
)
,
m_cmdLineEnabledEngines
(
enabledEngines
)
{
}
...
...
@@ -261,10 +248,20 @@ static DebuggerEngineType engineForToolChain(ToolChainType toolChainType)
return
NoEngineType
;
}
unsigned
filterEngines
(
unsigned
enabledEngineTypes
)
{
#ifdef CDB_ENABLED
if
(
!
isCdbEngineEnabled
()
&&
!
Cdb
::
isCdbEngineEnabled
())
enabledEngineTypes
&=
~
CdbEngineType
;
#endif
return
enabledEngineTypes
;
}
DebuggerRunControl
::
DebuggerRunControl
(
RunConfiguration
*
runConfiguration
,
unsigned
enabledEngines
,
const
DebuggerStartParameters
&
startParams
)
const
DebuggerStartParameters
&
startParams
)
:
RunControl
(
runConfiguration
,
Constants
::
DEBUGMODE
),
d
(
new
DebuggerRunControlPrivate
(
this
,
runConfiguration
,
enabledEngines
))
d
(
new
DebuggerRunControlPrivate
(
this
,
runConfiguration
))
{
connect
(
this
,
SIGNAL
(
finished
()),
SLOT
(
handleFinished
()));
...
...
@@ -272,7 +269,8 @@ DebuggerRunControl::DebuggerRunControl(RunConfiguration *runConfiguration,
DebuggerEngineType
engineType
=
NoEngineType
;
DebuggerLanguages
activeLangs
=
debuggerCore
()
->
activeLanguages
();
DebuggerStartParameters
sp
=
startParams
;
const
unsigned
enabledEngineTypes
=
d
->
enabledEngines
();
unsigned
enabledEngineTypes
=
filterEngines
(
sp
.
enabledEngines
);
if
(
sp
.
executable
.
endsWith
(
_
(
".js"
)))
engineType
=
ScriptEngineType
;
else
if
(
sp
.
executable
.
endsWith
(
_
(
".py"
)))
...
...
@@ -629,8 +627,10 @@ QWidget *DebuggerRunControlFactory::createConfigurationWidget
}
DebuggerRunControl
*
DebuggerRunControlFactory
::
create
(
const
DebuggerStartParameters
&
sp
,
RunConfiguration
*
runConfiguration
)
(
const
DebuggerStartParameters
&
sp
0
,
RunConfiguration
*
runConfiguration
)
{
DebuggerStartParameters
sp
=
sp0
;
sp
.
enabledEngines
=
m_enabledEngines
;
ConfigurationCheck
check
=
checkDebugConfiguration
(
sp
.
toolChainType
);
if
(
!
check
)
{
...
...
@@ -641,7 +641,7 @@ DebuggerRunControl *DebuggerRunControlFactory::create
}
DebuggerRunControl
*
runControl
=
new
DebuggerRunControl
(
runConfiguration
,
m_enabledEngines
,
sp
);
new
DebuggerRunControl
(
runConfiguration
,
sp
);
if
(
runControl
->
d
->
m_engine
)
return
runControl
;
delete
runControl
;
...
...
src/plugins/debugger/debuggerrunner.h
View file @
27e3a1dd
...
...
@@ -106,7 +106,7 @@ class DEBUGGER_EXPORT DebuggerRunControl
public:
typedef
ProjectExplorer
::
RunConfiguration
RunConfiguration
;
DebuggerRunControl
(
RunConfiguration
*
runConfiguration
,
unsigned
enabledEngines
,
const
DebuggerStartParameters
&
sp
);
const
DebuggerStartParameters
&
sp
);
~
DebuggerRunControl
();
// ProjectExplorer::RunControl
...
...
src/plugins/debugger/debuggerstartparameters.h
View file @
27e3a1dd
...
...
@@ -55,6 +55,7 @@ public:
:
isSnapshot
(
false
),
attachPID
(
-
1
),
useTerminal
(
false
),
enabledEngines
(
AllEngineTypes
),
qmlServerAddress
(
QLatin1String
(
"127.0.0.1"
)),
qmlServerPort
(
0
),
useServerStartScript
(
false
),
...
...
@@ -73,6 +74,7 @@ public:
QString
workingDirectory
;
qint64
attachPID
;
bool
useTerminal
;
unsigned
enabledEngines
;
// Used by AttachCrashedExternal.
QString
crashParameter
;
...
...
src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp
View file @
27e3a1dd
...
...
@@ -796,6 +796,7 @@ static Debugger::DebuggerStartParameters s60DebuggerStartParams(const S60DeviceR
sp
.
toolChainType
=
rc
->
toolChainType
();
sp
.
executable
=
debugFileName
;
sp
.
executableUid
=
rc
->
executableUid
();
sp
.
enabledEngines
=
Debugger
::
GdbEngineType
;
QTC_ASSERT
(
sp
.
executableUid
,
return
sp
);
...
...
@@ -807,7 +808,7 @@ static Debugger::DebuggerStartParameters s60DebuggerStartParams(const S60DeviceR
S60DeviceDebugRunControl
::
S60DeviceDebugRunControl
(
S60DeviceRunConfiguration
*
rc
,
const
QString
&
)
:
Debugger
::
DebuggerRunControl
(
rc
,
Debugger
::
GdbEngineType
,
s60DebuggerStartParams
(
rc
))
Debugger
::
DebuggerRunControl
(
rc
,
s60DebuggerStartParams
(
rc
))
{
if
(
startParameters
().
symbolFileName
.
isEmpty
())
{
const
QString
msg
=
tr
(
"Warning: Cannot locate the symbol file belonging to %1."
).
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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