CMake Build: Use same Qt compiler defines for tests

Source code needed adjustments though.

Change-Id: I78b4610a6bb895a385c7c30a6c92c97a276b89dd
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Cristian Adam
2019-09-10 13:13:30 +02:00
parent 62d16e437a
commit 486aaabd21
15 changed files with 56 additions and 50 deletions

View File

@@ -217,10 +217,8 @@ public:
dir = QFileInfo(currentFileName).dir();
const QFileInfo inc(dir, includedFileName);
if (inc.exists()) {
const QString resolved = inc.filePath();
return resolved.toUtf8().constData();
return inc.filePath();
} else {
// std::cerr<<"Cannot find " << inc.fileName().toUtf8().constData()<<std::endl;
return QString();
}
}
@@ -418,8 +416,8 @@ QByteArray tst_Preprocessor::simplified(const QByteArray &buf)
QList<QByteArray> lines = buf.split('\n');
foreach (const QByteArray &line, lines) {
if (!line.startsWith('#')) {
out.append(' ');
out.append(line);
out.append(" ");
out.append(QString::fromUtf8(line));
}
}