mirror of
https://github.com/KLayout/klayout.git
synced 2026-08-30 09:49:21 +02:00
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:
Vendored
+27
-1
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user