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