ProjectExplorer: Convert empty macro to "KEY="

-DKEY is the same as #define KEY 1
-DKEY= is the same as #define KEY

Change-Id: I958a89d7b024999f1a623d4d309513ce342f6f8a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Marco Bubke
2017-09-19 14:00:03 +02:00
parent 434e895b73
commit 3118bdcbd8

View File

@@ -109,6 +109,8 @@ QByteArray Macro::toKeyValue(const QByteArray &prefix) const
keyValue = prefix;
if (value.isEmpty())
keyValue += key + '=';
else if (value == "1")
keyValue += key;
else
keyValue += key + '=' + value;