ruby-qt6-rspec 2.1.0 → 6.1.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 +17 -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: b9f48e9bb6f936b33d5be9fd924daf88e1f8b0b73a9129d342183bbc6f89c3d0
|
|
4
|
+
data.tar.gz: d1c9ef69ae959c2b85a9475496b65d9042a13cdfe89930da3bb03508b21a0e7f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 14aba37e801e9693d55bf98e2eae01bbb09f64d1d7b668985f4ed1f7dcaa704be64048be24cbaa076fa3a6ede360b589575c649263220055d84d9f06dc77cbe7
|
|
7
|
+
data.tar.gz: 9613255594593f0fdd3388c49c9c4620e352428529506585c86628a72ceb68ec551ce3c2a31e485a61d46d69e650167ca3429d507d53ff4a3fdf89e306e4eba1
|
|
@@ -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,8 +8,8 @@ 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
|
|
12
|
+
"parent", # QObject
|
|
13
13
|
"paint_engine", # QPaintDevice
|
|
14
14
|
"metric", # QPaintDevice
|
|
15
15
|
"has_height_for_width", "height_for_width", # QWidget
|
|
@@ -29,12 +29,19 @@ module RubyQt6
|
|
|
29
29
|
]
|
|
30
30
|
NO_VERIFY_QLASS_VIRTUAL_METHODS = {
|
|
31
31
|
"QCoreApplication" => ["post_event", "send_event"],
|
|
32
|
+
"QItemSelectionRange" => ["parent"],
|
|
33
|
+
"QModelIndex" => ["parent"],
|
|
34
|
+
"QStandardItem" => ["parent"],
|
|
35
|
+
"QTreeWidgetItem" => ["parent"],
|
|
32
36
|
"QLayoutItem" => ["has_height_for_width", "height_for_width", "maximum_size", "minimum_size", "size_hint"],
|
|
33
37
|
"QLayout" => ["maximum_size", "minimum_size"],
|
|
34
38
|
"QWidget" => ["maximum_size", "minimum_size", "minimum_size_hint", "size_hint"],
|
|
35
39
|
"QWindow" => ["maximum_size", "minimum_size"]
|
|
36
40
|
}
|
|
37
41
|
NO_VERIFY_QLASS_LEADING_UNDERSCORE_METHODS = {
|
|
42
|
+
"QSortFilterProxyModel" => ["_parent"],
|
|
43
|
+
"QFileSystemModel" => ["_parent"],
|
|
44
|
+
"QStandardItemModel" => ["_parent"],
|
|
38
45
|
"QObject" => ["_connect", "_disconnect"],
|
|
39
46
|
"QApplication" => ["_all_widgets", "_top_level_widgets"]
|
|
40
47
|
}
|
|
@@ -140,6 +147,7 @@ module RubyQt6
|
|
|
140
147
|
|
|
141
148
|
return if rbfile_contents.nil?
|
|
142
149
|
return if rbfile_contents.include?("# @see https://doc.qt.io/qt-6/#{qlass.name.downcase}.html")
|
|
150
|
+
return if rbfile_contents.include?("# @see https://api.kde.org/#{qlass.name.downcase}.html")
|
|
143
151
|
raise "#{rbfile}: docs: Missing `# @see https://doc.qt.io/qt-6/...`"
|
|
144
152
|
end
|
|
145
153
|
|
|
@@ -283,6 +291,14 @@ module RubyQt6
|
|
|
283
291
|
rbfile_metamethods = rbfile_contents.scan(/(signal|slot) "(.*)"/).map { |method| method[1] }
|
|
284
292
|
rbfile_metamethods = rbfile_metamethods.map { |method| method.split("(")[0] }.uniq
|
|
285
293
|
raise "#{rbfile}: q_object: Mismatch `#{rbfile_metamethods}` != `#{metamethods}`" if rbfile_metamethods != metamethods
|
|
294
|
+
|
|
295
|
+
meth = qlass.methods.find { |method| method.type == :rubyqt6_defined_functions && method.rbname == "_qobject_cast" }
|
|
296
|
+
raise "#{cppfile}: Method _qobject_cast is missing" if meth.nil?
|
|
297
|
+
raise "#{cppfile}: Method _qobject_cast invalid" unless meth.rawline.include?("[](QObject *object) -> const #{qlass.name} * { return qobject_cast<#{qlass.name} *>(object); })")
|
|
298
|
+
|
|
299
|
+
meth = qlass.methods.find { |method| method.type == :rubyqt6_defined_functions && method.rbname == "_static_meta_object" }
|
|
300
|
+
raise "#{cppfile}: Method _static_meta_object is missing" if meth.nil?
|
|
301
|
+
raise "#{cppfile}: Method _static_meta_object invalid" unless meth.rawline.include?("[]() -> const QMetaObject * { return &#{qlass.name}::staticMetaObject; })")
|
|
286
302
|
end
|
|
287
303
|
end
|
|
288
304
|
end
|