-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathChangeLog
3761 lines (2760 loc) · 131 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2012-05-02 Richard Dale <[email protected]>
* Add missing 'GLuint' and 'GLint' marshallers. Fixes bug reported by
twelvechairs on #qtruby - thanks for the report.
2012-04-11 Richard Dale <[email protected]>
* Fix bug in Qt::Variant#value where it as failing for ushort and QChar
variants. Thanks to Yaohan Chen for reporting the bug
2012-04-09 Richard Dale <[email protected]>
* Rename rb_str_catf() as qtruby_str_catf() as it clashes with a function
in Ruby 1.9.2 with the same name
2011-05-30 Richard Dale <[email protected]>
* 'long long' types were no longer being marshalled correctly
2011-04-27 Richard Dale <[email protected]>
* In the Qt::Application constructor, when converting ARGV to the C style
'int argc, char * argv[]' format, 'argc' was always set to 2
2011-04-23 Richard Dale <[email protected]>
* Apply a patch from David Palacio which fixes a crash when creating a
Qt::Variant from a list or a hash
2010-06-22 Richard Dale <[email protected]>
* Added snakecase versions of the methods in the Qt::DBusConnectionInterface
class
* Fixed bug with missing QVector<double> marshaller. Fixes problem reported
by Sylvain Sauvage http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=586672
Thanks for the bug report.
2010-03-18 Richard Dale <[email protected]>
* Qualify all Qt includes with the module name, as not doing so is a bad
idea IMHO.
2010-03-14 Richard Dale <[email protected]>
* The QtDBus classes weren't being correctly initialized as the count of
classes was being taken from the QtSvg smoke lib. Thanks to Paulo
Capriotti for finding the bug.
2010-03-07 Richard Dale <[email protected]>
* Fixed Qt::Object properties that were no longer working. Fixes bug 229784
reported by ruby.twiddler
* Drag and drop events in Plasma applets weren't being handled correctly.
Fixes problem reported by Robert Riemann
* QtRuby overrides public_methods(), singleton_methods() and
protected_methods(), but omitted the optional 'all' argument. Thanks to
Paolo Capriotti for the fix and bug report.
2009-12-11 Richard Dale <[email protected]>
* Qt::DynamicPropertyChangeEvents were not being created correctly. Thanks
to Snufkin for reporting the bug.
2009-11-13 Richard Dale <[email protected]>
* The QtTest module expects test slots to be private which isn't possible
in QtRuby, so add a 'private_slots' method to declare them. For example:
class MyFirstTest < Qt::Object
private_slots :initTestCase, :myFirstTest,
:mySecondTest, :cleanupTestCase
2009-11-12 Richard Dale <[email protected]>
* The Qt::SizePolicy.horizontalStretch= method wasn't working with a Smoke
library created with the new generator as the type 'unsigned char' wasn't
recognized. Thanks to Stefano Crocco for reporting the bug.
* Applied a patch from Davor Ocelic. Here's an overview of the changes:
ruby/qtruby/src/handlers.cpp:
Added { "unsigned char*", marshall_ucharP } so that conversion
from String to "unsigned char*" would work. Qt code doesn't
have unsigned char*, but Smoke seems to internally convert
uchar* to unsigned char*.
ruby/qtruby/src/Qt.cpp:
The code at the place of patch checks whether a method is overriden
in Ruby. But during GC, it's not allowed to execute Ruby code anyway,
so the patch removes this check altogether. (In rare, but existing
situations, this check itself lead to new object allocation, crashing
the application).
(New info: the function we've used to check if it's running during
GC or not seems to be Ruby 1.9 specific, so a simple compatibility
for 1.8 should be added before committing).
ruby/qtruby/src/lib/Qt/qtruby4.rb
1) Added GC.disable around line of code that says: "@block = block".
This makes a difference between being and being not able to run
with GC.stress= true. Reason unclear, comments appreciated.
2) Extended typename =~ /^(?:u?char\*)$/ checks to support
unsigned char.
3) Skip "def instance_exec" if it is already defined
(it is in Ruby 1.9)
* Thanks to Davor for the patch
* Added a patch from 'Ruby Twiddler'. Qt::DBusInterface.call() didn't work
when the first argument is an enum. For example:
iface = Qt::DBusInterface.new(SERVICE_NAME, "", "",
Qt::DBusConnection.sessionBus)
msg = iface.call(Qt::DBus::BlockWithGui, "somemethod", param)
p msg # => nil
reply = Qt::DBusReply.new(msg) # => Error!
* Thanks to Twiddler for the patch
2009-08-19 Richard Dale <[email protected]>
* Added a patch from Youhei Kondou to make the is_a? and kind_of? methods
use the C++ class ancestors obtained from the smoke libary
2009-07-24 Richard Dale <[email protected]>
* Replace the obsolete STR2CSTR macro with StringValueCStr to make QtRuby
compile with Ruby 1.9.2. Thanks to Youhei Kondou for the patch.
2009-07-21 Richard Dale <[email protected]>
* Revert a commit made by 'divide' some time ago. It was a hack to allow
primitive types to be passed as arguments where the expected arg type
was a Qt::Variant. However, it subverts the 'munged method name' scheme
of fast overloaded method resolution because for every method argument of
type '#' (a class), it adds another of type '$' (a primitive type). So
with that scheme we might as well have only two of the munged method
types instead of three. Sometime we need to add support for C++ implicit
constructors in resolving overloaded methods at runtime, but that is a
really hard problem. In the meantime I think it is best to add support
for implicitely converting args to Qt::Variants on a case by case basis,
such as was done for the QtDBus and Plasma Data Engine apis.
2009-06-23 Richard Dale <[email protected]>
* In smokeruby_mark() layouts owned by QWidgets or QGraphicsWidgets are
now marked. Items owned by QLayouts or QGraphicsLayouts are also marked.
This fixes some premature garbage collection problems in Plasma Applets,
reported by David Palacio.
2009-06-18 Richard Dale <[email protected]>
* Made Qt::ItemSelection Enumerable
2009-04-24 Richard Dale <[email protected]>
* The resolve_classname() function was not resolving names for QObject
derived classes when the class wasn't in the base Qt smoke library.
For instance, this meant that a Plasma::Applet was not being resolved to
a Plasma::PopupApplet to match the underlying C++ type.
2009-04-17 Richard Dale <[email protected]>
* When Qt::StandardItemModel#setItemPrototype was used with a
Qt::StandardItem it crashed because the clone() method was using
Object#clone. So special case the clone() method. Thanks to Stefano Crocco
for reporting the bug.
2009-04-07 Richard Dale <[email protected]>
* The ActiveRecord based model classes were setting changed values in the
'attributes' and then saving the changed instance, like this
foo.attributes['my_att'] = value
foo.save
However, this no longer works with ActiveRecord, and the instance can
be changed more directly like this
foo['my_att'] = value
foo.save
* QtRuby wasn't building on Mac OS X with a version of Qt built without
QtDBus support, so add some #ifdefs to fix that
2009-03-24 Richard Dale <[email protected]>
* Raised the QtRuby version to 2.0.3 for the RubyForge release
2009-03-20 Richard Dale <[email protected]>
* Remove 'LIBRARY' from this line in qtruby/src/CMakeLists.txt:
install(TARGETS qtruby4shared
LIBRARY DESTINATION
${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX} )
It was causing problems with a configuration error when building QtRuby
on Windows. Thanks to David Palacio for reporting the problem
2009-03-19 Richard Dale <[email protected]>
* The rbqtap was calling 'each' on a string which no longer works in Ruby
1.9.1 as they aren't Enumerable. So use split instead so that the code
works on both Ruby 1.8.x and 1.9.1. Thanks to Youhei Kondou for the bug
report and fix.
* The inspect method for Qt::SizePolicy instances was wrong
2009-03-16 Richard Dale <[email protected]>
* Make the dispose() method always return nil. Otherwise, when an instance
is deleted from within irb, it makes irb crash when it tries to run
run inspect() on the newly deleted value returned by dispose(). Thanks
to Stefano Crocco for finding the problem.
* A problem has been found with QtRuby when it is run with Ruby 1.9.1
and GC.stess is true. Thanks to Davor Ocelic for reporting it.
In the smokeruby_mark() function called during garbage collection,
any virtual methods which are called on the instances being checked
could have overriden by Ruby methods. So the Wt::Ruby runtime uses
'respond_to()' to find out whether they have been overriden.
However, this involves calling 'rb_intern()' on the method name,
which means memory could be allocated, giving an error when running under
GC.stress mode. So workround it by pre-allocating any strings with
rb_intern() for all the C++ methods used in smokeruby_mark()
2009-03-13 Richard Dale <[email protected]>
* Improved the rbqtapi '-s' option
2009-03-11 Richard Dale <[email protected]>
* Rewritten the rbqtapi command line tool to simplify the code
- Added a '-r' or '--require' option for specifying QtRuby extension.
This means that there is no longer a need for different sym links to
the script for each QtRuby extension.
- One or more class names can be specifed. If no class name is given
it means that all of the classes in the loaded QtRuby extensions
should be searched
- A '-s' option attempts to show matching methods with Ruby types
* Removed the rbqtsh program as it was never really very useful
* The 'Type' enum was not working with the Qt::Graphics* classes, and so
special case them as Ruby constants
2009-03-10 Richard Dale <[email protected]>
* Change the license text in the QtRuby headers to LGPL
2009-03-02 Richard Dale <[email protected]>
* Add method_missing and const_missing handlers for top level modules such
as Soprano
2009-02-25 Richard Dale <[email protected]>
* Restored the note in the COPYING file about having permission from
Trolltech, now Qt Software, to use the 'Qt' in QtRuby.
2009-02-07 Richard Dale <[email protected]>
* Add a Qt::dynamic_cast method as a synonym with a less clunky name for
Qt::Internal.cast_object_to
2009-02-04 Richard Dale <[email protected]>
* In Ruby 1.9.1 the arity of a block with no arguments is 0, whereas in
Ruby 1.8.x it is -1. This meant that blocks passed to QtRuby
constructors with no args weren't working with Ruby 1.9.1
2009-02-02 Richard Dale <[email protected]>
* Set up a RUBY_VERSION macro to use to test for whether QtRuby is being
built for Ruby 1.9 or not. Add patches from Mr Napalm for building with
Ruby 1.9, for the new 'per string' encoding. Also add conditional code
for whether to use the new rb_frame_callee() function or the old
rb_frame_last_func() one.
2009-02-01 Richard Dale <[email protected]>
* The construct_copy() function was using the full classname of the class
to construct which meant that it didn't work with classnames containing
'::' scope operators. So strip out the scope part of the classname to
create the consructor name.
* Make Qt::Internal#try_initialize catch a ':newqt' symbol rather than a
string.
2009-01-14 Richard Dale <[email protected]>
* For the enum values whose names clashed with Ruby classes, make them
Qt::Enums instead of just Fixnums
2009-01-13 Richard Dale <[email protected]>
* Upped the QtRuby version number to 2.0.0
* Special cased some constants whose names clashed with Ruby classes.
2008-12-19 Richard Dale <[email protected]>
* When the construct_copy() function was used to copy and instance, it
wasn't initializing the binding for the new instance. This caused a
crash when the destructor for the instance tried to make a callback with
the null binding. Fixes a crash in a Qt::Image destructor reported by David
Palacio
2008-12-18 Richard Dale <[email protected]>
* Added another patch from Davor Ocelic for Ruby 1.9 compatible RSTRING
usage - thanks Davor
2008-12-12 Richard Dale <[email protected]>
* When resolving overloaded methods with 'uchar*' and 'const uchar*' arg
types prefer the non-const version of the arg. Thanks to Davor Ocelic
for explaining why this was a good idea in the case of the Qt::Image
constructors.
* Revert the recent change for marshalling 'unsigned char*' types which
expected them to be null terminated. After more thought it is pretty
likely they won't be null terminated because if they were they would
have been defined as just 'char *' instead. It better to have a clear
message saying they aren't supported and need special casing, rather
than needing to track down possible random buggy effects.
* Added Davor Ocelic's patch for Ruby 1.9 compatible RSTRING usage and
improved instructions for building QtRuby without KDE.
* When an overriden virtual method with a non-const QVector/QList argument
was called, such as Generator.openDocument() in Okular, the Ruby values
in the Ruby Array were not being converted back to the values in the
C++ list after the method call. Thanks to David Palacio for the bug
report.
2008-12-11 Richard Dale <[email protected]>
* Make some changes from the patch at
http://napalm.sf.cz/qt4-qtruby-ruby1.9.patch to make it easier to port
qtruby to Ruby 1.9. Thanks to Davor Ocelic and Mr Napalm.
2008-12-10 Richard Dale <[email protected]>
* Special case the Qt::Image.bits() method. Use the const variant so that
Qt doesn't make a deep copy. Is that what Davor Ocelic and David Palacio
would like it to do?
* For other uses of 'uchar *' return types add a marshaller, hoping that
will be null terminated.
* Add a Qt::Image.scanLine() method
2008-12-09 Richard Dale <[email protected]>
* Added an ancestors() method to Qt::Base that returns an Array of the
super classes of a class in the Smoke library. For instance:
irb(main):001:0> Qt::Widget.ancestors
=> [Qt::Widget, Qt::Object, Qt::PaintDevice, Object, Kernel]
* Fixed regression caused by adding to Qt::Object.connect() the feature
to connect an arbitrary ruby method to a signal. It was causing the
standard three argument form of connect() to not work.
* Renamed the QHash of smoke index against class name as 'IdToClassNameMap'
instead of 'classname'.
* The child items of a QGraphicsItem are marked as not needing garbage
collection of they have corresponding ruby instances.
2008-12-04 Richard Dale <[email protected]>
* From Bartosz Wadolowski (thanks for the patch):
unsigned char* marshalling in qtruby didn't work. The patch works as char*
case does - I simply copied code and added one casting.
It also fixes method matching with string argument in qtruby4.rb. In
cases when method could take constant or regular (unsigned)char
pointer Qt::Internal.checkarg was returning the same value. Now in
case of constant arguments it returns lower value. I also made this
part of code a little bit more readable.
Those changes made possible to use those QImage constructors and
probably some other methods:
QImage ( uchar * data, int width, int height, Format format )
QImage ( const uchar * data, int width, int height, Format format )
QImage ( uchar * data, int width, int height, int bytesPerLine, Format
format )
QImage ( const uchar * data, int width, int height, int bytesPerLine,
Format format )
IMPORTANT NOTE:
Some Qt/KDE objects use Ruby String*, passed as (unsigned )char*
method argument, as internal buffer/array(call it as you like). In
those cases programmer need to make sure that Ruby String object is
not being garbage collected or changed(in most cases) for the time its
being used by Qt/KDE object. It is also quite possible that Qt/KDE
object will change Ruby String (or rather its internal C char array).
2008-11-24 Richard Dale <[email protected]>
* Added a DEF_MAP_MARSHALLER() macro for defining marshallers for
QMaps with QString keys and value types as the values
* The YAML library was adding a y() method to Kernel, which was messing
up the inspect() methods for Qt::Rects and Qt::RectFs. So instead of
calling y(), call self.y() instead. Thanks to Stefano Crocco for the
bug report and fix.
2008-11-17 Richard Dale <[email protected]>
* Comparisons between Qt instances and nil were causing QtRuby to
crash. Fixes bug reported by Stefano Crocco.
2008-09-22 Richard Dale <[email protected]>
* Rename get_VALUEtype() as value_to_type_flag()
* Change the inspect() method for Qt::Rects and RectFs to use the
Qt4 convention of x, y, width, height
* module_method_missing() had the Qt:: module hard wired into it, and
so constants in other modules wouldn't be found
2008-08-22 Richard Dale <[email protected]>
* Argument types of 'unsigned short' were not being matched in the
overloaded method resolution code which was causing a Qt::KeyEvent
constructor to fail. Fixes a problem reported by Stefano Crocco.
2008-08-18 Richard Dale <[email protected]>
* The disposed? method was round the wrong way, and true if an instance
had not been disposed. Thanks to Stefano Crocco for finding the bug.
2008-08-12 Richard Dale <[email protected]>
* The new qobject_cast() method was wrongly changing the smoke classId of
the Ruby source instance. This was messing up method calls such as
empty?, and fixes a problem reported by Stefano Crocco (thanks again
Stefano for all these reports!).
2008-08-11 Richard Dale <[email protected]>
* Added a qobject_cast() method that uses qt_metacast() to cast one
instance of QObject to another. This allow the KTextEditor::
interface classes to be used. Fixes a problem reported by Stefano
Crocco. Example usage:
doc = KTextEditor::EditorChooser.editor('katepart').create_document( nil)
annotator = doc.qobject_cast(KTextEditor::AnnotationInterface)
* Special case the Qt::SignalMapper#mapping and Qt::SignalMapper#setMapping
methods so they work with both Qt::Object and Qt::Widget arguments as it
confuses the method overloading resolution code at present.
* Add lower case/underscore methods as well as camel case for special cased
methods
2008-08-10 Richard Dale <[email protected]>
* Fix a bug reported by Stefano Crocco where primitives types and QStrings
were not working as arguments to slots and signals in smoke libs outside
the qt one.
2008-08-07 Richard Dale <[email protected]>
* Fix the Qt::CoreApplication constructor so it handles the ARGV array
correctly
2008-07-28 Richard Dale <[email protected]>
* The code to look up the types of slot arguments was failing for types
in the KTextEditor library
2008-07-21 Richard Dale <[email protected]>
* Qt::Variant.fromValue() and Qt::Variant.value() now both work correctly
with custom types, after a regression in the change to modular smoke.
It should no longer be necessary to use qVariantValue() or
qVariantFromValue().
* In the smoke library method calls for pure virtual methods were not
being generated, only callbacks to override them. However, that
meant that interfaces which were based on classes with pure virtual
methods, with private implementation classes wouldn't work. This fixes
a problem reported by Stefano Crocco where he found the ktexteditor
ruby extension didn't work.
2008-07-20 Arno Rehn <[email protected]>
* Put the classes derived from Marshall in the 'QtRuby' namespace.
* Set the SmokeBinding for each class individually by calling the
method with index 0 on the instance.
2008-07-18 Richard Dale <[email protected]>
* Fixed the Qt::Application constructor so that it can subclassed. Thanks
to Stefano Crocco for reporting the bug
2008-07-13 Cyrille Berger <[email protected]>
* Reverting kross2smoke to use a pointer, since that what kross use for now.
2008-07-13 Richard Dale <[email protected]>
* Remove the smoke2kross() function as it isn't needed anymore. Change
the kross2smoke() function so that it assumes Kross will return a
pointer to a pointer, instead of just a pointer to the C++ instance.
2008-07-12 Richard Dale <[email protected]>
* Change the layout of the smokeruby_object struct so that the ptr to
the C++ instance is at the start. This should make it easier for
QtRuby to interoperate with Kross
* The type of a slot arg should always be in the smoke module of the slot
being invoked. However, that isn't true for a dataUpdated() slot in a
PlasmaScripting::Applet. So make GetMocArguments search through all the
loaded smoke modules if the arg type isn't found at first.
* In the GC mark function the tests for a QObject type had gone missing, so
restore it.
2008-07-11 Cyrille Berger <[email protected]>
* Make it possible to call set_qtruby_embedded from ruby.
2008-07-03 Richard Dale <[email protected]>
* Fixed bug in the rbuic4 tool where a QPixmap constructor was not being
converted to ruby correctly. Thanks to Henrik Tikanvaara for reporting
the error.
2008-06-30 Richard Dale <[email protected]>
* When a ruby value was marshalled to C++, and the actual type of
the C++ instance was cast to the type of the return value, it
was working correctly if the target type for the cast wasn't in
the same smoke module as the type of the instance. For instance,
an instance of type Plasma::Applet wasn't being correctly cast
to a QGraphicsLayoutItem, which caused a crash.
* Fixed a similar bug to the above description, but for where the target
of a method call was being cast to the correct class. For instance,
a call of parentWidget() on a Plasma::Applet() needed the correct cast
to a QWidget for it to work. This fixes the strange error messages in
Plasma applets like the clock, about zero pixmap sizes and QPainter
problems.
2008-06-28 Arno Rehn <[email protected]>
* Special case QDBusVariants in SlotReturnValue and make it behave
like the moc. This makes the complexpingpong example work.
Maybe more things need to be special cased, like in
SigSlotBase::prepareReturnValue().
* Add special cases for lists and maps to
SigSlotBase::prepareReturnValue().
* Add 'QList<QObject*>' to the handlers array.
* Small fixes to complexping.rb.
2008-06-23 Richard Dale <[email protected]>
* Change prepareQtReturnType from a standalone function to a method
in the SigSlotBase class. It should work with int types, and fix
the bug reported by Stefano Crocco.
2008-06-22 Richard Dale <[email protected]>
* Fix bug in resolve_classname_qt() caused by missing break statments
* Move list marshaller macro definitions to the top of the
marshall_macros.h header, and add a DEF_HASH_MARSHALLER macro
* Add a set_qtruby_embedded() function to qtruby for use with plugins
like plasma
2008-06-20 Arno Rehn <[email protected]>
* Fix bug reported by Stefano Crocco. qt_metacall tried to write
data via an uninitialized pointer.
2008-06-20 Richard Dale <[email protected]>
* Partly fix bug reported by Stefan Crocco - this explains why a slot
return value of type QPoint was nil. However, it's value is wrong,
and the problem with a QString return value crashing is still not
explained.
2008-06-13 Richard Dale <[email protected]>
* Remove unnecessary special casing for Qt::TextEdit::ExtraSelection,
just make it an ording QtRuby class instead of a Struct, and add a
marshaller for QList<QTextEdit::ExtraSelection>
2008-06-14 Arno Rehn <[email protected]>
* Since every smoke module defines a class 'QGlobalSpace', don't rely
on Smoke::classMap and search every smoke module for methods of this
class.
2008-06-13 Richard Dale <[email protected]>
* Pass the resolve_classname() functions a 'smokeruby_object *' so that
they can change the smoke lib and classId on it.
* Added Qt::KeySequence inspect and pretty_print methods
2008-06-12 Richard Dale <[email protected]>
* When resolve_classname_qt() was given a class outside the Qt smoke
library, such as KAction, it was failing to resolve it. This was
because it was only looking in the smoke library of the arg type
declared in the method. Hence, an arg type of 'QAction' was not
being resolved to 'KAction'. Thanks to Stefano Crocco for reporting
the bug.
2008-06-09 Richard Dale <[email protected]>
* The rb_id2name() function has changed to return a 'const char *'
in Ruby 1.8.7, which meant the QtRuby wouldn't compile. So attempt
to make it build on both 1.8.6 and 1.8.7. Thanks to Stefano Crocco
for reporting the bug.
2008-06-08 Richard Dale <[email protected]>
* Move the template based List marshallers to a new header
marshall.macros.h and add marshallers for QLinkedList types
2008-06-05 Richard Dale <[email protected]>
* Make the template based QList marshallers more DRY by moving them
to marshall_complex.h instead of copied into every extension.
2008-06-04 Richard Dale <[email protected]>
* Make it possible to include marshall_basetypes.h so that korundum
can build
2008-05-31 Arno Rehn <[email protected]>
* Updated qtruby.cpp's header.
2008-05-29 Richard Dale <[email protected]>
* Fixed bug in the FindAllMethods() f'n, and made the debug logging work
when a method couldn't be found in do_method_missing()
2008-05-28 Richard Dale <[email protected]>
* The enum Qt::Process::StandardError was clashing with the exception of
the same name, so add a constant to the Qt::Process class instead.
Thanks to Stefano Crocco for reporting the bug.
2008-05-22 Arno Rehn <[email protected]>
* Fixed dumpCandidates().
2008-05-19 Richard Dale <[email protected]>
* The method selector cache function had an off by one error, which meant
it assumed there was one more argument to a method than there actually
was. This caused a crash. Why such a major problem hasn't caused any
problems before is a mystery - it wasn't a result of the modular smoke
changes.
* qtruby4.rb calls Kernel#y instead of Qt::Point#y on inspect and
pretty_print when the yaml gem is loaded.
The attached patch fixes the problem by calling Qt::Point#y and
Qt::PointF#y explicitly. Thanks to Paolo Capriotti for the bug report
and fix.
2008-05-16 Arno Rehn <[email protected]>
* Bring qtruby.cpp up to date with the branch-version.
2008-05-16 Richard Dale <[email protected]>
* Rename the 'modules' global variable qtruby_modules to reduce the chances
of a name clash
2008-04-29 Richard Dale <[email protected]>
* Added a marshaller for references to unsigned ints
* Added initialization for the various KDE::ConfigSkeleton classes
2008-04-24 Richard Dale <[email protected]>
* Fixed a couple of differences between C++ code generation and Ruby.
The variable names weren't being stripped of any leading 'q' or 'k',
and the brush initialization hadn't been updated for Qt 4.4.
2008-04-22 Sebastian Sauer <[email protected]>
* Fix reported crash on shutdown if QtRuby is used embedded.
2008-04-14 Richard Dale <[email protected]>
* Special case the KDE::DateTime and KDE::TimeZone classes so that
nested classes, such as KDE::DateTime::Spec work with them.
TODO: make this work automatically without needing extra code.
2008-04-10 Richard Dale <[email protected]>
* When matching arg types, strip off an '::Ptr' or 'Ptr' at the end
of the type. This is to ensure that something like a KDE::Service
ruby instance can be passed to a method expecting a type of
KService::Ptr
2008-04-07 Richard Dale <[email protected]>
* Added a QTRUBY_FUNCALL2 macro. If QtRuby is built with the
-DRUBY_EMBEDDED option, then the rb_funcall2s for invoking
virtual method callbacks and slot invocations in wrapped with
a rb_protect() call. Otherwise, rb_funcall() is called directly
and any uncaught Ruby exceptions will terminate the app.
* Borrowed a function from the kross code to put out an error message
and stacktrace on stderr for the current exception, when qtruby
has been compiled with the embedded option.
2008-04-06 Richard Dale <[email protected]>
* Change the way the 'MocArgument*' structs are created, instead
building them up in a Ruby Array, use a QList<MocArgument*>.
Move all the code to C/C++ and don't call Ruby anymore.
* Add QTRUBY_INIT_STACK and QTRUBY_RESTORE_STACK macros based on
the SWIG_INIT_STACK and SWIG_RESTORE_STACK macros. If QtRuby is
compiled with a '-DRUBY_EMBEDDED' option, then before each virtual
method callback and slot invocation call, which isn't nested
within another, call RUBY_INIT_STACK.
* This fixes a problem with Ruby Plasmoids where the Ruby runtime was
giving sys stackerror exceptions because the stack underflowed
relative to where it was when the krubypluginfactory was loaded.
* Add more checking for Qnil in the marshallers for primitive types
to make the runtime more robust.
* Added some more range=(Range) methods as synonyms for
setRange(Integer, Integer)
* Changed the examples to use range=
* Added a rbplasmaapi command line tool for introspecting the Ruby api
2008-04-05 Richard Dale <[email protected]>
* Added rb_protect() wrappers around virtual method callbacks and
slot invocations. When there is a Ruby exception, the app no
longer terminates which is useful for Plasma applets.
2008-04-04 Richard Dale <[email protected]>
* Ensure the class and module names in rbuic4 generated code
start with an upper case letter, even if they didn't in the
.ui file
2008-04-03 Richard Dale <[email protected]>
* Updated the rbuic4 to be in line with the Qt 4.4 uic code
* Added a '-k' or '-kde' option to the rbuic4 tool, used in
conjunction with '-x' to generate a KDE app korundum4 test stub
2008-04-01 Richard Dale <[email protected]>
* Qt::TimeLine.setFrameRange() can now be called like this:
time_line.frameRange = 0..90
* Qt::Timer.singleShot can now be called with a block:
timer = Qt::Timer.singleShot(5000, obj) { puts "In a block" }
* Thanks to stefo on #kde-bindings for both suggestions
* Added a few more 'range=' methods
* Fixed range setters so that both 1..10 and 1...10 work properly
2008-03-28 Richard Dale <[email protected]>
* Added a QList<QTextEdit::ExtraSelection> marshallers as requested
by volty on the #qtruby irc channel. Qt::TextEdit::ExtraSelection
is a Ruby Struct with cursor and format fields.
2008-03-24 Richard Dale <[email protected]>
* Attempt to improve the marshalling of WIds and assume they are
either signed ints (Mac OS) or signed longs.
2008-03-14 Richard Dale <[email protected]>
* Fixed a bug in constructing Qt::Variants with custom types such
as Soprano::Statement
* Added a Soprano:: namespace
2008-03-11 Richard Dale <[email protected]>
* When a method call began or ended with an underscore, and it
was missing from a qtruby instance, it caused ruby to loop,
rather than report the method as missing. Thanks to Daniel
Brumbaugh Keeney for reporting the bug.
2008-03-04 Richard Dale <[email protected]>
* Make symbolic links to rbqtapi as rbqt3api, rbqt4api, rbkdeapi
and rbkde4api
2008-03-03 Richard Dale <[email protected]>
* Added some marshallers for new Qt 4.4 QList types
2008-03-02 Richard Dale <[email protected]>
* The QModelIndex::internalPointer() method was returning nil, as
as result of the code change attempting to return nil if the C++
pointer is 0. Thanks to CyrilleB for reportin the error
2008-02-18 Richard Dale <[email protected]>
* Ignore the WebCore:: and std:: namespaces when loading classes
* Added marshallers for the WebKit QList types
2007-12-19 Richard Dale <[email protected]>
* The Qt::Polygon and Qt::PolygonF classes had no means of getting
the array of Qt::Points that they hold. Added count() and size()
methods and made the classes Enumerable, so this is now possible:
irb(main):002:0> poly = Qt::Polygon.new([Qt::Point.new(1,2),
Qt::Point.new(3,4)])
=> #<Qt::Polygon:0xb5ee3094>
irb(main):003:0> poly.each {|t| p t}
#<Qt::Point:0xb5ee0510 x=1, y=2>
#<Qt::Point:0xb5ee018c x=3, y=4>
* Thanks to Sylvain Sauvage for reporting the problem on the Korundum
help forum
2007-11-21 � Sebastian Sauer <[email protected]>
* Fixed crash on shutdown of Ruby cause of a partly destroyed
pointer_map QHash.
2007-11-19 Richard Dale <[email protected]>
* Slot arguments types of 'uint', 'long' and 'ulong' weren't working.
Thanks to maniel for the bug report.
* When calling a slot directly, it wouldn't work when then slot had
no
arguments
* Special case any classes which are sub classes of
QDBusAbstractInterface
when calling slots directly as the slots will be remote.
* When there is more than one return value in a Qt::DBusMessage the
value
method now will return a Ruby Array
2007-11-18 Richard Dale <[email protected]>
* At the suggestion of Vincent Fourmond added a Qt::DateTime.to_time
method which returns a Ruby time. Also enhanced the Qt::DateTime
constructor so that it can be passed a Ruby Time.
* Qt::Variants containing either QDBusObjectPaths or QDBusSignatures
can now be converted to Ruby Strings with a Qt::Variant.value call.
Fixes bug reported by maniel on the #qtruby IRC channel.
2007-11-12 Richard Dale <[email protected]>
* If QModelIndex.internalPointer() is zero, return Qnil
* Don't attempt to mark a zero internalPointer() for the garbage
collector. Thanks to cheiron for reporting the bug.
2007-11-11 Richard Dale <[email protected]>
* Fixed a regression introduced when slots were made directly
callable.
It broke the code to invoke remote QtDBus methods because the
remote methods become slots in the QMetaObject of the
QDBusInterface
being used as a proxy. The code was trying to invoke those slots
directly which didn't work. So special case any QMetaObjects which
have classNames of "local::Merge" as it means they are remote.
2007-10-31 Richard Dale <[email protected]>
* Don't build the qtrubyinternal library anymore as it gave trouble
on
AMD64 machines and needed an '-fPIC' option there. Instead just
include the qtruby sources in the korundum (and plasma) projects.
2007-10-30 Richard Dale <[email protected]>
* The Qt::KeyEvent#type method wasn't working. Fixes problem reported
by Magicloud Magiclouds
2007-10-19 Richard Dale <[email protected]>
* Ruby signal declared in superclasses were not being inherited by
subclasses correctly. Fixed bug reported by cheiron on the #qtruby
irc channel - thanks for the report and test program.
2007-10-14 Richard Dale <[email protected]>
* The QScintilla class names now all start with Qsci instead of Qext,
so change the QtRuby module name from Qext:: to Qsci::
* Fixes a seg fault pointed out by Adreas Pakulat
2007-10-08 Richard Dale <[email protected]>
* Added some missing modules for namespaces in the KDE4 classes
2007-09-07 Richard Dale <[email protected]>
* Added a kross2qtruby method from Cyrille Berger to convert from a
kross
instance to a qtruby instance
* Fixed bug in overloaded method resolution where a quint32 was being
given
equal priority to a qint32 type. Thanks to joseph/vista on #qtruby
for
reporting the bug
2007-07-28 Richard Dale <[email protected]>
* Up the version to 1.4.9
* Add a Plasma:: module for the plasma classes
2007-06-19 Richard Dale <[email protected]>
* Released Qt4 QtRuby 1.4.8 on Rubyforge
* Fixed an error in the QGraphicsPixmapItem class which made it
impossible
to instantiate
* Building QtRuby against Qt 4.2 failed because of a reference to
the Qt 4.3 QMdiSubWindow class not being #ifdef'd correctly. Thanks
to
mhlmi on #qtruby irc for reporting these two bugs.
2007-06-18 Richard Dale <[email protected]>
* When a Qt::Object is subclassed more than once, a Qt::MetaObject is
now correctly constructed for each subclass. Before a half-working
hack was used where a Qt::MetaObject containing all the slots and
signal of its superclass too, was constructed for the twice
sub-classed
class. Fixes problems reported by Caleb Tennis amoungst several
others.
* When a signal is defined, and Ruby method is created to call it.
Before
the signal methods were only being created when the Qt::MetaObject
for
a class was created. This caused problems if the signal was emitted
before the Qt::MetaObject was created. Fixes problem reported for
Qt3
QtRuby by Gadi Aleksandrowicz on the Korundum Rubyforge help forum.
2007-06-12 Richard Dale <[email protected]>
* Added some missing list marshallers
* Fixed a bug in the resolution of QGraphicsItem subclass names
2007-04-19 Richard Dale <[email protected]>
* Fixed a bug in resolving overloaded methods where an enum passed as
an
quint64 arg type needed to be given a lower priority that an
Integer one
* Added two models useful for Rails ActiveRecord or ActiveResource
with Qt
widgets
* Fixed a bug in the Qt::HttpRequestHeader method() method
2007-04-05 Richard Dale <[email protected]>
* Add some marshallers for the QVector types in the new Qt 4.3
QXmlStream*
classes
* Improved the cannon game t14 code
2007-03-17 Richard Dale <[email protected]>
* The code to allow the type() method to be used for Qt::GraphicsItem
classes had the wrong names for the classes
* Improved the resolution of QGraphicsItem classes in
resolve_classname()
2007-04-16 Richard Dale <[email protected]>
* Added some marshallers for Qt 4.3 classes
* Fixed bug in deleting Qt::StandardItems when they had a parent or
model
2007-03-13 Richard Dale <[email protected]>
* When a ruby string was converted to a 'char *' arg, a copy was
malloc'd
and then never freed. This behaviour was added to fix a problem
with the
small number of methods that 'took ownership' of the string and
expected
it to stay around after the method call. However, it introduces a
memory leak for the 95% of methods that don't need it, and also
means
that if the 'char *' is changed during the method call, the changes
aren't reflected in the ruby string. Thanks to Jan Wedekind for the
discussion leading up to changing the code. Any methods where this
behaviour is wrong will now need to be special cased.
2007-03-06 Richard Dale <[email protected]>
* Call rb_gc_mark() on the internalPointer VALUE within a
Qt::ModelIndex
to prevent it being GC'd too early
* Added 'double&' and 'double*' marshallers
* Fixed memory leak when creating new Qt::ModelIndexes
2007-02-27 Richard Dale <[email protected]>
* Added marshallers for QwtArray<double> and QwtArray<int>
(ie QVector<int>)
* Added a fix from Knut Franke to make the QVector<double> marshaller
work with any sort of Ruby number. Thanks Knut..
2007-02-22 Richard Dale <[email protected]>
* Made 'Qt::Variant.new(nil)' a synonym for 'Qt::Variant.new'
2007-02-19 Richard Dale <[email protected]>
* Added inspect and pp methods for Qt::MetaEnums
* Qt::Variants can be constructed from ruby Dates, Times and
DateTimes.
Qt::Dates, Qt::Times and Qt::DateTimes can also be constructed from
their ruby equivalents as a single arg. This makes it easier to
integrate Qt::AbstractItemModels with Rails ActiveRecord and
ActiveResource
2007-02-17 Richard Dale <[email protected]>
* If a new Ruby class is created for a custom C++ QObject derived
class,
then create Ruby constants in the class for any enums defined via
Q_ENUMS which are in the same scope as the new class. For instance:
class TestObject : public QObject
{
Q_OBJECT
Q_ENUMS(Priority)
public:
enum Priority { High, Low, VeryHigh, VeryLow };
...
irb(main):001:0> app = Qt::Application.new(ARGV)
=> #<Qt::Application:0xb6aaaf58 objectName="irb">
irb(main):002:0> require 'testqobject'
=> true
irb(main):003:0> test = app.findChild(Qt::Object, "QtRuby
TestObject")
=> #<TestObject:0xb6aa5184 objectName="QtRuby TestObject">
irb(main):004:0> TestObject::High
=> 0
irb(main):005:0> TestObject::Low