QmlDesigner: Add option forceFreeType to qmlproject

This option enforces the usage of FreeType even on Windows
for the form editor and live preview.
This can be useful when developing for Linux devices.

The option can be eanbled by adding
'forceFreeType: true'
to the .qmlproject file.

Task-number: QDS-1143
Change-Id: I7e749e95584e23202536596ee4f7cdaa09d3a371
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2019-12-04 13:10:38 +01:00
parent febf0ca067
commit 88103453f2
8 changed files with 44 additions and 1 deletions

View File

@@ -229,6 +229,13 @@ QStringList QmlProject::customFileSelectors() const
return {};
}
bool QmlProject::forceFreeType() const
{
if (m_projectItem)
return m_projectItem.data()->forceFreeType();
return false;
}
bool QmlProject::addFiles(const QStringList &filePaths)
{
QStringList toAdd;
@@ -259,6 +266,8 @@ QVariant QmlProject::additionalData(Id id, const Target *) const
{
if (id == Constants::customFileSelectorsData)
return customFileSelectors();
if (id == Constants::customForceFreeTypeData)
return forceFreeType();
return {};
}