Changeset 8203 in ntrip for trunk/BNC/src/bncnetqueryv1.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/bncnetqueryv1.cpp

    r6787 r8203  
    9191        _socket = 0;
    9292        _status = error;
    93         emit newMessage(_url.path().toAscii().replace(0,1,"")
    94                         + ": " + errStr.toAscii(), true);
     93        emit newMessage(_url.path().toLatin1().replace(0,1,"")
     94                        + ": " + errStr.toLatin1(), true);
    9595        return;
    9696      }
     
    157157     _socket = 0;
    158158     _status = error;
    159      emit newMessage(_url.path().toAscii().replace(0,1,"")
     159     emit newMessage(_url.path().toLatin1().replace(0,1,"")
    160160                     + ": Write timeout", true);
    161161     return;
     
    208208  // Send Request
    209209  // ------------
    210   QString uName = QUrl::fromPercentEncoding(_url.userName().toAscii());
    211   QString passW = QUrl::fromPercentEncoding(_url.password().toAscii());
     210  QString uName = QUrl::fromPercentEncoding(_url.userName().toLatin1());
     211  QString passW = QUrl::fromPercentEncoding(_url.password().toLatin1());
    212212  QByteArray userAndPwd;
    213213
    214214  if(!uName.isEmpty() || !passW.isEmpty()) {
    215     userAndPwd = "Authorization: Basic " + (uName.toAscii() + ":" +
    216     passW.toAscii()).toBase64() + "\r\n";
     215    userAndPwd = "Authorization: Basic " + (uName.toLatin1() + ":" +
     216    passW.toLatin1()).toBase64() + "\r\n";
    217217  }
    218218
     
    220220  if ( proxyHost.isEmpty() ) {
    221221    if (_url.path().indexOf("/") != 0) _url.setPath("/");
    222     reqStr = "GET " + _url.path().toAscii() + " HTTP/1.0\r\n"
     222    reqStr = "GET " + _url.path().toLatin1() + " HTTP/1.0\r\n"
    223223             + "User-Agent: NTRIP BNC/" BNCVERSION " (" BNC_OS ")\r\n"
    224              + "Host: " + _url.host().toAscii() + "\r\n"
     224             + "Host: " + _url.host().toLatin1() + "\r\n"
    225225             + userAndPwd + "\r\n";
    226226  } else {
    227227    reqStr = "GET " + _url.toEncoded() + " HTTP/1.0\r\n"
    228228             + "User-Agent: NTRIP BNC/" BNCVERSION " (" BNC_OS ")\r\n"
    229              + "Host: " + _url.host().toAscii() + "\r\n"
     229             + "Host: " + _url.host().toLatin1() + "\r\n"
    230230             + userAndPwd + "\r\n";
    231231  }
     
    243243    _socket = 0;
    244244    _status = error;
    245     emit newMessage(_url.path().toAscii().replace(0,1,"")
     245    emit newMessage(_url.path().toLatin1().replace(0,1,"")
    246246                    + ": Write timeout", true);
    247247    return;
     
    294294        _socket = 0;
    295295        _status = error;
    296         emit newMessage(_url.path().toAscii().replace(0,1,"")
     296        emit newMessage(_url.path().toLatin1().replace(0,1,"")
    297297                        + ": Response timeout", true);
    298298        return;
     
    303303      _socket = 0;
    304304      _status = error;
    305       emit newMessage(_url.path().toAscii().replace(0,1,"")
     305      emit newMessage(_url.path().toLatin1().replace(0,1,"")
    306306                      + ": Wrong caster response\n"
    307                       + response.join("").toAscii(), true);
     307                      + response.join("").toLatin1(), true);
    308308    }
    309309  }
Note: See TracChangeset for help on using the changeset viewer.