QmlDesigner: Fix test build

Can't have theme dependency in designercore.

Change-Id: I28b5a4623ed0122fccb886121795eb07467555e9
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Miikka Heikkinen
2021-01-15 12:28:50 +02:00
parent 40c6a6c1b9
commit 261e4bc045

View File

@@ -25,7 +25,9 @@
#include "imagecachefontcollector.h"
#ifndef QMLDESIGNER_TEST // Tests don't care about UI, and can't have theme dependency here
#include <theme.h>
#endif
#include <QtGui/qrawfont.h>
#include <QtGui/qpainter.h>
@@ -65,7 +67,11 @@ void ImageCacheFontCollector::start(Utils::SmallStringView name,
if (ok)
dim = newDim;
}
#ifndef QMLDESIGNER_TEST
QColor textColor(Theme::getColor(Theme::DStextColor));
#else
QColor textColor;
#endif
if (hints.size() >= 2)
textColor.setNamedColor(hints[1]);
QString text = hints.size() >= 3 ? hints[2] : "Abc";