Commit 9e0a51bf authored by Tom Sutcliffe's avatar Tom Sutcliffe Committed by Kai Koehne
Browse files

Fixes for QML debugging over USB OST

parent 48fef07a
......@@ -300,9 +300,9 @@ void QmlEngine::filterApplicationMessage(const QString &msg, int /*channel*/)
QString status = msg;
status.remove(0, index + qddserver.length()); // chop of 'QDeclarativeDebugServer: '
static QString waitingForConnection = QLatin1String("Waiting for connection on port");
static QString unableToListen = QLatin1String("Unable to listen on port");
static QString debuggingNotEnabled = QLatin1String("Ignoring \"-qmljsdebugger=port:");
static QString waitingForConnection = QLatin1String("Waiting for connection ");
static QString unableToListen = QLatin1String("Unable to listen ");
static QString debuggingNotEnabled = QLatin1String("Ignoring \"-qmljsdebugger=");
static QString connectionEstablished = QLatin1String("Connection established");
QString errorMessage;
......
......@@ -470,7 +470,10 @@ static Debugger::DebuggerStartParameters s60DebuggerStartParams(const S60DeviceR
if (rc->useQmlDebugger()) {
if (sp.processArgs.length())
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?
......
......@@ -699,11 +699,12 @@ qint64 OstChannel::writeData(const char *data, qint64 maxSize)
{
static const qint64 KMaxOstPayload = 1024;
// If necessary, split the packet up
while (maxSize) {
QByteArray dataBuf = QByteArray::fromRawData(data, qMin(KMaxOstPayload, maxSize));
qint64 remainder = maxSize;
while (remainder) {
QByteArray dataBuf = QByteArray::fromRawData(data, qMin(KMaxOstPayload, remainder));
d->m_codaPtr->writeCustomData(d->m_channelId, dataBuf);
data += dataBuf.length();
maxSize -= dataBuf.length();
remainder -= dataBuf.length();
}
return maxSize;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment