0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-11-07 00:21:24 +03:00

Building for different script engine has been fixed

This commit is contained in:
Arin Alexander
2019-02-19 02:23:53 +03:00
parent 0a0e1504fa
commit e0ef984fca
10 changed files with 114 additions and 75 deletions

View File

@@ -29,7 +29,7 @@
****************************************************************************/
#ifndef LRSCRIPTENGINEMANAGER_H
#define LRSCRIPTENGINEMANAGER_H
#ifndef USE_QJSENGINE
#ifdef USE_QTSCRIPTENGINE
#include <QtScript/QScriptEngine>
#include <QScriptable>
#endif
@@ -272,7 +272,7 @@ private:
QString m_scriptWrapper;
};
#ifndef USE_QJSENGINE
#ifdef USE_QTSCRIPTENGINE
class ComboBoxPrototype : public QObject, public QScriptable{
Q_OBJECT
public:
@@ -363,6 +363,7 @@ public:
Q_INVOKABLE QVariant getVariable(const QString& name);
Q_INVOKABLE QVariant getField(const QString& field);
Q_INVOKABLE QVariant getFieldByKeyField(const QString& datasourceName, const QString& valueFieldName, const QString& keyFieldName, QVariant keyValue);
Q_INVOKABLE QVariant getFieldByRowIndex(const QString& fieldName, int rowIndex);
Q_INVOKABLE void reopenDatasource(const QString& datasourceName);
Q_INVOKABLE QVariant color(const QString& color){ return QColor(color);}
Q_INVOKABLE void addTableOfContentsItem(const QString& uniqKey, const QString& content, int indent = 0);
@@ -399,7 +400,7 @@ public:
void deleteFunction(const QString& functionsName);
bool addFunction(const JSFunctionDesc& functionsDescriber);
#ifndef USE_QJSENGINE
#ifdef USE_QTSCRIPTENGINE
bool addFunction(const QString &name, QScriptEngine::FunctionSignature function, const QString &category, const QString &description);
#endif
bool addFunction(const QString &name, const QString& script,
@@ -438,6 +439,7 @@ private:
bool createGetVariableFunction();
bool createGetFieldFunction();
bool createGetFieldByKeyFunction();
bool createGetFieldByRowIndex();
bool createAddTableOfContentsItemFunction();
bool createClearTableOfContentsFunction();
bool createReopenDatasourceFunction();
@@ -483,7 +485,7 @@ private:
};
#ifndef USE_QJSENGINE
#ifdef USE_QTSCRIPTENGINE
class QFontPrototype : public QObject, public QScriptable {
Q_OBJECT
Q_PROPERTY(QString family READ family)
@@ -533,7 +535,7 @@ public:
#endif
}
#ifndef USE_QJSENGINE
#ifdef USE_QTSCRIPTENGINE
Q_DECLARE_METATYPE(LimeReport::ComboBoxPrototype*)
Q_DECLARE_METATYPE(QComboBox*)
#endif