Version: Rev: 1097205 Last Changed Date: 2010-03-01 (using KDE 4.4.0) OS: Linux Installed from: Compiled From Sources in qtruby scripts when accessing properties, cause method missing error. -- code snippet l = Qt::LineEdit.new puts l.modified puts l.undoAvailable like these properties which has different name from real accessing method (in the above example, modified is accessed by isModified method) cause method missing error.
here is a my try of fixing the bug for reference. diff -x .svn -uNrb kdebindings-latest/ruby/qtruby/src/Qt.cpp kdebindings-fix/ruby/qtruby/src/Qt.cpp --- kdebindings-latest/ruby/qtruby/src/Qt.cpp 2010-03-05 11:10:05.000000000 +0900 +++ kdebindings-fix/ruby/qtruby/src/Qt.cpp 2010-03-07 17:55:23.000000000 +0900 @@ -830,11 +830,15 @@ // Check for property getter/setter calls, and for slots in QObject classes // not in the smoke library smokeruby_object *o = value_obj_info(self); + static Smoke::ModuleIndex qobjId = Smoke::NullModuleIndex; + if (qobjId.index == 0) { + qobjId = Smoke::findClass("QObject"); + } if ( o != 0 && o->ptr != 0 - && o->smoke->isDerivedFrom(o->smoke, o->classId, o->smoke->idClass("QObject").smoke, o->smoke->idClass("QObject").index) ) + && o->smoke->isDerivedFrom(o->smoke, o->classId, qobjId.smoke, qobjId.index ) ) { - QObject * qobject = (QObject *) o->smoke->cast(o->ptr, o->classId, o->smoke->idClass("QObject").index); + QObject * qobject = (QObject *) o->smoke->cast(o->ptr, o->classId, o->smoke->idClass("QObject", true).index); static QByteArray * name = 0; if (name == 0) { name = new QByteArray();
On Sunday 07 March 2010 09:36:47 am ruby.twiddler@gmail.com wrote: > https://bugs.kde.org/show_bug.cgi?id=229784 > > > > > > --- Comment #1 from <ruby twiddler gmail com> 2010-03-07 10:35:26 --- > here is a my try of fixing the bug for reference. > > diff -x .svn -uNrb kdebindings-latest/ruby/qtruby/src/Qt.cpp > kdebindings-fix/ruby/qtruby/src/Qt.cpp > --- kdebindings-latest/ruby/qtruby/src/Qt.cpp 2010-03-05 > 11:10:05.000000000 +0900 > +++ kdebindings-fix/ruby/qtruby/src/Qt.cpp 2010-03-07 17:55:23.000000000 > +0900 > @@ -830,11 +830,15 @@ > // Check for property getter/setter calls, and for > slots in QObject classes > // not in the smoke library > smokeruby_object *o = value_obj_info(self); > + static Smoke::ModuleIndex qobjId = > Smoke::NullModuleIndex; > + if (qobjId.index == 0) { > + qobjId = > Smoke::findClass("QObject"); > + } > if ( o != 0 > && o->ptr != 0 > - && o->smoke->isDerivedFrom(o->smoke, > o->classId, o->smoke->idClass("QObject").smoke, > o->smoke->idClass("QObject").index) ) + && > o->smoke->isDerivedFrom(o->smoke, o->classId, qobjId.smoke, qobjId.index ) > ) > { > - QObject * qobject = (QObject *) > o->smoke->cast(o->ptr, o->classId, o->smoke->idClass("QObject").index); > + QObject * qobject = (QObject > *) o->smoke->cast(o->ptr, o->classId, o->smoke->idClass("QObject", > true).index); static QByteArray * name = 0; > if (name == 0) { > name = new QByteArray(); Thanks for the bug report and patch - I've fixed the code as per the patch, apart from not adding the 'qobjid' intermediate variable and just called Smoke::findClass("QObject") in the condition directly. -- Richard
Thank you very much for your quick update.
Dear Bug Submitter, This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond. Thank you for helping us make KDE software even better for everyone!
Dear Bug Submitter, This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? Thank you for helping us make KDE software even better for everyone!
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version? If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!