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
b0a9d61d
Commit
b0a9d61d
authored
Jan 06, 2011
by
hjk
Browse files
maemo: access the debugger engine instead of the runcontrol
parent
747451dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/qt-maemo/maemodebugsupport.cpp
View file @
b0a9d61d
...
...
@@ -107,24 +107,25 @@ RunControl *MaemoDebugSupport::createDebugRunControl(MaemoRunConfiguration *runC
params
.
startMode
=
AttachToRemote
;
}
DebuggerRunControl
*
const
debuggerRunControl
=
DebuggerPlugin
::
createDebugger
(
params
,
runConfig
);
new
MaemoDebugSupport
(
runConfig
,
debuggerRunControl
);
return
debuggerRunControl
;
DebuggerRunControl
*
const
runControl
=
DebuggerPlugin
::
createDebugger
(
params
,
runConfig
);
MaemoDebugSupport
*
debugSupport
=
new
MaemoDebugSupport
(
runConfig
,
runControl
->
engine
());
connect
(
runControl
,
SIGNAL
(
finished
()),
debugSupport
,
SLOT
(
handleDebuggingFinished
()));
return
runControl
;
}
MaemoDebugSupport
::
MaemoDebugSupport
(
MaemoRunConfiguration
*
runConfig
,
Debugger
RunControl
*
runControl
)
:
QObject
(
runControl
),
m_runControl
(
runControl
),
m_runConfig
(
runConfig
),
Debugger
Engine
*
engine
)
:
QObject
(
engine
),
m_engine
(
engine
),
m_runConfig
(
runConfig
),
m_runner
(
new
MaemoSshRunner
(
this
,
runConfig
,
true
)),
m_debuggingType
(
runConfig
->
debuggingType
()),
m_dumperLib
(
runConfig
->
dumperLib
()),
m_state
(
Inactive
),
m_gdbServerPort
(
-
1
),
m_qmlPort
(
-
1
)
{
connect
(
m_
runControl
->
engine
()
,
SIGNAL
(
requestRemoteSetup
()),
this
,
connect
(
m_engine
,
SIGNAL
(
requestRemoteSetup
()),
this
,
SLOT
(
handleAdapterSetupRequested
()));
connect
(
m_runControl
,
SIGNAL
(
finished
()),
this
,
SLOT
(
handleDebuggingFinished
()));
}
MaemoDebugSupport
::~
MaemoDebugSupport
()
...
...
@@ -134,8 +135,8 @@ MaemoDebugSupport::~MaemoDebugSupport()
void
MaemoDebugSupport
::
showMessage
(
const
QString
&
msg
,
int
channel
)
{
if
(
m_
runControl
)
m_
runControl
->
engine
()
->
showMessage
(
msg
,
channel
);
if
(
m_
engine
)
m_engine
->
showMessage
(
msg
,
channel
);
}
void
MaemoDebugSupport
::
handleAdapterSetupRequested
()
...
...
@@ -302,7 +303,7 @@ void MaemoDebugSupport::handleRemoteErrorOutput(const QByteArray &output)
{
ASSERT_STATE
(
QList
<
State
>
()
<<
Inactive
<<
StartingRemoteProcess
<<
Debugging
);
if
(
!
m_
runControl
)
if
(
!
m_
engine
)
return
;
showMessage
(
QString
::
fromUtf8
(
output
),
AppOutput
);
...
...
@@ -324,13 +325,13 @@ void MaemoDebugSupport::handleProgressReport(const QString &progressOutput)
void
MaemoDebugSupport
::
handleAdapterSetupFailed
(
const
QString
&
error
)
{
setState
(
Inactive
);
m_
runControl
->
engine
()
->
handleRemoteSetupFailed
(
tr
(
"Initial setup failed: %1"
).
arg
(
error
));
m_engine
->
handleRemoteSetupFailed
(
tr
(
"Initial setup failed: %1"
).
arg
(
error
));
}
void
MaemoDebugSupport
::
handleAdapterSetupDone
()
{
setState
(
Debugging
);
m_
runControl
->
engine
()
->
handleRemoteSetupDone
(
m_gdbServerPort
,
m_qmlPort
);
m_engine
->
handleRemoteSetupDone
(
m_gdbServerPort
,
m_qmlPort
);
}
void
MaemoDebugSupport
::
setState
(
State
newState
)
...
...
@@ -365,7 +366,7 @@ QString MaemoDebugSupport::uploadDir(const MaemoDeviceConfig &devConf)
bool
MaemoDebugSupport
::
useGdb
()
const
{
return
m_
runControl
->
engine
()
->
startParameters
().
startMode
==
StartRemoteGdb
return
m_engine
->
startParameters
().
startMode
==
StartRemoteGdb
&&
m_debuggingType
!=
MaemoRunConfiguration
::
DebugQmlOnly
;
}
...
...
src/plugins/qt4projectmanager/qt-maemo/maemodebugsupport.h
View file @
b0a9d61d
...
...
@@ -47,7 +47,7 @@
namespace
Core
{
class
SftpChannel
;
}
namespace
Debugger
{
class
Debugger
RunControl
;
class
Debugger
Engine
;
}
namespace
ProjectExplorer
{
class
RunControl
;
}
...
...
@@ -65,7 +65,7 @@ public:
static
ProjectExplorer
::
RunControl
*
createDebugRunControl
(
MaemoRunConfiguration
*
runConfig
);
MaemoDebugSupport
(
MaemoRunConfiguration
*
runConfig
,
Debugger
::
Debugger
RunControl
*
runControl
);
Debugger
::
Debugger
Engine
*
engine
);
~
MaemoDebugSupport
();
static
QString
uploadDir
(
const
MaemoDeviceConfig
&
devConf
);
...
...
@@ -99,7 +99,7 @@ private:
bool
setPort
(
int
&
port
);
void
showMessage
(
const
QString
&
msg
,
int
channel
);
const
QPointer
<
Debugger
::
Debugger
RunControl
>
m_runControl
;
const
QPointer
<
Debugger
::
Debugger
Engine
>
m_engine
;
const
QPointer
<
MaemoRunConfiguration
>
m_runConfig
;
MaemoSshRunner
*
const
m_runner
;
const
MaemoRunConfiguration
::
DebuggingType
m_debuggingType
;
...
...
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