diff options
author | Jesper K. Pedersen <jesper.pedersen@kdab.com> | 2013-05-17 08:37:42 +0200 |
---|---|---|
committer | Jesper K. Pedersen <jesper.pedersen@kdab.com> | 2013-05-21 15:05:35 +0200 |
commit | 8a83b2e535a238f6aacff63beefd1302303753af (patch) | |
tree | 27518cba905d0ff81116f49b2a4d2d9a8db9773f | |
parent | aad6a7fc57ad69aab3688047ae7ead8480dafd37 (diff) |
converted slots into properties
Change-Id: Ifd4c6913021ff3d30b86ad6c37751883823fd10a
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
-rw-r--r-- | objects/editor.h | 15 | ||||
-rw-r--r-- | tests/test.js | 4 |
2 files changed, 13 insertions, 6 deletions
diff --git a/objects/editor.h b/objects/editor.h index 4e21a93..31b5928 100644 --- a/objects/editor.h +++ b/objects/editor.h @@ -45,23 +45,30 @@ class Editors; class Editor : public QObject { Q_OBJECT + Q_PROPERTY( bool exists READ exists ) + Q_PROPERTY( QString fileName READ fileName ) + Q_PROPERTY( int currentColumn READ currentColumn ) + Q_PROPERTY( int currentLine READ currentLine) + public: explicit Editor(QObject *parent=0); void setEditor(Core::IEditor *editor); public slots: - bool exists() const; bool save(); - int currentLine() const; - int currentColumn() const; void gotoLine(int line, int column=0); void gotoPosition( const Position& pos ); - QString fileName() const; void close(); +public: + bool exists() const; + int currentLine() const; + int currentColumn() const; + QString fileName() const; + protected: virtual Core::IEditor *editor() const; diff --git a/tests/test.js b/tests/test.js index 9269328..6c4f6de 100644 --- a/tests/test.js +++ b/tests/test.js @@ -68,8 +68,8 @@ if (TEST_JS_LOADED == undefined) { } function verifyPosition(line,column, message) { - compare(editor.currentLine(), line, message) - compare(editor.currentColumn(), column, message) + compare(editor.currentLine, line, message) + compare(editor.currentColumn, column, message) } function assert(cond, message) { |