mirror of
				https://github.com/python-LimeReport/LimeReport.git
				synced 2025-10-30 05:27:12 +03:00 
			
		
		
		
	build without qtscriptengine fixed
This commit is contained in:
		
							
								
								
									
										15
									
								
								common.pri
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								common.pri
									
									
									
									
									
								
							| @@ -14,11 +14,19 @@ contains(CONFIG, easy_profiler){ | |||||||
|     DEFINES += BUILD_WITH_EASY_PROFILER |     DEFINES += BUILD_WITH_EASY_PROFILER | ||||||
| } | } | ||||||
|  |  | ||||||
| !contains(CONFIG, qtscriptengine): | !contains(CONFIG, qtscriptengine){ | ||||||
| greaterThan(QT_MAJOR_VERSION, 4): | greaterThan(QT_MAJOR_VERSION, 4){ | ||||||
| greaterThan(QT_MINOR_VERSION, 5){ | greaterThan(QT_MINOR_VERSION, 5){ | ||||||
|     CONFIG *= qjsengine |     CONFIG *= qjsengine | ||||||
| } | } | ||||||
|  | } | ||||||
|  | } | ||||||
|  |  | ||||||
|  | contains(CONFIG, qtscriptengine){ | ||||||
|  |     CONFIG -= qjsengine | ||||||
|  |     QT *= script | ||||||
|  |     message(qtscriptengine) | ||||||
|  | } | ||||||
|  |  | ||||||
| !contains(CONFIG, no_formdesigner){ | !contains(CONFIG, no_formdesigner){ | ||||||
|     CONFIG *= dialogdesigner |     CONFIG *= dialogdesigner | ||||||
| @@ -93,7 +101,8 @@ LIMEREPORT_VERSION_RELEASE = 68 | |||||||
| LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' | LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' | ||||||
| DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" | DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" | ||||||
|  |  | ||||||
| QT *= script xml sql | QT *= xml sql | ||||||
|  |  | ||||||
| REPORT_PATH = $$PWD/limereport | REPORT_PATH = $$PWD/limereport | ||||||
| TRANSLATIONS_PATH = $$PWD/translations | TRANSLATIONS_PATH = $$PWD/translations | ||||||
|  |  | ||||||
|   | |||||||
| @@ -29,7 +29,9 @@ | |||||||
|  ****************************************************************************/ |  ****************************************************************************/ | ||||||
| #include <QtGui> | #include <QtGui> | ||||||
| #include <QTextLayout> | #include <QTextLayout> | ||||||
|  | #ifndef USE_QJSENGINE | ||||||
| #include <QtScript/QScriptEngine> | #include <QtScript/QScriptEngine> | ||||||
|  | #endif | ||||||
| #include <QLocale> | #include <QLocale> | ||||||
| #include <QMessageBox> | #include <QMessageBox> | ||||||
| #include <math.h> | #include <math.h> | ||||||
|   | |||||||
| @@ -253,7 +253,7 @@ void ReportRender::renderPage(PageItemDesignIntf* patternPage, bool isTOC, bool | |||||||
|     } |     } | ||||||
|  |  | ||||||
| #ifndef USE_QJSENGINE | #ifndef USE_QJSENGINE | ||||||
|     Manager::instance().scriptEScriptEnginengine()->popContext(); |     ScriptEngineManager::instance().scriptEngine()->popContext(); | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| } | } | ||||||
| @@ -306,7 +306,7 @@ void ReportRender::initRenderPage() | |||||||
|         if (svCurrentPage.isValid()){ |         if (svCurrentPage.isValid()){ | ||||||
|             se->newQObject(svCurrentPage, m_renderPageItem); |             se->newQObject(svCurrentPage, m_renderPageItem); | ||||||
|         } else { |         } else { | ||||||
|             svThis = se->newQObject(m_renderPageItem); |             svCurrentPage = se->newQObject(m_renderPageItem); | ||||||
|             se->globalObject().setProperty("currentPage", svCurrentPage); |             se->globalObject().setProperty("currentPage", svCurrentPage); | ||||||
|         } |         } | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -31,7 +31,9 @@ | |||||||
|  |  | ||||||
| #include <QDate> | #include <QDate> | ||||||
| #include <QStringList> | #include <QStringList> | ||||||
|  | #ifndef USE_QJSENGINE | ||||||
| #include <QScriptValueIterator> | #include <QScriptValueIterator> | ||||||
|  | #endif | ||||||
| #include <QMessageBox> | #include <QMessageBox> | ||||||
| #ifdef HAVE_UI_LOADER | #ifdef HAVE_UI_LOADER | ||||||
| #include <QUiLoader> | #include <QUiLoader> | ||||||
| @@ -47,11 +49,13 @@ Q_DECLARE_METATYPE(QColor) | |||||||
| Q_DECLARE_METATYPE(QFont) | Q_DECLARE_METATYPE(QFont) | ||||||
| Q_DECLARE_METATYPE(LimeReport::ScriptEngineManager *) | Q_DECLARE_METATYPE(LimeReport::ScriptEngineManager *) | ||||||
|  |  | ||||||
|  | #ifndef USE_QJSENGINE | ||||||
| QScriptValue constructColor(QScriptContext *context, QScriptEngine *engine) | QScriptValue constructColor(QScriptContext *context, QScriptEngine *engine) | ||||||
| { | { | ||||||
|      QColor color(context->argument(0).toString()); |      QColor color(context->argument(0).toString()); | ||||||
|      return engine->toScriptValue(color); |      return engine->toScriptValue(color); | ||||||
| } | } | ||||||
|  | #endif | ||||||
|  |  | ||||||
| namespace LimeReport{ | namespace LimeReport{ | ||||||
|  |  | ||||||
|   | |||||||
| @@ -29,14 +29,15 @@ | |||||||
|  ****************************************************************************/ |  ****************************************************************************/ | ||||||
| #ifndef LRSCRIPTENGINEMANAGER_H | #ifndef LRSCRIPTENGINEMANAGER_H | ||||||
| #define LRSCRIPTENGINEMANAGER_H | #define LRSCRIPTENGINEMANAGER_H | ||||||
|  | #ifndef USE_QJSENGINE | ||||||
| #include <QtScript/QScriptEngine> | #include <QtScript/QScriptEngine> | ||||||
|  | #include <QScriptable> | ||||||
|  | #endif | ||||||
| #include <QVector> | #include <QVector> | ||||||
| #include <QIcon> | #include <QIcon> | ||||||
| #include <QAbstractItemModel> | #include <QAbstractItemModel> | ||||||
| #include <QDebug> | #include <QDebug> | ||||||
| #include <QtGlobal> | #include <QtGlobal> | ||||||
| #include <QScriptable> |  | ||||||
| #include <QFont> | #include <QFont> | ||||||
| #include <QComboBox> | #include <QComboBox> | ||||||
|  |  | ||||||
| @@ -440,6 +441,7 @@ private: | |||||||
|  |  | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | #ifndef USE_QJSENGINE | ||||||
| class QFontPrototype : public QObject, public QScriptable { | class QFontPrototype : public QObject, public QScriptable { | ||||||
|     Q_OBJECT |     Q_OBJECT | ||||||
|     Q_PROPERTY(QString family READ family) |     Q_PROPERTY(QString family READ family) | ||||||
| @@ -486,9 +488,9 @@ public: | |||||||
|         return qScriptValueFromValue<QFont>(engine, font); |         return qScriptValueFromValue<QFont>(engine, font); | ||||||
|     } |     } | ||||||
| }; | }; | ||||||
|  | #endif | ||||||
|  |  | ||||||
| } | } | ||||||
|  |  | ||||||
| #ifndef USE_QJSENGINE | #ifndef USE_QJSENGINE | ||||||
| Q_DECLARE_METATYPE(LimeReport::ComboBoxPrototype*) | Q_DECLARE_METATYPE(LimeReport::ComboBoxPrototype*) | ||||||
| Q_DECLARE_METATYPE(QComboBox*) | Q_DECLARE_METATYPE(QComboBox*) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user