mirror of
https://github.com/fralx/LimeReport.git
synced 2025-09-23 08:29:07 +03:00
build without qtscriptengine fixed
This commit is contained in:
@@ -29,7 +29,9 @@
|
||||
****************************************************************************/
|
||||
#include <QtGui>
|
||||
#include <QTextLayout>
|
||||
#ifndef USE_QJSENGINE
|
||||
#include <QtScript/QScriptEngine>
|
||||
#endif
|
||||
#include <QLocale>
|
||||
#include <QMessageBox>
|
||||
#include <math.h>
|
||||
|
@@ -253,7 +253,7 @@ void ReportRender::renderPage(PageItemDesignIntf* patternPage, bool isTOC, bool
|
||||
}
|
||||
|
||||
#ifndef USE_QJSENGINE
|
||||
Manager::instance().scriptEScriptEnginengine()->popContext();
|
||||
ScriptEngineManager::instance().scriptEngine()->popContext();
|
||||
#endif
|
||||
|
||||
}
|
||||
@@ -306,7 +306,7 @@ void ReportRender::initRenderPage()
|
||||
if (svCurrentPage.isValid()){
|
||||
se->newQObject(svCurrentPage, m_renderPageItem);
|
||||
} else {
|
||||
svThis = se->newQObject(m_renderPageItem);
|
||||
svCurrentPage = se->newQObject(m_renderPageItem);
|
||||
se->globalObject().setProperty("currentPage", svCurrentPage);
|
||||
}
|
||||
#endif
|
||||
|
@@ -31,7 +31,9 @@
|
||||
|
||||
#include <QDate>
|
||||
#include <QStringList>
|
||||
#ifndef USE_QJSENGINE
|
||||
#include <QScriptValueIterator>
|
||||
#endif
|
||||
#include <QMessageBox>
|
||||
#ifdef HAVE_UI_LOADER
|
||||
#include <QUiLoader>
|
||||
@@ -47,11 +49,13 @@ Q_DECLARE_METATYPE(QColor)
|
||||
Q_DECLARE_METATYPE(QFont)
|
||||
Q_DECLARE_METATYPE(LimeReport::ScriptEngineManager *)
|
||||
|
||||
#ifndef USE_QJSENGINE
|
||||
QScriptValue constructColor(QScriptContext *context, QScriptEngine *engine)
|
||||
{
|
||||
QColor color(context->argument(0).toString());
|
||||
return engine->toScriptValue(color);
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace LimeReport{
|
||||
|
||||
|
@@ -29,14 +29,15 @@
|
||||
****************************************************************************/
|
||||
#ifndef LRSCRIPTENGINEMANAGER_H
|
||||
#define LRSCRIPTENGINEMANAGER_H
|
||||
|
||||
#ifndef USE_QJSENGINE
|
||||
#include <QtScript/QScriptEngine>
|
||||
#include <QScriptable>
|
||||
#endif
|
||||
#include <QVector>
|
||||
#include <QIcon>
|
||||
#include <QAbstractItemModel>
|
||||
#include <QDebug>
|
||||
#include <QtGlobal>
|
||||
#include <QScriptable>
|
||||
#include <QFont>
|
||||
#include <QComboBox>
|
||||
|
||||
@@ -440,6 +441,7 @@ private:
|
||||
|
||||
};
|
||||
|
||||
#ifndef USE_QJSENGINE
|
||||
class QFontPrototype : public QObject, public QScriptable {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QString family READ family)
|
||||
@@ -486,9 +488,9 @@ public:
|
||||
return qScriptValueFromValue<QFont>(engine, font);
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#ifndef USE_QJSENGINE
|
||||
Q_DECLARE_METATYPE(LimeReport::ComboBoxPrototype*)
|
||||
Q_DECLARE_METATYPE(QComboBox*)
|
||||
|
Reference in New Issue
Block a user