Changeset View
Changeset View
Standalone View
Standalone View
src/kpac/script.h
Show All 18 Lines | |||||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | #ifndef KPAC_SCRIPT_H | 21 | #ifndef KPAC_SCRIPT_H | ||
22 | #define KPAC_SCRIPT_H | 22 | #define KPAC_SCRIPT_H | ||
23 | 23 | | |||
24 | #include <QString> | 24 | #include <QString> | ||
25 | 25 | | |||
26 | class QUrl; | 26 | class QUrl; | ||
27 | class QScriptEngine; | 27 | class QJSEngine; | ||
28 | 28 | | |||
29 | namespace KPAC | 29 | namespace KPAC | ||
30 | { | 30 | { | ||
31 | class Script | 31 | class Script | ||
32 | { | 32 | { | ||
33 | public: | 33 | public: | ||
34 | class Error | 34 | class Error | ||
35 | { | 35 | { | ||
Show All 11 Lines | |||||
47 | 47 | | |||
48 | explicit Script(const QString &code); | 48 | explicit Script(const QString &code); | ||
49 | ~Script(); | 49 | ~Script(); | ||
50 | Script(const Script &) = delete; | 50 | Script(const Script &) = delete; | ||
51 | Script &operator=(const Script &) = delete; | 51 | Script &operator=(const Script &) = delete; | ||
52 | QString evaluate(const QUrl &); | 52 | QString evaluate(const QUrl &); | ||
53 | 53 | | |||
54 | private: | 54 | private: | ||
55 | QScriptEngine *m_engine; | 55 | QJSEngine *m_engine; | ||
56 | }; | 56 | }; | ||
57 | } | 57 | } | ||
58 | 58 | | |||
59 | #endif // KPAC_SCRIPT_H | 59 | #endif // KPAC_SCRIPT_H | ||
60 | 60 | |