Fixes for QML debugging over USB OST

This commit is contained in:
Tom Sutcliffe
2011-03-23 16:02:22 +00:00
committed by Kai Koehne
parent 48fef07a08
commit 9e0a51bf8c
3 changed files with 11 additions and 7 deletions

View File

@@ -300,9 +300,9 @@ void QmlEngine::filterApplicationMessage(const QString &msg, int /*channel*/)
QString status = msg; QString status = msg;
status.remove(0, index + qddserver.length()); // chop of 'QDeclarativeDebugServer: ' status.remove(0, index + qddserver.length()); // chop of 'QDeclarativeDebugServer: '
static QString waitingForConnection = QLatin1String("Waiting for connection on port"); static QString waitingForConnection = QLatin1String("Waiting for connection ");
static QString unableToListen = QLatin1String("Unable to listen on port"); static QString unableToListen = QLatin1String("Unable to listen ");
static QString debuggingNotEnabled = QLatin1String("Ignoring \"-qmljsdebugger=port:"); static QString debuggingNotEnabled = QLatin1String("Ignoring \"-qmljsdebugger=");
static QString connectionEstablished = QLatin1String("Connection established"); static QString connectionEstablished = QLatin1String("Connection established");
QString errorMessage; QString errorMessage;

View File

@@ -470,7 +470,10 @@ static Debugger::DebuggerStartParameters s60DebuggerStartParams(const S60DeviceR
if (rc->useQmlDebugger()) { if (rc->useQmlDebugger()) {
if (sp.processArgs.length()) if (sp.processArgs.length())
sp.processArgs.prepend(" "); sp.processArgs.prepend(" ");
sp.processArgs.prepend(QString("-qmljsdebugger=port:%1").arg(sp.qmlServerPort)); if (activeDeployConf->communicationChannel() == S60DeployConfiguration::CommunicationCodaTcpConnection)
sp.processArgs.prepend(QString("-qmljsdebugger=port:%1").arg(sp.qmlServerPort));
else
sp.processArgs.prepend(QString("-qmljsdebugger=ost"));
} }
sp.communicationChannel = activeDeployConf->communicationChannel() == S60DeployConfiguration::CommunicationCodaTcpConnection? sp.communicationChannel = activeDeployConf->communicationChannel() == S60DeployConfiguration::CommunicationCodaTcpConnection?

View File

@@ -699,11 +699,12 @@ qint64 OstChannel::writeData(const char *data, qint64 maxSize)
{ {
static const qint64 KMaxOstPayload = 1024; static const qint64 KMaxOstPayload = 1024;
// If necessary, split the packet up // If necessary, split the packet up
while (maxSize) { qint64 remainder = maxSize;
QByteArray dataBuf = QByteArray::fromRawData(data, qMin(KMaxOstPayload, maxSize)); while (remainder) {
QByteArray dataBuf = QByteArray::fromRawData(data, qMin(KMaxOstPayload, remainder));
d->m_codaPtr->writeCustomData(d->m_channelId, dataBuf); d->m_codaPtr->writeCustomData(d->m_channelId, dataBuf);
data += dataBuf.length(); data += dataBuf.length();
maxSize -= dataBuf.length(); remainder -= dataBuf.length();
} }
return maxSize; return maxSize;
} }