Changeset View
Changeset View
Standalone View
Standalone View
autotests/src/testutils.h
Context not available. | |||||
24 | #define TESTUTILS_H | 24 | #define TESTUTILS_H | ||
---|---|---|---|---|---|
25 | 25 | | |||
26 | #include "katescriptview.h" | 26 | #include "katescriptview.h" | ||
27 | #include "katescriptdocument.h" | | |||
28 | 27 | | |||
29 | #include <QtScript/QScriptable> | 28 | #include "katescriptdocument.h" | ||
29 | #include <QtQml/QJSEngine> | ||||
30 | 30 | | |||
31 | namespace KTextEditor { class ViewPrivate; } | 31 | namespace KTextEditor { class ViewPrivate; } | ||
32 | class RegressionTest; | 32 | class RegressionTest; | ||
Context not available. | |||||
45 | explicit TestScriptEnv(KTextEditor::DocumentPrivate *part, bool &cflag); | 45 | explicit TestScriptEnv(KTextEditor::DocumentPrivate *part, bool &cflag); | ||
46 | virtual ~TestScriptEnv(); | 46 | virtual ~TestScriptEnv(); | ||
47 | 47 | | |||
48 | QScriptEngine *engine() const | 48 | QJSEngine *engine() const | ||
49 | { | 49 | { | ||
50 | return m_engine; | 50 | return m_engine; | ||
51 | } | 51 | } | ||
Context not available. | |||||
57 | } | 57 | } | ||
58 | 58 | | |||
59 | private: | 59 | private: | ||
60 | QScriptEngine *m_engine; | 60 | QJSEngine *m_engine; | ||
61 | KateViewObject *m_viewObj; | 61 | KateViewObject *m_viewObj; | ||
62 | KateDocumentObject *m_docObj; | 62 | KateDocumentObject *m_docObj; | ||
63 | 63 | | |||
Context not available. | |||||
73 | 73 | | |||
74 | public: | 74 | public: | ||
75 | 75 | | |||
76 | explicit KateViewObject(KTextEditor::ViewPrivate *view); | 76 | explicit KateViewObject(QJSEngine *engine, KTextEditor::ViewPrivate *view); | ||
77 | virtual ~KateViewObject(); | 77 | virtual ~KateViewObject(); | ||
78 | 78 | | |||
79 | // Edit functions | 79 | // Edit functions | ||
Context not available. | |||||
155 | Q_OBJECT | 155 | Q_OBJECT | ||
156 | 156 | | |||
157 | public: | 157 | public: | ||
158 | explicit KateDocumentObject(KTextEditor::DocumentPrivate *doc); | 158 | explicit KateDocumentObject(QJSEngine *engine, KTextEditor::DocumentPrivate *doc); | ||
159 | virtual ~KateDocumentObject(); | 159 | virtual ~KateDocumentObject(); | ||
160 | 160 | | |||
161 | private: | 161 | private: | ||
Context not available. | |||||
168 | * enabling one to check for coordinates and the like. | 168 | * enabling one to check for coordinates and the like. | ||
169 | * @internal | 169 | * @internal | ||
170 | */ | 170 | */ | ||
171 | class OutputObject : public QObject, protected QScriptable | 171 | class OutputObject : public QObject | ||
172 | { | 172 | { | ||
173 | Q_OBJECT | 173 | Q_OBJECT | ||
174 | 174 | | |||
Context not available. | |||||
201 | KTextEditor::ViewPrivate *view; | 201 | KTextEditor::ViewPrivate *view; | ||
202 | bool &cflag; | 202 | bool &cflag; | ||
203 | }; | 203 | }; | ||
204 | | ||||
205 | #endif // TESTUTILS_H | 204 | #endif // TESTUTILS_H | ||
Context not available. |