mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 09:36:46 +00:00
Fix some things on the console and start implementing the transfer.
This commit is contained in:
@@ -105,9 +105,23 @@ void ConsoleWindow::cmdSendClicked()
|
||||
|
||||
QString res;
|
||||
g_FSHost.sendCmd(cmd.toAscii().data(), args.toAscii().data(), &res);
|
||||
QStandardItem *item = new QStandardItem(res);
|
||||
item->setData(SWITCH_LOG_CONSOLE, ConsoleModel::LogLevelRole);
|
||||
addNewConsoleItem(item);
|
||||
if (!res.isEmpty())
|
||||
{
|
||||
/* Remove \r\n */
|
||||
QStringList textList = res.split(QRegExp("(\r+)"), QString::SkipEmptyParts);
|
||||
QString final_str;
|
||||
for (int line = 0; line<textList.size(); line++)
|
||||
{
|
||||
final_str += textList[line];
|
||||
}
|
||||
QStringList lines = final_str.split(QRegExp("(\n+)"), QString::SkipEmptyParts);
|
||||
for (int line = 0; line < lines.size(); ++line)
|
||||
{
|
||||
QStandardItem *item = new QStandardItem(lines[line]);
|
||||
item->setData(SWITCH_LOG_CONSOLE, ConsoleModel::LogLevelRole);
|
||||
addNewConsoleItem(item);
|
||||
}
|
||||
}
|
||||
ui->lineCmd->clear();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user