mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-23 16:22:58 +03:00
build without qtscriptengine fixed
This commit is contained in:
parent
3bbc02507a
commit
01e36f3bbe
15
common.pri
15
common.pri
@ -14,11 +14,19 @@ contains(CONFIG, easy_profiler){
|
||||
DEFINES += BUILD_WITH_EASY_PROFILER
|
||||
}
|
||||
|
||||
!contains(CONFIG, qtscriptengine):
|
||||
greaterThan(QT_MAJOR_VERSION, 4):
|
||||
!contains(CONFIG, qtscriptengine){
|
||||
greaterThan(QT_MAJOR_VERSION, 4){
|
||||
greaterThan(QT_MINOR_VERSION, 5){
|
||||
CONFIG *= qjsengine
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
contains(CONFIG, qtscriptengine){
|
||||
CONFIG -= qjsengine
|
||||
QT *= script
|
||||
message(qtscriptengine)
|
||||
}
|
||||
|
||||
!contains(CONFIG, no_formdesigner){
|
||||
CONFIG *= dialogdesigner
|
||||
@ -93,7 +101,8 @@ LIMEREPORT_VERSION_RELEASE = 68
|
||||
LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}'
|
||||
DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\"
|
||||
|
||||
QT *= script xml sql
|
||||
QT *= xml sql
|
||||
|
||||
REPORT_PATH = $$PWD/limereport
|
||||
TRANSLATIONS_PATH = $$PWD/translations
|
||||
|
||||
|
@ -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*)
|
||||
|
Loading…
Reference in New Issue
Block a user