Qt4 compatibility of one test.

This commit is contained in:
Matthias Koefferlein 2020-09-14 21:27:22 +02:00
parent d7a82ab7dd
commit 161d13ad3a
1 changed files with 10 additions and 8 deletions

View File

@ -679,9 +679,16 @@ class QtBinding_TestClass < TestBase
w = RBA::QObject::new
on = nil
w.objectNameChanged do |name|
on = name
if w.respond_to?(:objectNameChanged) # Qt5
on = nil
w.objectNameChanged do |name|
on = name
end
w.objectName = "uvw"
assert_equal(on, "uvw")
end
od = false
@ -689,12 +696,7 @@ class QtBinding_TestClass < TestBase
od = true
end
w.objectName = "uvw"
assert_equal(on, "uvw")
w._destroy
assert_equal(od, true)
end