diff --git a/src/project.cpp b/src/project.cpp index 31e388a1..25f29839 100644 --- a/src/project.cpp +++ b/src/project.cpp @@ -1856,6 +1856,7 @@ QString Project::readCIncbin(QString text, QString label) { QMap Project::readCDefines(QString text, QStringList prefixes) { ParseUtil parser; + text.replace(QRegularExpression("//.*"), ""); QMap allDefines; QMap filteredDefines; QRegularExpression re("#define\\s+(?\\w+)[^\\S\\n]+(?.+)"); @@ -1864,7 +1865,7 @@ QMap Project::readCDefines(QString text, QStringList prefixes) { QRegularExpressionMatch match = iter.next(); QString name = match.captured("defineName"); QString expression = match.captured("defineValue"); - expression.replace(QRegularExpression("//.*"), ""); + if (expression == " ") continue; int value = parser.evaluateDefine(expression, &allDefines); allDefines.insert(name, value); for (QString prefix : prefixes) { diff --git a/src/ui/connectionpixmapitem.cpp b/src/ui/connectionpixmapitem.cpp index 5330fd9f..d6e50d20 100644 --- a/src/ui/connectionpixmapitem.cpp +++ b/src/ui/connectionpixmapitem.cpp @@ -1,4 +1,5 @@ #include "connectionpixmapitem.h" +#include void ConnectionPixmapItem::render(qreal opacity) { QPixmap newPixmap = this->basePixmap.copy(0, 0, this->basePixmap.width(), this->basePixmap.height());