Changeset View
Changeset View
Standalone View
Standalone View
templates/scriptabletags/scriptablesafestring.h
Show All 16 Lines | 1 | /* | |||
---|---|---|---|---|---|
17 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | 17 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
18 | 18 | | |||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | #ifndef SCRIPTABLE_SAFESTRING | 21 | #ifndef SCRIPTABLE_SAFESTRING | ||
22 | #define SCRIPTABLE_SAFESTRING | 22 | #define SCRIPTABLE_SAFESTRING | ||
23 | 23 | | |||
24 | #include <QtCore/QObject> | 24 | #include <QtCore/QObject> | ||
25 | #include <QtScript/QScriptValue> | 25 | #include <QtQml/QJSValue> | ||
26 | 26 | | |||
27 | #include "safestring.h" | 27 | #include "safestring.h" | ||
28 | 28 | | |||
29 | class QScriptContext; | | |||
30 | | ||||
31 | using namespace Grantlee; | 29 | using namespace Grantlee; | ||
32 | 30 | | |||
33 | QScriptValue markSafeFunction(QScriptContext *context, QScriptEngine *engine); | | |||
34 | | ||||
35 | class ScriptableSafeString : public QObject | 31 | class ScriptableSafeString : public QObject | ||
36 | { | 32 | { | ||
37 | Q_OBJECT | 33 | Q_OBJECT | ||
38 | public: | 34 | public: | ||
39 | ScriptableSafeString(QObject *parent = 0); | 35 | ScriptableSafeString(QObject *parent = 0); | ||
40 | 36 | | |||
41 | void setContent(const SafeString &content); | 37 | void setContent(const SafeString &content); | ||
42 | SafeString wrappedString() const; | 38 | SafeString wrappedString() const; | ||
Show All 11 Lines |