Quotation mark prints at the end of string

  • I am porting my application to Qt 5.5.1 from 5.2.1 and with the switch to the newer version, all the log entries printed by my application started to print with a quotation mark at the end of each line. This never happened with Qt 5.2.1. I noticed that the function tr() is causing it because if I remove tr and use the string without translation the text prints correctly.

    Here's an example:

    qWarning() << "!i" << tr("Emulation stopped.");

    This produces: Emulation stopped" in my log (notice the quotation mark at the end). If i don't wrap the string with tr() no quotation mark is printed.

    Does anyone know if this is a bug with Qt or am I doing something wrong?

  • @a8wz


    You can enable the noquote() functionality. This function was introduced in Qt 5.4.

    eg. qWarning().noquote() << "!i" << tr("Emulation stopped.");

  • Thank you, I will try that.

  • @Devopia53 Thank you this solution worked beautifully, no more quotes at the end of strings.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.