[Kde-bindings] Follow the QtCreator's class structure, change output of rbuic4

airh2002 airh2002 at oak.dti.ne.jp
Tue Jun 16 13:17:30 UTC 2009


QtCreator is an IDE released from QtSoftware and with Qt SDK.
Its default generating classes are well-designed.

I think, can I represent rbuic4's output as that?
So I try to fix some codes and succeed in my environment(Qt 4.5.1, Ruby 1.9.1).

I change these files:
    kdebindings/ruby/qtruby/tools/rbuic/option.h
    kdebindings/ruby/qtruby/tools/rbuic/uic.cpp
    kdebindings/ruby/qtruby/tools/rbuic/ruby/rbwritedeclaration.cpp
    kdebindings/ruby/qtruby/tools/rbuic/ruby/rbwriteinitialization.cpp

summary of changes:
(1)naming rule and is changed
--------------------------------
class name to include UI
  ex) Ui::ProjectName
top level object name
  ex) projectName
class name to be executed( and initialize UI class in this class)
  ex) ProjectName
--------------------------------

(2)related changes
--------------------------------
* change intend level from 4 to 2
* add ObjectSpace#finalizer corresponding Qt's destructor
* change method name 'setupUi' and 'retranslateUi' from camelCase to snake_case and alias new to old
* capitalize option.postfix
* remove option.prefix obsoletely
--------------------------------

Finally, I attach these change as patch file(suffix .diff).
It's worthy to try.

Youhei Kondou

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: option.h.diff
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20090616/c46cd59c/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rbwritedeclaration.cpp.diff
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20090616/c46cd59c/attachment-0001.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rbwriteinitialization.cpp.diff
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20090616/c46cd59c/attachment-0002.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: uic.cpp.diff
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20090616/c46cd59c/attachment-0003.ksh>


More information about the Kde-bindings mailing list