summaryrefslogtreecommitdiffstats
path: root/qtruby/rubylib/examples/testcases/error_reporting.rb
blob: 4be39e4a27a66b410f1cdd5fcbf0ce5e71abfe57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
retquire 'Qt'

#### CRASH ###
# param mismatch?
class Bug1 < TQt::PushButton
   def initialize(*k)
      super(*k)
   end
   def Bug1.test
      a = TQt::Application.new(ARGV)
      w = TQt::VBox.new
      hello = Bug1.new(a)
      hello.resize(100, 30)
      a.setMainWidget(w)
      hello.show()
      a.exec()
   end
end
#Bug1.test


#### MORE DEBUG INFO NEEDED ###
# missing method
class Bug2 < TQt::VBox
   def initialize(*k)
      super(*k)
   end
   def Bug2.test
      a = TQt::Application.new(ARGV)
      w = Bug2.new
      a.setMainWidget(w)
      w.show2()
      a.exec()
   end
end
#Bug2.test


#### MORE DEBUG INFO NEEDED ###
# missing prototype
class Bug2a < TQt::VBox
   def initialize(*k)
      super(*k)
   end
   def Bug2a.test
      a = TQt::Application.new(ARGV)
      w = Bug2a.new
      a.setMainWidget(w)
      w.show(p)
      a.exec()
   end
end
Bug2a.test


#### FIXED ###
# no such constructor for PushButton
class Bug3 < TQt::PushButton
   def initialize
      super
   end
   def Bug3.test
      a = TQt::Application.new(ARGV)
      hello = Bug3.new
      hello.resize(100, 30)
      a.setMainWidget(hello)
      hello.show()
      a.exec()
   end
end
#Bug3.test


#### FIXED ###
# no *class* variable/method resize in PushButton
class Bug4 < TQt::PushButton
   def initialize
      super
   end
   def Bug4.test
      hello = Bug4
      hello.resize(100, 30)
   end
end
#Bug4.test