Fix build on CI for Windows

This commit is contained in:
Albert Vaca Cintora 2019-03-14 12:37:16 +01:00
parent f5724f7e7c
commit d72e4a1131

View file

@ -153,13 +153,13 @@ int main(int argc, char** argv)
//Description: "device name (paired/unpaired)"
QString description = deviceIface.name() + " " + statusInfo;
//Replace characters
description.replace('\\', "\\\\");
description.replace('[', "\\[");
description.replace(']', "\\]");
description.replace('\'', "\\'");
description.replace('\"', "\\\"");
description.replace('\n', ' ');
description.replace('\0', "");
description.replace(QChar('\\'), QStringLiteral("\\\\"));
description.replace(QChar('['), QStringLiteral("\\["));
description.replace(QChar(']'), QStringLiteral("\\]"));
description.replace(QChar('\''), QStringLiteral("\\'"));
description.replace(QChar('\"'), QStringLiteral("\\\""));
description.replace(QChar('\n'), QChar(' '));
description.remove(QChar('\0'));
//Output id and description
QTextStream(stdout) << id << '[' << description << ']' << endl;