Rename HAVE_KJS

It's not KJS but QJSEngine now.
This commit is contained in:
Volker Krause 2023-06-22 17:24:36 +02:00
parent 419b10fbb5
commit ba04a81d2b
3 changed files with 7 additions and 7 deletions

View file

@ -145,9 +145,9 @@ find_package(Qt5Qml)
set_okular_optional_package_properties(Qt5Qml PROPERTIES
PURPOSE "Required for supporting JavaScript in PDF documents")
if(TARGET Qt5::Qml)
set(HAVE_KJS 1)
set(HAVE_JS 1)
else()
set(HAVE_KJS 0)
set(HAVE_JS 0)
endif()
if (BUILD_DESKTOP)

View file

@ -10,8 +10,8 @@
/* Defines if kwallet is available */
#cmakedefine01 HAVE_KWALLET
/* Defines if kjs is available*/
#cmakedefine01 HAVE_KJS
/* Defines if QJSEngine is available*/
#cmakedefine01 HAVE_JS
/* Defines whether the malloc_trim method from malloc.h is available */
#cmakedefine01 HAVE_MALLOC_TRIM

View file

@ -21,7 +21,7 @@ class Okular::ScripterPrivate
public:
explicit ScripterPrivate(DocumentPrivate *doc)
: m_doc(doc)
#if HAVE_KJS
#if HAVE_JS
, m_kjs(nullptr)
#endif
, m_event(nullptr)
@ -29,7 +29,7 @@ public:
}
DocumentPrivate *m_doc;
#if HAVE_KJS
#if HAVE_JS
QScopedPointer<ExecutorKJS> m_kjs;
#endif
Event *m_event;
@ -48,7 +48,7 @@ Scripter::~Scripter()
void Scripter::execute(ScriptType type, const QString &script)
{
qCDebug(OkularCoreDebug) << "executing the script:" << script;
#if HAVE_KJS
#if HAVE_JS
static QString builtInScript;
if (builtInScript.isNull()) {
QFile builtInResource(QStringLiteral(":/script/builtin.js"));