Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
532a8ad2
Commit
532a8ad2
authored
Feb 07, 2011
by
Pawel Polanski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Symbian: tcftrk renamed to Coda
parent
3212e115
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
535 additions
and
535 deletions
+535
-535
src/plugins/debugger/gdb/codagdbadapter.cpp
src/plugins/debugger/gdb/codagdbadapter.cpp
+112
-112
src/plugins/debugger/gdb/codagdbadapter.h
src/plugins/debugger/gdb/codagdbadapter.h
+31
-31
src/plugins/debugger/gdb/gdb.pri
src/plugins/debugger/gdb/gdb.pri
+2
-2
src/plugins/debugger/gdb/gdbengine.cpp
src/plugins/debugger/gdb/gdbengine.cpp
+2
-2
src/plugins/debugger/gdb/gdbengine.h
src/plugins/debugger/gdb/gdbengine.h
+1
-1
src/plugins/debugger/gdb/trkgdbadapter.cpp
src/plugins/debugger/gdb/trkgdbadapter.cpp
+1
-1
src/plugins/qt4projectmanager/qt-s60/codaruncontrol.cpp
src/plugins/qt4projectmanager/qt-s60/codaruncontrol.cpp
+50
-50
src/plugins/qt4projectmanager/qt-s60/codaruncontrol.h
src/plugins/qt4projectmanager/qt-s60/codaruncontrol.h
+15
-15
src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp
src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp
+23
-23
src/plugins/qt4projectmanager/qt-s60/s60deploystep.h
src/plugins/qt4projectmanager/qt-s60/s60deploystep.h
+10
-10
src/shared/symbianutils/codadevice.cpp
src/shared/symbianutils/codadevice.cpp
+140
-140
src/shared/symbianutils/codadevice.h
src/shared/symbianutils/codadevice.h
+62
-62
src/shared/symbianutils/codamessage.cpp
src/shared/symbianutils/codamessage.cpp
+52
-52
src/shared/symbianutils/codamessage.h
src/shared/symbianutils/codamessage.h
+26
-26
src/shared/symbianutils/json.cpp
src/shared/symbianutils/json.cpp
+2
-2
src/shared/symbianutils/json.h
src/shared/symbianutils/json.h
+2
-2
src/shared/symbianutils/symbianutils.pri
src/shared/symbianutils/symbianutils.pri
+4
-4
No files found.
src/plugins/debugger/gdb/
tcftrk
gdbadapter.cpp
→
src/plugins/debugger/gdb/
coda
gdbadapter.cpp
View file @
532a8ad2
This diff is collapsed.
Click to expand it.
src/plugins/debugger/gdb/
tcftrk
gdbadapter.h
→
src/plugins/debugger/gdb/
coda
gdbadapter.h
View file @
532a8ad2
...
...
@@ -31,8 +31,8 @@
**
**************************************************************************/
#ifndef DEBUGGER_
TCFTRK
GDBADAPTER_H
#define DEBUGGER_
TCFTRK
GDBADAPTER_H
#ifndef DEBUGGER_
CODA
GDBADAPTER_H
#define DEBUGGER_
CODA
GDBADAPTER_H
#include "abstractgdbadapter.h"
#include "localgdbprocess.h"
...
...
@@ -51,11 +51,11 @@ class QTcpSocket;
class
QIODevice
;
QT_END_NAMESPACE
namespace
tcftrk
{
struct
TcfTrk
CommandResult
;
class
TcfTrk
Device
;
class
TcfTrk
Event
;
class
TcfTrk
RunControlModuleLoadContextSuspendedEvent
;
namespace
Coda
{
struct
Coda
CommandResult
;
class
Coda
Device
;
class
Coda
Event
;
class
Coda
RunControlModuleLoadContextSuspendedEvent
;
}
namespace
Debugger
{
...
...
@@ -66,21 +66,21 @@ struct GdbResult;
///////////////////////////////////////////////////////////////////////
//
//
TcfTrk
GdbAdapter
//
Coda
GdbAdapter
//
///////////////////////////////////////////////////////////////////////
class
TcfTrk
GdbAdapter
:
public
AbstractGdbAdapter
class
Coda
GdbAdapter
:
public
AbstractGdbAdapter
{
Q_OBJECT
public:
typedef
trk
::
Callback
<
const
GdbResult
&>
GdbResultCallback
;
typedef
trk
::
Callback
<
const
tcftrk
::
TcfTrk
CommandResult
&>
TcfTrk
Callback
;
typedef
trk
::
Callback
<
const
Coda
::
Coda
CommandResult
&>
Coda
Callback
;
typedef
trk
::
Callback
<
const
GdbResponse
&>
GdbCallback
;
explicit
TcfTrk
GdbAdapter
(
GdbEngine
*
engine
);
virtual
~
TcfTrk
GdbAdapter
();
explicit
Coda
GdbAdapter
(
GdbEngine
*
engine
);
virtual
~
Coda
GdbAdapter
();
void
setGdbServerName
(
const
QString
&
name
);
QString
gdbServerName
()
const
{
return
m_gdbServerName
;
}
...
...
@@ -113,22 +113,22 @@ private:
void
shutdownInferior
();
void
shutdownAdapter
();
void
sendRunControlTerminateCommand
();
void
handleRunControlTerminate
(
const
tcftrk
::
TcfTrk
CommandResult
&
);
void
handleRunControlTerminate
(
const
Coda
::
Coda
CommandResult
&
);
void
sendRegistersGetMCommand
();
void
handleWriteRegister
(
const
tcftrk
::
TcfTrk
CommandResult
&
result
);
void
handleWriteRegister
(
const
Coda
::
Coda
CommandResult
&
result
);
void
reportRegisters
();
void
handleReadRegisters
(
const
tcftrk
::
TcfTrk
CommandResult
&
result
);
void
handleRegisterChildren
(
const
tcftrk
::
TcfTrk
CommandResult
&
result
);
void
handleAndReportReadRegisters
(
const
tcftrk
::
TcfTrk
CommandResult
&
result
);
void
handleAndReportReadRegister
(
const
tcftrk
::
TcfTrk
CommandResult
&
result
);
void
handleAndReportReadRegistersAfterStop
(
const
tcftrk
::
TcfTrk
CommandResult
&
result
);
void
handleReadRegisters
(
const
Coda
::
Coda
CommandResult
&
result
);
void
handleRegisterChildren
(
const
Coda
::
Coda
CommandResult
&
result
);
void
handleAndReportReadRegisters
(
const
Coda
::
Coda
CommandResult
&
result
);
void
handleAndReportReadRegister
(
const
Coda
::
Coda
CommandResult
&
result
);
void
handleAndReportReadRegistersAfterStop
(
const
Coda
::
Coda
CommandResult
&
result
);
QByteArray
stopMessage
()
const
;
void
handleAndReportSetBreakpoint
(
const
tcftrk
::
TcfTrk
CommandResult
&
result
);
void
handleClearBreakpoint
(
const
tcftrk
::
TcfTrk
CommandResult
&
result
);
void
handleAndReportSetBreakpoint
(
const
Coda
::
Coda
CommandResult
&
result
);
void
handleClearBreakpoint
(
const
Coda
::
Coda
CommandResult
&
result
);
void
readMemory
(
uint
addr
,
uint
len
,
bool
buffered
);
void
handleReadMemoryBuffered
(
const
tcftrk
::
TcfTrk
CommandResult
&
result
);
void
handleReadMemoryUnbuffered
(
const
tcftrk
::
TcfTrk
CommandResult
&
result
);
void
handleWriteMemory
(
const
tcftrk
::
TcfTrk
CommandResult
&
result
);
void
handleReadMemoryBuffered
(
const
Coda
::
Coda
CommandResult
&
result
);
void
handleReadMemoryUnbuffered
(
const
Coda
::
Coda
CommandResult
&
result
);
void
handleWriteMemory
(
const
Coda
::
Coda
CommandResult
&
result
);
void
tryAnswerGdbMemoryRequest
(
bool
buffered
);
inline
void
sendMemoryGetCommand
(
const
MemoryRange
&
range
,
bool
buffered
);
void
addThread
(
unsigned
id
);
...
...
@@ -144,7 +144,7 @@ private:
QString
m_gdbServerName
;
// 127.0.0.1:(2222+uid)
bool
m_running
;
int
m_stopReason
;
tcftrk
::
TcfTrk
Device
*
m_trkDevice
;
Coda
::
Coda
Device
*
m_trkDevice
;
QSharedPointer
<
QIODevice
>
m_trkIODevice
;
//
...
...
@@ -152,14 +152,14 @@ private:
//
Q_SLOT
void
handleGdbConnection
();
Q_SLOT
void
readGdbServerCommand
();
Q_SLOT
void
tcftrk
DeviceError
(
const
QString
&
);
Q_SLOT
void
coda
DeviceError
(
const
QString
&
);
void
startGdb
();
Q_SLOT
void
tcftrk
Event
(
const
tcftrk
::
TcfTrk
Event
&
knownEvent
);
void
handle
TcfTrk
RunControlModuleLoadContextSuspendedEvent
(
const
tcftrk
::
TcfTrk
RunControlModuleLoadContextSuspendedEvent
&
e
);
Q_SLOT
void
coda
Event
(
const
Coda
::
Coda
Event
&
knownEvent
);
void
handle
Coda
RunControlModuleLoadContextSuspendedEvent
(
const
Coda
::
Coda
RunControlModuleLoadContextSuspendedEvent
&
e
);
inline
void
sendTrkContinue
();
void
sendTrkStepRange
();
void
handleStep
(
const
tcftrk
::
TcfTrk
CommandResult
&
result
);
void
handleCreateProcess
(
const
tcftrk
::
TcfTrk
CommandResult
&
result
);
void
handleStep
(
const
Coda
::
Coda
CommandResult
&
result
);
void
handleCreateProcess
(
const
Coda
::
Coda
CommandResult
&
result
);
void
readGdbResponse
();
void
handleGdbServerCommand
(
const
QByteArray
&
cmd
);
...
...
@@ -197,4 +197,4 @@ private:
}
// namespace Internal
}
// namespace Debugger
#endif // DEBUGGER_
TCFTRK
GDBADAPTER_H
#endif // DEBUGGER_
CODA
GDBADAPTER_H
src/plugins/debugger/gdb/gdb.pri
View file @
532a8ad2
...
...
@@ -10,7 +10,7 @@ HEADERS += \
$$PWD/termgdbadapter.h \
$$PWD/remotegdbserveradapter.h \
$$PWD/trkgdbadapter.h \
$$PWD/
tcftrk
gdbadapter.h \
$$PWD/
coda
gdbadapter.h \
$$PWD/s60debuggerbluetoothstarter.h \
$$PWD/abstractgdbprocess.h \
$$PWD/localgdbprocess.h \
...
...
@@ -33,7 +33,7 @@ SOURCES += \
$$PWD/termgdbadapter.cpp \
$$PWD/remotegdbserveradapter.cpp \
$$PWD/trkgdbadapter.cpp \
$$PWD/
tcftrk
gdbadapter.cpp \
$$PWD/
coda
gdbadapter.cpp \
$$PWD/s60debuggerbluetoothstarter.cpp \
$$PWD/abstractgdbprocess.cpp \
$$PWD/localgdbprocess.cpp \
...
...
src/plugins/debugger/gdb/gdbengine.cpp
View file @
532a8ad2
...
...
@@ -44,7 +44,7 @@
#include "remotegdbserveradapter.h"
#include "remoteplaingdbadapter.h"
#include "trkgdbadapter.h"
#include "
tcftrk
gdbadapter.h"
#include "
coda
gdbadapter.h"
#include "debuggeractions.h"
#include "debuggerconstants.h"
...
...
@@ -1798,7 +1798,7 @@ AbstractGdbAdapter *GdbEngine::createAdapter()
case
ProjectExplorer
::
ToolChain_RVCT_ARMV5_GNUPOC
:
case
ProjectExplorer
::
ToolChain_GCCE_GNUPOC
:
if
(
sp
.
debugClient
==
DebuggerStartParameters
::
DebugClientCoda
)
return
new
TcfTrk
GdbAdapter
(
this
);
return
new
Coda
GdbAdapter
(
this
);
else
return
new
TrkGdbAdapter
(
this
);
default:
...
...
src/plugins/debugger/gdb/gdbengine.h
View file @
532a8ad2
...
...
@@ -100,7 +100,7 @@ private:
friend
class
RemoteGdbServerAdapter
;
friend
class
RemotePlainGdbAdapter
;
friend
class
TrkGdbAdapter
;
friend
class
TcfTrk
GdbAdapter
;
friend
class
Coda
GdbAdapter
;
private:
////////// General Interface //////////
...
...
src/plugins/debugger/gdb/trkgdbadapter.cpp
View file @
532a8ad2
...
...
@@ -1673,7 +1673,7 @@ void TrkGdbAdapter::handleCreateProcess(const TrkResult &result)
logMessage
(
startMsg
,
LogMisc
);
// 26.8.2010: When paging occurs in S^3, bogus starting ROM addresses
// like 0x500000 or 0x40000 are reported. Warn about symbol resolution errors.
// Code duplicated in
TcfTrk
Adapter. @TODO: Hopefully fixed in future TRK versions.
// Code duplicated in
Coda
Adapter. @TODO: Hopefully fixed in future TRK versions.
if
((
m_session
.
codeseg
&
0xFFFFF
)
==
0
)
{
const
QString
warnMessage
=
tr
(
"The reported code segment address (0x%1) might be invalid. Symbol resolution or setting breakoints may not work."
).
arg
(
m_session
.
codeseg
,
0
,
16
);
...
...
src/plugins/qt4projectmanager/qt-s60/codaruncontrol.cpp
View file @
532a8ad2
...
...
@@ -36,8 +36,8 @@
#include "s60deployconfiguration.h"
#include "s60devicerunconfiguration.h"
#include "
tcftrk
device.h"
#include "
tcftrk
message.h"
#include "
coda
device.h"
#include "
coda
message.h"
#include "qt4buildconfiguration.h"
#include "qt4symbiantarget.h"
...
...
@@ -63,13 +63,13 @@
using
namespace
ProjectExplorer
;
using
namespace
Qt4ProjectManager
;
using
namespace
Qt4ProjectManager
::
Internal
;
using
namespace
tcftrk
;
using
namespace
Coda
;
enum
{
debug
=
0
};
CodaRunControl
::
CodaRunControl
(
RunConfiguration
*
runConfiguration
,
const
QString
&
mode
)
:
S60RunControlBase
(
runConfiguration
,
mode
),
m_
tcfTrk
Device
(
0
),
m_
coda
Device
(
0
),
m_port
(
0
),
m_state
(
StateUninit
)
{
...
...
@@ -91,8 +91,8 @@ CodaRunControl::CodaRunControl(RunConfiguration *runConfiguration, const QString
CodaRunControl
::~
CodaRunControl
()
{
if
(
m_
tcfTrk
Device
)
m_
tcfTrk
Device
->
deleteLater
();
if
(
m_
coda
Device
)
m_
coda
Device
->
deleteLater
();
}
bool
CodaRunControl
::
doStart
()
...
...
@@ -115,22 +115,22 @@ bool CodaRunControl::isRunning() const
bool
CodaRunControl
::
setupLauncher
()
{
QTC_ASSERT
(
!
m_
tcfTrk
Device
,
return
false
);
QTC_ASSERT
(
!
m_
coda
Device
,
return
false
);
m_
tcfTrk
Device
=
new
TcfTrk
Device
;
m_
coda
Device
=
new
Coda
Device
;
if
(
debug
)
m_
tcfTrk
Device
->
setVerbose
(
debug
);
m_
coda
Device
->
setVerbose
(
debug
);
connect
(
m_
tcfTrk
Device
,
SIGNAL
(
error
(
QString
)),
this
,
SLOT
(
slotError
(
QString
)));
connect
(
m_
tcfTrk
Device
,
SIGNAL
(
logMessage
(
QString
)),
this
,
SLOT
(
slotTrkLogMessage
(
QString
)));
connect
(
m_
tcfTrk
Device
,
SIGNAL
(
tcfEvent
(
tcftrk
::
TcfTrk
Event
)),
this
,
SLOT
(
slot
TcftrkEvent
(
tcftrk
::
TcfTrk
Event
)));
connect
(
m_
tcfTrk
Device
,
SIGNAL
(
serialPong
(
QString
)),
this
,
SLOT
(
slotSerialPong
(
QString
)));
connect
(
m_
coda
Device
,
SIGNAL
(
error
(
QString
)),
this
,
SLOT
(
slotError
(
QString
)));
connect
(
m_
coda
Device
,
SIGNAL
(
logMessage
(
QString
)),
this
,
SLOT
(
slotTrkLogMessage
(
QString
)));
connect
(
m_
coda
Device
,
SIGNAL
(
tcfEvent
(
Coda
::
Coda
Event
)),
this
,
SLOT
(
slot
CodaEvent
(
Coda
::
Coda
Event
)));
connect
(
m_
coda
Device
,
SIGNAL
(
serialPong
(
QString
)),
this
,
SLOT
(
slotSerialPong
(
QString
)));
if
(
m_serialPort
.
length
())
{
const
QSharedPointer
<
SymbianUtils
::
VirtualSerialDevice
>
serialDevice
(
new
SymbianUtils
::
VirtualSerialDevice
(
m_serialPort
));
appendMessage
(
tr
(
"Conecting to '%2'..."
).
arg
(
m_serialPort
),
NormalMessageFormat
);
m_
tcfTrk
Device
->
setSerialFrame
(
true
);
m_
tcfTrk
Device
->
setDevice
(
serialDevice
);
m_
coda
Device
->
setSerialFrame
(
true
);
m_
coda
Device
->
setDevice
(
serialDevice
);
bool
ok
=
serialDevice
->
open
(
QIODevice
::
ReadWrite
);
if
(
!
ok
)
{
appendMessage
(
tr
(
"Couldn't open serial device: %1"
).
arg
(
serialDevice
->
errorString
()),
ErrorMessageFormat
);
...
...
@@ -139,12 +139,12 @@ bool CodaRunControl::setupLauncher()
connect
(
SymbianUtils
::
SymbianDeviceManager
::
instance
(),
SIGNAL
(
deviceRemoved
(
const
SymbianUtils
::
SymbianDevice
)),
this
,
SLOT
(
deviceRemoved
(
SymbianUtils
::
SymbianDevice
)));
m_state
=
StateConnecting
;
m_
tcfTrk
Device
->
sendSerialPing
(
false
);
m_
coda
Device
->
sendSerialPing
(
false
);
QTimer
::
singleShot
(
4000
,
this
,
SLOT
(
checkForTimeout
()));
}
else
{
const
QSharedPointer
<
QTcpSocket
>
tcfTrk
Socket
(
new
QTcpSocket
);
m_
tcfTrk
Device
->
setDevice
(
tcfTrk
Socket
);
tcfTrk
Socket
->
connectToHost
(
m_address
,
m_port
);
const
QSharedPointer
<
QTcpSocket
>
coda
Socket
(
new
QTcpSocket
);
m_
coda
Device
->
setDevice
(
coda
Socket
);
coda
Socket
->
connectToHost
(
m_address
,
m_port
);
m_state
=
StateConnecting
;
appendMessage
(
tr
(
"Connecting to %1:%2..."
).
arg
(
m_address
).
arg
(
m_port
),
NormalMessageFormat
);
QTimer
::
singleShot
(
4000
,
this
,
SLOT
(
checkForTimeout
()));
...
...
@@ -162,7 +162,7 @@ void CodaRunControl::doStop()
break
;
case
StateProcessRunning
:
QTC_ASSERT
(
!
m_runningProcessId
.
isEmpty
(),
return
);
m_
tcfTrk
Device
->
sendRunControlTerminateCommand
(
TcfTrk
Callback
(),
m_
coda
Device
->
sendRunControlTerminateCommand
(
Coda
Callback
(),
m_runningProcessId
.
toAscii
());
break
;
}
...
...
@@ -187,34 +187,34 @@ void CodaRunControl::slotSerialPong(const QString &message)
qDebug
()
<<
"CODA serial pong:"
<<
message
;
}
void
CodaRunControl
::
slot
Tcftrk
Event
(
const
TcfTrk
Event
&
event
)
void
CodaRunControl
::
slot
Coda
Event
(
const
Coda
Event
&
event
)
{
if
(
debug
)
qDebug
()
<<
"CODA event:"
<<
"Type:"
<<
event
.
type
()
<<
"Message:"
<<
event
.
toString
();
switch
(
event
.
type
())
{
case
TcfTrk
Event
::
LocatorHello
:
{
// Commands accepted now
case
Coda
Event
::
LocatorHello
:
{
// Commands accepted now
m_state
=
StateConnected
;
appendMessage
(
tr
(
"Connected."
),
NormalMessageFormat
);
setProgress
(
maxProgress
()
*
0.80
);
initCommunication
();
}
break
;
case
TcfTrk
Event
::
RunControlContextRemoved
:
case
Coda
Event
::
RunControlContextRemoved
:
handleContextRemoved
(
event
);
break
;
case
TcfTrk
Event
::
RunControlContextAdded
:
case
Coda
Event
::
RunControlContextAdded
:
m_state
=
StateProcessRunning
;
reportLaunchFinished
();
handleContextAdded
(
event
);
break
;
case
TcfTrk
Event
::
RunControlSuspended
:
case
Coda
Event
::
RunControlSuspended
:
handleContextSuspended
(
event
);
break
;
case
TcfTrk
Event
::
RunControlModuleLoadSuspended
:
case
Coda
Event
::
RunControlModuleLoadSuspended
:
handleModuleLoadSuspended
(
event
);
break
;
case
TcfTrk
Event
::
LoggingWriteEvent
:
case
Coda
Event
::
LoggingWriteEvent
:
handleLogging
(
event
);
break
;
default:
...
...
@@ -226,13 +226,13 @@ void CodaRunControl::slotTcftrkEvent(const TcfTrkEvent &event)
void
CodaRunControl
::
initCommunication
()
{
m_
tcfTrk
Device
->
sendLoggingAddListenerCommand
(
TcfTrk
Callback
(
this
,
&
CodaRunControl
::
handleAddListener
));
m_
coda
Device
->
sendLoggingAddListenerCommand
(
Coda
Callback
(
this
,
&
CodaRunControl
::
handleAddListener
));
}
void
CodaRunControl
::
handleContextRemoved
(
const
TcfTrk
Event
&
event
)
void
CodaRunControl
::
handleContextRemoved
(
const
Coda
Event
&
event
)
{
const
QVector
<
QByteArray
>
removedItems
=
static_cast
<
const
TcfTrk
RunControlContextRemovedEvent
&>
(
event
).
ids
();
=
static_cast
<
const
Coda
RunControlContextRemovedEvent
&>
(
event
).
ids
();
if
(
!
m_runningProcessId
.
isEmpty
()
&&
removedItems
.
contains
(
m_runningProcessId
.
toAscii
()))
{
appendMessage
(
tr
(
"Process has finished."
),
NormalMessageFormat
);
...
...
@@ -240,9 +240,9 @@ void CodaRunControl::handleContextRemoved(const TcfTrkEvent &event)
}
}
void
CodaRunControl
::
handleContextAdded
(
const
TcfTrk
Event
&
event
)
void
CodaRunControl
::
handleContextAdded
(
const
Coda
Event
&
event
)
{
typedef
TcfTrk
RunControlContextAddedEvent
TcfAddedEvent
;
typedef
Coda
RunControlContextAddedEvent
TcfAddedEvent
;
const
TcfAddedEvent
&
me
=
static_cast
<
const
TcfAddedEvent
&>
(
event
);
foreach
(
const
RunControlContext
&
context
,
me
.
contexts
())
{
...
...
@@ -251,9 +251,9 @@ void CodaRunControl::handleContextAdded(const TcfTrkEvent &event)
}
}
void
CodaRunControl
::
handleContextSuspended
(
const
TcfTrk
Event
&
event
)
void
CodaRunControl
::
handleContextSuspended
(
const
Coda
Event
&
event
)
{
typedef
TcfTrk
RunControlContextSuspendedEvent
TcfSuspendEvent
;
typedef
Coda
RunControlContextSuspendedEvent
TcfSuspendEvent
;
const
TcfSuspendEvent
&
me
=
static_cast
<
const
TcfSuspendEvent
&>
(
event
);
...
...
@@ -262,7 +262,7 @@ void CodaRunControl::handleContextSuspended(const TcfTrkEvent &event)
appendMessage
(
tr
(
"Thread has crashed: %1"
).
arg
(
QString
::
fromLatin1
(
me
.
message
())),
ErrorMessageFormat
);
//If we get a crash report then we display it and stop the process.
//Now sure if this should be the final solution but it works for now.
//m_
tcfTrk
Device->sendRunControlResumeCommand(
TcfTrk
Callback(), me.id()); //TODO: Should I resume automaticly
//m_
coda
Device->sendRunControlResumeCommand(
Coda
Callback(), me.id()); //TODO: Should I resume automaticly
stop
();
break
;
default:
...
...
@@ -272,31 +272,31 @@ void CodaRunControl::handleContextSuspended(const TcfTrkEvent &event)
}
}
void
CodaRunControl
::
handleModuleLoadSuspended
(
const
TcfTrk
Event
&
event
)
void
CodaRunControl
::
handleModuleLoadSuspended
(
const
Coda
Event
&
event
)
{
// Debug mode start: Continue:
typedef
TcfTrk
RunControlModuleLoadContextSuspendedEvent
TcfModuleLoadSuspendedEvent
;
typedef
Coda
RunControlModuleLoadContextSuspendedEvent
TcfModuleLoadSuspendedEvent
;
const
TcfModuleLoadSuspendedEvent
&
me
=
static_cast
<
const
TcfModuleLoadSuspendedEvent
&>
(
event
);
if
(
me
.
info
().
requireResume
)
m_
tcfTrk
Device
->
sendRunControlResumeCommand
(
TcfTrk
Callback
(),
me
.
id
());
m_
coda
Device
->
sendRunControlResumeCommand
(
Coda
Callback
(),
me
.
id
());
}
void
CodaRunControl
::
handleLogging
(
const
TcfTrk
Event
&
event
)
void
CodaRunControl
::
handleLogging
(
const
Coda
Event
&
event
)
{
const
TcfTrk
LoggingWriteEvent
&
me
=
static_cast
<
const
TcfTrk
LoggingWriteEvent
&>
(
event
);
const
Coda
LoggingWriteEvent
&
me
=
static_cast
<
const
Coda
LoggingWriteEvent
&>
(
event
);
appendMessage
(
me
.
message
(),
StdOutFormat
);
}
void
CodaRunControl
::
handleAddListener
(
const
TcfTrk
CommandResult
&
result
)
void
CodaRunControl
::
handleAddListener
(
const
Coda
CommandResult
&
result
)
{
Q_UNUSED
(
result
)
m_
tcfTrk
Device
->
sendSymbianOsDataFindProcessesCommand
(
TcfTrk
Callback
(
this
,
&
CodaRunControl
::
handleFindProcesses
),
m_
coda
Device
->
sendSymbianOsDataFindProcessesCommand
(
Coda
Callback
(
this
,
&
CodaRunControl
::
handleFindProcesses
),
QByteArray
(),
QByteArray
::
number
(
executableUid
(),
16
));
}
void
CodaRunControl
::
handleFindProcesses
(
const
TcfTrk
CommandResult
&
result
)
void
CodaRunControl
::
handleFindProcesses
(
const
Coda
CommandResult
&
result
)
{
if
(
result
.
values
.
size
()
&&
result
.
values
.
at
(
0
).
type
()
==
JsonValue
::
Array
&&
result
.
values
.
at
(
0
).
children
().
count
())
{
//there are processes running. Cannot run mine
...
...
@@ -304,15 +304,15 @@ void CodaRunControl::handleFindProcesses(const TcfTrkCommandResult &result)
finishRunControl
();
}
else
{
setProgress
(
maxProgress
()
*
0.90
);
m_
tcfTrk
Device
->
sendProcessStartCommand
(
TcfTrk
Callback
(
this
,
&
CodaRunControl
::
handleCreateProcess
),
m_
coda
Device
->
sendProcessStartCommand
(
Coda
Callback
(
this
,
&
CodaRunControl
::
handleCreateProcess
),
executableName
(),
executableUid
(),
commandLineArguments
().
split
(
" "
),
QString
(),
true
);
appendMessage
(
tr
(
"Launching: %1"
).
arg
(
executableName
()),
NormalMessageFormat
);
}
}
void
CodaRunControl
::
handleCreateProcess
(
const
TcfTrk
CommandResult
&
result
)
void
CodaRunControl
::
handleCreateProcess
(
const
Coda
CommandResult
&
result
)
{
const
bool
ok
=
result
.
type
==
TcfTrk
CommandResult
::
SuccessReply
;
const
bool
ok
=
result
.
type
==
Coda
CommandResult
::
SuccessReply
;
if
(
ok
)
{
setProgress
(
maxProgress
());
appendMessage
(
tr
(
"Launched."
),
NormalMessageFormat
);
...
...
@@ -325,9 +325,9 @@ void CodaRunControl::handleCreateProcess(const TcfTrkCommandResult &result)
void
CodaRunControl
::
finishRunControl
()
{
m_runningProcessId
.
clear
();
if
(
m_
tcfTrk
Device
)
m_
tcfTrk
Device
->
deleteLater
();
m_
tcfTrk
Device
=
0
;
if
(
m_
coda
Device
)
m_
coda
Device
->
deleteLater
();
m_
coda
Device
=
0
;
m_state
=
StateUninit
;
emit
finished
();
}
...
...
@@ -366,7 +366,7 @@ void CodaRunControl::cancelConnection()
void
CodaRunControl
::
deviceRemoved
(
const
SymbianUtils
::
SymbianDevice
&
device
)
{
if
(
m_
tcfTrk
Device
&&
device
.
portName
()
==
m_serialPort
)
{
if
(
m_
coda
Device
&&
device
.
portName
()
==
m_serialPort
)
{
QString
msg
=
tr
(
"The device '%1' has been disconnected"
).
arg
(
device
.
friendlyName
());
appendMessage
(
msg
,
ErrorMessageFormat
);
finishRunControl
();
...
...
src/plugins/qt4projectmanager/qt-s60/codaruncontrol.h
View file @
532a8ad2
...
...
@@ -41,10 +41,10 @@ class QMessageBox;
class
QWidget
;
QT_END_NAMESPACE
namespace
tcftrk
{
struct
TcfTrk
CommandResult
;
class
TcfTrk
Device
;
class
TcfTrk
Event
;
namespace
Coda
{
struct
Coda
CommandResult
;
class
Coda
Device
;
class
Coda
Event
;
}
namespace
SymbianUtils
{
...
...
@@ -54,7 +54,7 @@ class SymbianDevice;
namespace
Qt4ProjectManager
{
namespace
Internal
{
// CodaRunControl configures
tcftrk
to run the application
// CodaRunControl configures
Coda
to run the application
class
CodaRunControl
:
public
S60RunControlBase
{
Q_OBJECT
...
...
@@ -79,22 +79,22 @@ protected slots:
private
slots
:
void
slotError
(
const
QString
&
error
);
void
slotTrkLogMessage
(
const
QString
&
log
);
void
slot
Tcftrk
Event
(
const
tcftrk
::
TcfTrk
Event
&
event
);
void
slot
Coda
Event
(
const
Coda
::
Coda
Event
&
event
);
void
slotSerialPong
(
const
QString
&
message
);
private:
void
initCommunication
();
void
handleModuleLoadSuspended
(
const
tcftrk
::
TcfTrk
Event
&
event
);
void
handleContextSuspended
(
const
tcftrk
::
TcfTrk
Event
&
event
);
void
handleContextAdded
(
const
tcftrk
::
TcfTrk
Event
&
event
);
void
handleContextRemoved
(
const
tcftrk
::
TcfTrk
Event
&
event
);
void
handleLogging
(
const
tcftrk
::
TcfTrk
Event
&
event
);
void
handleModuleLoadSuspended
(
const
Coda
::
Coda
Event
&
event
);
void
handleContextSuspended
(
const
Coda
::
Coda
Event
&
event
);
void
handleContextAdded
(
const
Coda
::
Coda
Event
&
event
);
void
handleContextRemoved
(
const
Coda
::
Coda
Event
&
event
);
void
handleLogging
(
const
Coda
::
Coda
Event
&
event
);
private:
void
handleCreateProcess
(
const
tcftrk
::
TcfTrk
CommandResult
&
result
);
void
handleAddListener
(
const
tcftrk
::
TcfTrk
CommandResult
&
result
);
void
handleFindProcesses
(
const
tcftrk
::
TcfTrk
CommandResult
&
result
);
void
handleCreateProcess
(
const
Coda
::
Coda
CommandResult
&
result
);
void
handleAddListener
(
const
Coda
::
Coda
CommandResult
&
result
);
void
handleFindProcesses
(
const
Coda
::
Coda
CommandResult
&
result
);
private:
enum
State
{
...
...
@@ -104,7 +104,7 @@ private:
StateProcessRunning
};
tcftrk
::
TcfTrk
Device
*
m_
tcfTrk
Device
;
Coda
::
Coda
Device
*
m_
coda
Device
;
QString
m_address
;
unsigned
short
m_port
;
...
...
src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp
View file @
532a8ad2
...
...
@@ -37,7 +37,7 @@
#include "s60deployconfiguration.h"
#include "s60devicerunconfiguration.h"
#include "s60runconfigbluetoothstarter.h"
#include "
tcftrk
device.h"
#include "
coda
device.h"
#include "trkruncontrol.h"
#include <coreplugin/icore.h>
...
...
@@ -295,7 +295,7 @@ void S60DeployStep::start()
}
if
(
!
trkClient
)
{
QTC_ASSERT
(
!
m_trkDevice
,
return
);
m_trkDevice
=
new
tcftrk
::
TcfTrk
Device
;
m_trkDevice
=
new
Coda
::
Coda
Device
;
if
(
m_address
.
isEmpty
()
&&
!
serialConnection
)
{
errorMessage
=
tr
(
"No address for a device has been defined. Please define an address and try again."
);
reportError
(
errorMessage
);
...
...
@@ -347,7 +347,7 @@ void S60DeployStep::setupConnections()
}
else
{
connect
(
m_trkDevice
,
SIGNAL
(
error
(
QString
)),
this
,
SLOT
(
slotError
(
QString
)));
connect
(
m_trkDevice
,
SIGNAL
(
logMessage
(
QString
)),
this
,
SLOT
(
slotTrkLogMessage
(
QString
)));
connect
(
m_trkDevice
,
SIGNAL
(
tcfEvent
(
tcftrk
::
TcfTrk
Event
)),
this
,
SLOT
(
slot
TcftrkEvent
(
tcftrk
::
TcfTrk
Event
)),
Qt
::
DirectConnection
);
connect
(
m_trkDevice
,
SIGNAL
(
tcfEvent
(
Coda
::
Coda
Event
)),
this
,
SLOT
(
slot
CodaEvent
(
Coda
::
Coda
Event
)),
Qt
::
DirectConnection
);
connect
(
m_trkDevice
,
SIGNAL
(
serialPong
(
QString
)),
this
,
SLOT
(
slotSerialPong
(
QString
)));
connect
(
this
,
SIGNAL
(
manualInstallation
()),
this
,
SLOT
(
showManualInstallationInfo
()));
}
...
...
@@ -400,9 +400,9 @@ void S60DeployStep::startDeployment()
m_trkDevice
->
sendSerialPing
(
false
);
QTimer
::
singleShot
(
4000
,
this
,
SLOT
(
checkForTimeout
()));
}
else
{
const
QSharedPointer
<
QTcpSocket
>
tcfTrk
Socket
(
new
QTcpSocket
);
m_trkDevice
->
setDevice
(
tcfTrk
Socket
);
tcfTrk
Socket
->
connectToHost
(
m_address
,
m_port
);
const
QSharedPointer
<
QTcpSocket
>
coda
Socket
(
new
QTcpSocket
);
m_trkDevice
->
setDevice
(
coda
Socket
);
coda
Socket
->
connectToHost
(
m_address
,
m_port
);
m_state
=
StateConnecting
;
appendMessage
(
tr
(
"Connecting to %1:%2..."
).
arg
(
m_address
).
arg
(
m_port
),
false
);
QTimer
::
singleShot
(
4000
,
this
,
SLOT
(
checkForTimeout
()));
...
...
@@ -466,13 +466,13 @@ void S60DeployStep::slotSerialPong(const QString &message)
qDebug
()
<<
"CODA serial pong:"
<<
message
;
}
void
S60DeployStep
::
slot
Tcftrk
Event
(
const
tcftrk
::
TcfTrk
Event
&
event
)
void
S60DeployStep
::
slot
Coda
Event
(
const
Coda
::
Coda
Event
&
event
)
{
if
(
debug
)
qDebug
()
<<
"CODA event:"
<<
"Type:"
<<
event
.
type
()
<<
"Message:"
<<
event
.
toString
();
switch
(
event
.
type
())
{
case
tcftrk
::
TcfTrk
Event
::
LocatorHello
:
{
// Commands accepted now
case
Coda
::
Coda
Event
::
LocatorHello
:
{
// Commands accepted now
m_state
=
StateConnected
;
emit
codaConnected
();
startTransferring
();
...
...
@@ -491,14 +491,14 @@ void S60DeployStep::initFileSending()
QTC_ASSERT
(
m_currentFileIndex
>=
0
,
return
);
const
unsigned
flags
=
tcftrk
::
TcfTrk
Device
::
FileSystem_TCF_O_WRITE
|
tcftrk
::
TcfTrk
Device
::
FileSystem_TCF_O_CREAT
|
tcftrk
::
TcfTrk
Device
::
FileSystem_TCF_O_TRUNC
;
Coda
::
Coda
Device
::
FileSystem_TCF_O_WRITE
|
Coda
::
Coda
Device
::
FileSystem_TCF_O_CREAT
|
Coda
::
Coda
Device
::
FileSystem_TCF_O_TRUNC
;
m_putWriteOk
=
false
;
QString
packageName
(
QFileInfo
(
m_signedPackages
.
at
(
m_currentFileIndex
)).
fileName
());
QString
remoteFileLocation
=
QString
::
fromLatin1
(
"%1:
\\
Data
\\
%2"
).
arg
(
m_installationDrive
).
arg
(
packageName
);
m_trkDevice
->
sendFileSystemOpenCommand
(
tcftrk
::
TcfTrk
Callback
(
this
,
&
S60DeployStep
::
handleFileSystemOpen
),
m_trkDevice
->
sendFileSystemOpenCommand
(
Coda
::
Coda
Callback
(
this
,
&
S60DeployStep
::
handleFileSystemOpen
),
remoteFileLocation
.
toAscii
(),
flags
);
appendMessage
(
tr
(
"Copying
\"
%1
\"
..."
).
arg
(
packageName
),
false
);
}
...
...
@@ -511,11 +511,11 @@ void S60DeployStep::initFileInstallation()
QString
packageName
(
QFileInfo
(
m_signedPackages
.
at
(
m_currentFileIndex
)).
fileName
());
QString
remoteFileLocation
=
QString
::
fromLatin1
(
"%1:
\\
Data
\\
%2"
).
arg
(
m_installationDrive
).
arg
(
packageName
);