Class: Qt::SignalBlockInvocation

Inherits:
Object show all
Defined in:
lib/Qt/qtruby4.rb

Instance Method Summary collapse

Methods inherited from Base

#%, #&, #*, #**, #+, #-, #-@, #/, #<, #<<, #<=, #==, #>, #>=, #>>, #QCOMPARE, #QEXPECT_FAIL, #QFAIL, #QSKIP, #QTEST, #QVERIFY, #QVERIFY2, #QWARN, #^, ancestors, #is_a?, #methods, private_slots, #protected_methods, #public_methods, q_classinfo, q_signal, q_slot, signals, #singleton_methods, slots, #|, #~

Constructor Details

#initialize(parent, block, signature) ⇒ SignalBlockInvocation

Returns a new instance of SignalBlockInvocation.



2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
# File 'lib/Qt/qtruby4.rb', line 2384

def initialize(parent, block, signature)
	super(parent)
	if metaObject.indexOfSlot(signature) == -1
		self.class.slots signature
	end
	# This makes a difference between being and not being able
	# to run with GC.stress= true. Reason unclear.
	gc_disabled= GC.disable
	@block = block
	GC.enable unless gc_disabled
end

Instance Method Details

#invoke(*args) ⇒ Object



2396
2397
2398
# File 'lib/Qt/qtruby4.rb', line 2396

def invoke(*args)
	@block.call(*args)
end