summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--objects/editor.h15
-rw-r--r--tests/test.js4
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) {