I'm using Qt 5.15.2, I have the following code:
QByteArray arybytData = mpsckIncoming->readAll();
bool blnHTTP = false;
if ( arybytData.startsWith("GET / HTTP/") == true ) {
//HTTP Request, probably from browser, jump to end of header
const QString cstrHeaderTerminator("\r\n\r\n");
int intHdrEnd;
if ( (intHdrEnd = arybytData.indexOf(cstrHeaderTerminator)) == -1 ) {
The line using QByteArray::indexOf() has the text:
'indexOf' is deprecated: Use QString's toUtf8(), toLatin1() or toLocal8Bit()
I don't understand this since none of the suggested functions are anything like the function of QByteArrray::indexOf().
Should I just ignore it?
I'm using:
Qt Creator 4.14.0
Based on Qt 5.15.2 (Clang 11.0 (Apple), 64 bit)
Built on Dec 17 2020 07:57:30
From revision 909f74dc56