Blitzor DDD
15th August 2016, 16:20
Hello!
I am trying to dissect a program and got stuck with one function:
void SerialPortHandler::sendTrackPause()
{
// qDebug() << "sendTrackPause";
QByteArray byteArr;
QDataStream out(&byteArr, QIODevice::WriteOnly);
out << ActionType::Track << TrackType::Pause << '\n';
serial->write(byteArr);
}
serial is an object of QSerialPort.
This function clearly pauses a player.
But what's going on under the hood?
For what sake do we need QByteArray and QDataStream?
I am trying to dissect a program and got stuck with one function:
void SerialPortHandler::sendTrackPause()
{
// qDebug() << "sendTrackPause";
QByteArray byteArr;
QDataStream out(&byteArr, QIODevice::WriteOnly);
out << ActionType::Track << TrackType::Pause << '\n';
serial->write(byteArr);
}
serial is an object of QSerialPort.
This function clearly pauses a player.
But what's going on under the hood?
For what sake do we need QByteArray and QDataStream?