Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit e40ba297 authored by Nicolas Carion's avatar Nicolas Carion

Port vpinon's deletion of QScript and remove it from linking

parent 42cd79b5
......@@ -73,12 +73,6 @@ set_package_properties(OpenGL PROPERTIES
set_package_properties(QtScript PROPERTIES
DESCRIPTION "Qt module providing core scripting facilities"
URL ""
# macro_log_feature(SDL_FOUND
# "SDL"
......@@ -303,7 +297,7 @@ if (KF5_FILEMETADATA)
target_link_libraries(kdenliveLib KF5::FileMetaData)
qt5_use_modules( kdenliveLib Script Widgets Concurrent Qml Quick QuickWidgets)
qt5_use_modules( kdenliveLib Widgets Concurrent Qml Quick QuickWidgets)
if (Qt5WebKitWidgets_FOUND)
message(STATUS "Found Qt5 WebKitWidgets. You can use your credentials to download files")
......@@ -24,7 +24,6 @@
#include "profiles/profilemodel.hpp"
#include <QDebug>
#include <QLocale>
#include <QScriptEngine>
#include <QString>
AssetParameterModel::AssetParameterModel(Mlt::Properties *asset, const QDomElement &assetXml, const QString &assetId, QObject *parent)
......@@ -223,15 +222,20 @@ double AssetParameterModel::parseDoubleAttribute(const QString &attribute, const
QString content = element.attribute(attribute);
if (content.contains(QLatin1Char('%'))) {
QScriptEngine sEngine;
std::unique_ptr<ProfileModel> &profile = pCore->getCurrentProfile();
int width = profile->width();
int height = profile->height();
sEngine.globalObject().setProperty(QStringLiteral("maxWidth"), width);
sEngine.globalObject().setProperty(QStringLiteral("maxHeight"), height);
sEngine.globalObject().setProperty(QStringLiteral("width"), width);
sEngine.globalObject().setProperty(QStringLiteral("height"), height);
return sEngine.evaluate(content.remove('%')).toNumber();
// replace symbols in the double parameter
content.replace(QLatin1String("%maxWidth"), QString::number(width))
.replace(QLatin1String("%maxHeight"), QString::number(height))
.replace(QLatin1String("%width"), QString::number(width))
.replace(QLatin1String("%height"), QString::number(height));
// Use a Mlt::Properties to parse mathematical operators
Mlt::Properties p;
p.set("eval", content.toLatin1().constData());
return p.get_double("eval");
return locale.toDouble(content);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment