[Kde-bindings] KDE/kdebindings/qtruby/rubylib
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Mon Apr 10 16:03:47 UTC 2006
SVN commit 528289 by rdale:
* Added draganddrop/dropsite example
* Fixed bug where non-primitive signal types weren't working
CCMAIL: kde-bindings at kde.org
A examples/draganddrop/dropsite (directory)
A examples/draganddrop/dropsite/dropsitewidget.rb
A examples/draganddrop/dropsite/dropsitewindow.rb
A examples/draganddrop/dropsite/main.rb
M +15 -13 qtruby/handlers.cpp
M +1 -1 qtruby/marshall_types.cpp
--- trunk/KDE/kdebindings/qtruby/rubylib/qtruby/handlers.cpp #528288:528289
@@ -875,22 +875,24 @@
case Marshall::ToVALUE:
{
- QStringList *stringlist = static_cast<QStringList *>(m->item().s_voidp);
- if(!stringlist) {
- *(m->var()) = Qnil;
- break;
- }
+ QStringList *stringlist = static_cast<QStringList *>(m->item().s_voidp);
+ if (!stringlist) {
+ *(m->var()) = Qnil;
+ break;
+ }
- VALUE av = rb_ary_new();
- for(QStringList::Iterator it = stringlist->begin(); it != stringlist->end(); ++it) {
- VALUE rv = rstringFromQString(&(*it));
- rb_ary_push(av, rv);
- }
+ VALUE av = rb_ary_new();
+ for (QStringList::Iterator it = stringlist->begin(); it != stringlist->end(); ++it) {
+ VALUE rv = rstringFromQString(&(*it));
+ rb_ary_push(av, rv);
+ }
- if(m->cleanup())
- delete stringlist;
+ *(m->var()) = av;
- *(m->var()) = av;
+ if (m->cleanup()) {
+ delete stringlist;
+ }
+
}
break;
default:
--- trunk/KDE/kdebindings/qtruby/rubylib/qtruby/marshall_types.cpp #528288:528289
@@ -359,7 +359,7 @@
}
case Smoke::t_class:
case Smoke::t_voidp:
- p = si->s_voidp;
+ p = &si->s_voidp;
break;
default:
p = 0;
More information about the Kde-bindings
mailing list