Fixed #629 (timeout event of QTimer not present on Qt5) (#631)

In addition, the "destroyed" and "objectNameChanged" signals
were added (specifically to QObject).

The API binding for Qt5 was updated which adds some events.
This commit is contained in:
Matthias Köfferlein
2020-09-14 18:34:28 +02:00
committed by GitHub
parent 9cef935fad
commit 59ee6b6a83
305 changed files with 19399 additions and 11683 deletions
+27 -1
View File
@@ -534,7 +534,7 @@ class QtBinding_TestClass < TestBase
GC.start
assert_equal(ef.log.select { |s| s !~ /RBA::QKeyEvent(_Native)?: ShortcutOverride/ }.join("\n"), "RBA::QKeyEvent: KeyPress (6)\nRBA::QKeyEvent: KeyPress (6)\nRBA::QKeyEvent: KeyPress (6)")
assert_equal(ef.log.select { |s| s !~ /RBA::QKeyEvent(_Native)?: ShortcutOverride/ && s !~ /RBA::QEvent(_Native)/ }.join("\n"), "RBA::QKeyEvent: KeyPress (6)\nRBA::QKeyEvent: KeyPress (6)\nRBA::QKeyEvent: KeyPress (6)")
ef = nil
ef = EventFilter::new
@@ -673,6 +673,32 @@ class QtBinding_TestClass < TestBase
end
def test_50
# QObject signals
w = RBA::QObject::new
on = nil
w.objectNameChanged do |name|
on = name
end
od = false
w.destroyed do |name|
od = true
end
w.objectName = "uvw"
assert_equal(on, "uvw")
w._destroy
assert_equal(od, true)
end
end
load("test_epilogue.rb")