Changeset 8203 in ntrip for trunk/BNC/src/bncnetqueryrtp.cpp


Ignore:
Timestamp:
Dec 11, 2017, 2:42:03 PM (6 years ago)
Author:
stoecker
Message:

see #105 - some changes for Qt5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncnetqueryrtp.cpp

    r6787 r8203  
    4848  if (_socket) {
    4949    QByteArray reqStr = "TEARDOWN " + _url.toEncoded() + " RTSP/1.0\r\n"
    50                       + "CSeq: " + QString("%1").arg(++_CSeq).toAscii() + "\r\n"
     50                      + "CSeq: " + QString("%1").arg(++_CSeq).toLatin1() + "\r\n"
    5151                      + "Session: " + _session + "\r\n"
    5252                      + "\r\n";
     
    6060  if (_socket) {
    6161    QByteArray reqStr = "GET_PARAMETER " + _url.toEncoded() + " RTSP/1.0\r\n"
    62                       + "CSeq: " + QString("%1").arg(++_CSeq).toAscii() + "\r\n"
     62                      + "CSeq: " + QString("%1").arg(++_CSeq).toLatin1() + "\r\n"
    6363                      + "Session: " + _session + "\r\n"
    6464                      + "\r\n";
     
    126126  // --------------
    127127  if (_socket->waitForConnected(timeOut)) {
    128     QString uName = QUrl::fromPercentEncoding(_url.userName().toAscii());
    129     QString passW = QUrl::fromPercentEncoding(_url.password().toAscii());
     128    QString uName = QUrl::fromPercentEncoding(_url.userName().toLatin1());
     129    QString passW = QUrl::fromPercentEncoding(_url.password().toLatin1());
    130130    QByteArray userAndPwd;
    131131   
    132132    if(!uName.isEmpty() || !passW.isEmpty()) {
    133       userAndPwd = "Authorization: Basic " + (uName.toAscii() + ":" +
    134       passW.toAscii()).toBase64() + "\r\n";
     133      userAndPwd = "Authorization: Basic " + (uName.toLatin1() + ":" +
     134      passW.toLatin1()).toBase64() + "\r\n";
    135135    }
    136136
     
    141141    _udpSocket->bind(0);
    142142    connect(_udpSocket, SIGNAL(readyRead()), _eventLoop, SLOT(quit()));
    143     QByteArray clientPort = QString("%1").arg(_udpSocket->localPort()).toAscii();
     143    QByteArray clientPort = QString("%1").arg(_udpSocket->localPort()).toLatin1();
    144144
    145145    QByteArray reqStr;
    146146    reqStr = "SETUP " + _url.toEncoded() + " RTSP/1.0\r\n"
    147            + "CSeq: " + QString("%1").arg(++_CSeq).toAscii() + "\r\n"
     147           + "CSeq: " + QString("%1").arg(++_CSeq).toLatin1() + "\r\n"
    148148           + "Ntrip-Version: Ntrip/2.0\r\n"
    149149           + "Ntrip-Component: Ntripclient\r\n"
     
    167167        while (!line.isEmpty()) {
    168168          if (line.indexOf("Session:") == 0) {
    169             _session = line.mid(9).toAscii();
     169            _session = line.mid(9).toLatin1();
    170170          }
    171171          int iSrv = line.indexOf("server_port=");
    172172          if (iSrv != -1) {
    173             serverPort = line.mid(iSrv+12).toAscii();
     173            serverPort = line.mid(iSrv+12).toLatin1();
    174174          }
    175175          line = in.readLine();
     
    203203
    204204          reqStr = "PLAY " + _url.toEncoded() + " RTSP/1.0\r\n"
    205                  + "CSeq: " + QString("%1").arg(++_CSeq).toAscii() + "\r\n"
     205                 + "CSeq: " + QString("%1").arg(++_CSeq).toLatin1() + "\r\n"
    206206                 + "Session: " + _session + "\r\n"
    207207                 + "\r\n";
Note: See TracChangeset for help on using the changeset viewer.