Core: Add a basic extension for the JsExpander

This adds a "Utils" object to the Js runtime offered by the
JsExpander that adds some useful functions.

Mostly file name mangling and finding preferred extension
from the MIME type database.

Change-Id: I907dae7f295167667ac2ae81461bbff16dc98ef4
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Tobias Hunger
2014-09-16 15:58:32 +02:00
parent e014847cdd
commit f5d48bf39e
8 changed files with 232 additions and 5 deletions

View File

@@ -270,7 +270,8 @@ const QStringList &CustomToolChain::cxx11Flags() const
void CustomToolChain::setMkspecs(const QString &specs)
{
m_mkspecs = Utils::transform(specs.split(QLatin1Char(',')), &FileName::fromString);
m_mkspecs = Utils::transform(specs.split(QLatin1Char(',')),
[](QString fn) { return Utils::FileName::fromString(fn); });
}
QString CustomToolChain::mkspecs() const