Skip to content

Commit a519177

Browse files
jnboothLeonMatthesKDAB
authored andcommitted
cxx-qt-lib: make keyboard_modifiers and mouse_buttons &self fns
1 parent a3b0d3e commit a519177

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/cxx-qt-lib/src/gui/qguiapplication.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ impl QGuiApplication {
244244
/// It should be noted this may not reflect the actual keys held on the input device at the time
245245
/// of calling but rather the modifiers as last reported in an event.
246246
/// If no keys are being held Qt::NoModifier is returned.
247-
pub fn keyboard_modifiers() -> KeyboardModifiers {
247+
pub fn keyboard_modifiers(&self) -> KeyboardModifiers {
248248
ffi::qguiapplication_keyboard_modifiers()
249249
}
250250

@@ -255,7 +255,7 @@ impl QGuiApplication {
255255
/// It should be noted this may not reflect the actual buttons held on the input device at the
256256
/// time of calling but rather the mouse buttons as last reported in one of the above events.
257257
/// If no mouse buttons are being held Qt::NoButton is returned.
258-
pub fn mouse_buttons() -> MouseButtons {
258+
pub fn mouse_buttons(&self) -> MouseButtons {
259259
ffi::qguiapplication_mouse_buttons()
260260
}
261261

@@ -268,7 +268,7 @@ impl QGuiApplication {
268268
/// cases, you should use keyboardModifiers(), which is faster and more accurate since it
269269
/// contains the state of the modifiers as they were when the currently processed event was
270270
/// received.
271-
pub fn query_keyboard_modifiers() -> KeyboardModifiers {
271+
pub fn query_keyboard_modifiers(&self) -> KeyboardModifiers {
272272
ffi::qguiapplication_query_keyboard_modifiers()
273273
}
274274
}

0 commit comments

Comments
 (0)