Changeset - bebcb9e3daf2
[Not reviewed]
default
0 1 0
Hasan Yavuz Ă–ZDERYA - 10 years ago 2016-05-03 16:11:51
hy@ozderya.net
show sent command name in the log
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/commandwidget.cpp
Show inline comments
 
@@ -60,25 +60,25 @@ void CommandWidget::onSendClicked()
 
{
 
    auto command = ui->leCommand->text();
 

	
 
    if (command.isEmpty())
 
    {
 
        qWarning() << "Enter a command to send!";
 
        ui->leCommand->setFocus(Qt::OtherFocusReason);
 
        return;
 
    }
 

	
 
    if (isASCIIMode())
 
    {
 
        qDebug() << "Sending:" << command;
 
        qDebug() << "Sending " << name() << ":" << command;
 
        emit sendCommand(ui->leCommand->unEscapedText().toLatin1());
 
    }
 
    else // hex mode
 
    {
 
        command = command.remove(' ');
 
        // check if nibbles are missing
 
        if (command.size() % 2 == 1)
 
        {
 
            qWarning() << "HEX command is missing a nibble at the end!";
 
            ui->leCommand->setFocus(Qt::OtherFocusReason);
 
            // highlight the byte that is missing a nibble (last byte obviously)
 
            int textSize = ui->leCommand->text().size();
0 comments (0 inline, 0 general)