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)" //Description: "device name (paired/unpaired)"
QString description = deviceIface.name() + " " + statusInfo; QString description = deviceIface.name() + " " + statusInfo;
//Replace characters //Replace characters
description.replace('\\', "\\\\"); description.replace(QChar('\\'), QStringLiteral("\\\\"));
description.replace('[', "\\["); description.replace(QChar('['), QStringLiteral("\\["));
description.replace(']', "\\]"); description.replace(QChar(']'), QStringLiteral("\\]"));
description.replace('\'', "\\'"); description.replace(QChar('\''), QStringLiteral("\\'"));
description.replace('\"', "\\\""); description.replace(QChar('\"'), QStringLiteral("\\\""));
description.replace('\n', ' '); description.replace(QChar('\n'), QChar(' '));
description.replace('\0', ""); description.remove(QChar('\0'));
//Output id and description //Output id and description
QTextStream(stdout) << id << '[' << description << ']' << endl; QTextStream(stdout) << id << '[' << description << ']' << endl;