ruby-qt6-rspec 2.1.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/qt6/rspec/bando_file_parser.rb +1 -1
- data/lib/qt6/rspec/qlass_file_parser.rb +4 -4
- data/lib/qt6/rspec/version.rb +1 -1
- data/lib/qt6/rspec.rb +9 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7fbcd5cbd6dfd31f9edb28a0e5576607c17e7c2e803e43db515c31ceea0de7a1
|
|
4
|
+
data.tar.gz: ffde495e82226cbd878290b4eb2d7aff01885d3187628b6330bc1aa5451d521c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2826989b192638079818e8c660b88bfafac82369793732be5a82733b408782ee01789a02dffc89689285117c42a72a6134ed2e17cade8c164a95e16521ab7f3b
|
|
7
|
+
data.tar.gz: 749d88cc076324a586c238e0ea36347adc3c75050a76fe6fa33a1f0bf378e78ccc13e53ecef95abceb1e4795404826f04c5d42801cc8ebc58dfa5acf792b1283
|
|
@@ -46,11 +46,11 @@ module RubyQt6
|
|
|
46
46
|
raise MissingLine.new("Class rb_c...", line)
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
-
until line.start_with?("void Init_q")
|
|
49
|
+
until line.start_with?("void Init_q", "void Init_k")
|
|
50
50
|
take_next_line
|
|
51
51
|
end
|
|
52
52
|
|
|
53
|
-
while line == "" || line.start_with?("void Init_q") || line == "{"
|
|
53
|
+
while line == "" || line.start_with?("void Init_q", "void Init_k") || line == "{"
|
|
54
54
|
take_next_line
|
|
55
55
|
end
|
|
56
56
|
end
|
|
@@ -83,10 +83,10 @@ module RubyQt6
|
|
|
83
83
|
raise MissingLine.new(expected, line)
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
-
if line.start_with?(/
|
|
86
|
+
if line.start_with?(/define_qlass_under<#{name}.*rb_mQt6#{qmod_name}, "#{name}"/)
|
|
87
87
|
take_next_line
|
|
88
88
|
else
|
|
89
|
-
raise MissingLine.new("
|
|
89
|
+
raise MissingLine.new("define_qlass_under<#{name}...", line)
|
|
90
90
|
end
|
|
91
91
|
|
|
92
92
|
loop do
|
data/lib/qt6/rspec/version.rb
CHANGED
data/lib/qt6/rspec.rb
CHANGED
|
@@ -8,7 +8,6 @@ module RubyQt6
|
|
|
8
8
|
module RSpec
|
|
9
9
|
VERIFY_QLASS_VIRTUAL_METHODS = [
|
|
10
10
|
"event", "event_filter", # QObject
|
|
11
|
-
"meta_object", # QObject
|
|
12
11
|
"connect_notify", "disconnect_notify", # QObject
|
|
13
12
|
"paint_engine", # QPaintDevice
|
|
14
13
|
"metric", # QPaintDevice
|
|
@@ -140,6 +139,7 @@ module RubyQt6
|
|
|
140
139
|
|
|
141
140
|
return if rbfile_contents.nil?
|
|
142
141
|
return if rbfile_contents.include?("# @see https://doc.qt.io/qt-6/#{qlass.name.downcase}.html")
|
|
142
|
+
return if rbfile_contents.include?("# @see https://api.kde.org/#{qlass.name.downcase}.html")
|
|
143
143
|
raise "#{rbfile}: docs: Missing `# @see https://doc.qt.io/qt-6/...`"
|
|
144
144
|
end
|
|
145
145
|
|
|
@@ -283,6 +283,14 @@ module RubyQt6
|
|
|
283
283
|
rbfile_metamethods = rbfile_contents.scan(/(signal|slot) "(.*)"/).map { |method| method[1] }
|
|
284
284
|
rbfile_metamethods = rbfile_metamethods.map { |method| method.split("(")[0] }.uniq
|
|
285
285
|
raise "#{rbfile}: q_object: Mismatch `#{rbfile_metamethods}` != `#{metamethods}`" if rbfile_metamethods != metamethods
|
|
286
|
+
|
|
287
|
+
meth = qlass.methods.find { |method| method.type == :rubyqt6_defined_functions && method.rbname == "_qobject_cast" }
|
|
288
|
+
raise "#{cppfile}: Method _qobject_cast is missing" if meth.nil?
|
|
289
|
+
raise "#{cppfile}: Method _qobject_cast invalid" unless meth.rawline.include?("[](QObject *object) -> const #{qlass.name} * { return qobject_cast<#{qlass.name} *>(object); })")
|
|
290
|
+
|
|
291
|
+
meth = qlass.methods.find { |method| method.type == :rubyqt6_defined_functions && method.rbname == "_static_meta_object" }
|
|
292
|
+
raise "#{cppfile}: Method _static_meta_object is missing" if meth.nil?
|
|
293
|
+
raise "#{cppfile}: Method _static_meta_object invalid" unless meth.rawline.include?("[]() -> const QMetaObject * { return &#{qlass.name}::staticMetaObject; })")
|
|
286
294
|
end
|
|
287
295
|
end
|
|
288
296
|
end
|