|
1 | 1 | #include "qml.hpp" |
2 | 2 | #include <cassert> |
3 | | -#include <cstddef> |
4 | 3 | #include <utility> |
5 | 4 |
|
6 | 5 | #include <qlogging.h> |
|
9 | 8 | #include <qqmlengine.h> |
10 | 9 | #include <qqmlinfo.h> |
11 | 10 | #include <qstring.h> |
| 11 | +#include <qtmetamacros.h> |
12 | 12 |
|
13 | 13 | #include "input_method.hpp" |
14 | 14 | #include "keyboard_grab.hpp" |
@@ -78,22 +78,22 @@ void InputMethod::getInput() { |
78 | 78 | &InputMethod::onHandleActiveChanged |
79 | 79 | ); |
80 | 80 | QObject::connect( |
81 | | - this->handle.get(), |
82 | | - &InputMethodHandle::contentHintChanged, |
83 | | - this, |
84 | | - &InputMethod::contentHintChanged |
| 81 | + this->handle.get(), |
| 82 | + &InputMethodHandle::contentHintChanged, |
| 83 | + this, |
| 84 | + &InputMethod::contentHintChanged |
85 | 85 | ); |
86 | 86 | QObject::connect( |
87 | | - this->handle.get(), |
88 | | - &InputMethodHandle::contentPurposeChanged, |
89 | | - this, |
90 | | - &InputMethod::contentPurposeChanged |
| 87 | + this->handle.get(), |
| 88 | + &InputMethodHandle::contentPurposeChanged, |
| 89 | + this, |
| 90 | + &InputMethod::contentPurposeChanged |
91 | 91 | ); |
92 | 92 | QObject::connect( |
93 | | - this->handle.get(), |
94 | | - &InputMethodHandle::surroundingTextChanged, |
95 | | - this, |
96 | | - &InputMethod::surroundingTextChanged |
| 93 | + this->handle.get(), |
| 94 | + &InputMethodHandle::surroundingTextChanged, |
| 95 | + this, |
| 96 | + &InputMethod::surroundingTextChanged |
97 | 97 | ); |
98 | 98 |
|
99 | 99 | emit hasInputChanged(); |
@@ -154,19 +154,11 @@ void InputMethod::handleKeyboardActive() { |
154 | 154 | } |
155 | 155 | } |
156 | 156 |
|
157 | | -const QString& InputMethod::surroundingText() const { |
158 | | - return handle->surroundingText(); |
159 | | -} |
160 | | -uint32_t InputMethod::surroundingTextCursor() const { |
161 | | - return handle->surroundingTextCursor(); |
162 | | -} |
163 | | -uint32_t InputMethod::surroundingTextAnchor() const { |
164 | | - return handle->surroundingTextAnchor(); |
165 | | -} |
| 157 | +const QString& InputMethod::surroundingText() const { return handle->surroundingText(); } |
| 158 | +uint32_t InputMethod::surroundingTextCursor() const { return handle->surroundingTextCursor(); } |
| 159 | +uint32_t InputMethod::surroundingTextAnchor() const { return handle->surroundingTextAnchor(); } |
166 | 160 |
|
167 | | -QMLContentHint::Enum InputMethod::contentHint() const { |
168 | | - return this->handle->contentHint(); |
169 | | -} |
| 161 | +QMLContentHint::Enum InputMethod::contentHint() const { return this->handle->contentHint(); } |
170 | 162 | QMLContentPurpose::Enum InputMethod::contentPurpose() const { |
171 | 163 | return this->handle->contentPurpose(); |
172 | 164 | } |
|
0 commit comments