Commit 2992653a authored by Nikolai Kosjar's avatar Nikolai Kosjar Committed by Erik Verbruggen
Browse files

CppTools: Remove workaround for quotes in defines

...since by now we get the defines in the correct format from

See the change this one depends on.

Tested with:

    Qbs:   cpp.defines: [ 'PATH1="/some/path"', "PATH2=\"/some/path\"" ]
    QMake: DEFINES += PATH1=\\\"/some/path\\\" "PATH2=\\\"/some/path\\\""
    CMake: add_definitions(-DPATH1="/some/path" "-DPATH2=\"/some/path\"")

All these lines translate to

    #define PATH1 "/some/path"
    #define PATH2 "/some/path"

for the code model.

Change-Id: Ifc3d3acff3abab6897ccbd0c5fafd5c415dfb53c
Reviewed-by: default avatarErik Verbruggen <>
parent b1c17b39
......@@ -556,8 +556,6 @@ QStringList CompilerOptionsBuilder::createDefineOptions(const QByteArray &define
QString arg = option + QLatin1String(str.left(hasValue ? spaceIdx : str.size()) + '=');
if (hasValue)
arg += QLatin1String(str.mid(spaceIdx + 1));
arg = arg.replace(QLatin1String("\\\""), QLatin1String("\""));
arg = arg.replace(QLatin1String("\""), QLatin1String(""));
if (!result.contains(arg))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment