Closed kalinon closed 4 years ago
From what I can see the changes look good in general. There are just two things I'll change after merge, one is to keep the check for Time.local vs Time.now, and the other is to remove/leave out the explicit check for Qt::Key in ZaWertun's sources. This was already submitted as a PR and not accepted by Stefan because he wants to keep bindgen sources clean of any specific Qt customizations.
From what I can see the changes look good in general. There are just two things I'll change after merge, one is to keep the check for Time.local vs Time.now, and the other is to remove/leave out the explicit check for Qt::Key in ZaWertun's sources. This was already submitted as a PR and not accepted by Stefan because he wants to keep bindgen sources clean of any specific Qt customizations.
This change has been made configurable and not hard coded long time ago, see: https://github.com/ZaWertun/bindgen/commit/8d2da829517ded275ae5d531206f05b366c8bed2 + https://github.com/ZaWertun/qt5.cr/commit/b3bce17c13d9579c04923814408d2cb4ed572120.
Yes, yes, but somehow the old code ended up in the proposed PR:
diff --git a/src/bindgen/generator/crystal.cr b/src/bindgen/generator/crystal.cr
index 69ea7a8..fc4a164 100644
--- a/src/bindgen/generator/crystal.cr
+++ b/src/bindgen/generator/crystal.cr
@@ -75,10 +75,7 @@ module Bindgen
puts "@[Flags]" if enumeration.origin.flags?
code_block "enum", enumeration.name, ":", type_name do
enumeration.origin.values.each do |name, value|
- puts "#{name.camelcase} = #{value}"
+ unless enumeration.path_name == "Qt::Key"
+ name = name.camelcase
+ end
+ puts "#{name} = #{value}"
end
end
end
This is the old code that should not be in, right?
Damn, just forgot to revert it. It must work without that hack now.
Pulling fork from @ZaWertun. Changes to
clang/find_clang.cr
were dropped for now.Needs #25 first