Showing the changes to interface/src/scripting/WindowScriptingInterface.cpp (1 of 1 file). Show all
Unified · Split
| @@ -47,13 +47,11 @@ void WindowScriptingInterface::setCursorPosition(int x, int y) { · 46 unmodified lines | |||
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | QScriptValue WindowScriptingInterface::getCursorPositionX() { | 49 | QScriptValue WindowScriptingInterface::getCursorPositionX() { |
| 50 | QPoint pos = QCursor::pos(); | 50 | return QCursor::pos().x(); |
| 51 | return pos.x(); | ||
| 52 | } | 51 | } |
| 53 | 52 | ||
| 54 | QScriptValue WindowScriptingInterface::getCursorPositionY() { | 53 | QScriptValue WindowScriptingInterface::getCursorPositionY() { |
| 55 | QPoint pos = QCursor::pos(); | 54 | return QCursor::pos().y(); |
| 56 | return pos.y(); | ||
| 57 | } | 55 | } |
| 58 | 56 | ||
| 59 | QScriptValue WindowScriptingInterface::alert(const QString& message) { | 57 | QScriptValue WindowScriptingInterface::alert(const QString& message) { |