Notes:
Notes:
Contains a prebuilt qtruby4-1.4.9-mswin32.gem to install qtruby easily. Many thanks to Jan Pilz for building the gem, he used MinGW Compiler (g++ 3.4.4).
Highlights from the ChangeLog:
* Bugs in inherited slots/signals fixed
* The Qt::Variant class is greatly improved. In particular it can be constructed from Ruby Date and Time classes which makes it easier to use ActiveRecord models with QtRuby
* Slots can be invoked directly just like ordinary methods, even when they are in an unknown class loaded at runtime, and not wrapped by the smoke library.
* Ruby constants are created for enums from the QMetaObjects of C++ classes loaded at runtime.
* New Qt 4.3 classes added such as Qt::ColumnView
* Fixed a crash in virtual method callbacks
* Made Qt::TreeWidgetItem and Qt::TreeWidget are Ruby Enumerables
Changes:
2007-06-19 Richard Dale <rdale@foton.es>
* 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 <rdale@foton.es>
* 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 <rdale@foton.es>
* Added some missing list marshallers
* Fixed a bug in the resolution of QGraphicsItem subclass names
2007-04-19 Richard Dale <rdale@foton.es>
* 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 <rdale@foton.es>
* 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 <rdale@foton.es>
* 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 <rdale@foton.es>
* 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 <rdale@foton.es>
* 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 <rdale@foton.es>
* 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 <rdale@foton.es>
* 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 <rdale@foton.es>
* Made 'Qt::Variant.new(nil)' a synonym for 'Qt::Variant.new'
2007-02-19 Richard Dale <rdale@foton.es>
* 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 <rdale@foton.es>
* 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
=> 1
irb(main):006:0> TestObject::VeryHigh
=> 2
2007-02-16 Richard Dale <rdale@foton.es>
* Thomas Moenicke fixed the qtruby cmake build so it works on
all machines by adding a KDE_EXPORT macro to Init_qtruby4()
Big thanks to Thomas and Guillaume Laurent for getting it all working.
* Added calling slots directly in custom C++ QObject classes.
If a method isn't found in the Smoke library, and the instance is
a kind of QObject with a class not in the Smoke library, then look
for a slot matching the method name and invoke it. Thanks to Eric Landuy
for the idea and discussion leading to implementing it.
* Added a check for QtDBus in the qtruby cmake file and set a define
of -DQT_QTDBUS if the library was found
* Changed the ADD_LIBRARY line in the qtruby cmake file to use MODULE
so that a bundle should be built on Mac OS X.
2007-02-08 Richard Dale <rdale@foton.es>
* Fixed bugs in the debug dump of QMetaObjects created at runtime
* When a block was used as a slot, a new entry was being added to
the QMetaObject object every time they were connected. A new
entry is now only created if a slot with the same signature didn't
already exist.
2007-02-04 Richard Dale <rdale@foton.es>
* The ListModel internal class was being wrongly named as TableModel
2007-02-01 Richard Dale <rdale@foton.es>
* Added the qdbus/complexpingpong example
* Qt::DBusVariant have to be passed Qt::Variants, and a suitable
Qt::Variant will be created
* Improved the format of debugging info for the contents of a QMetaObject
* A Qt::Variant can now be obtained when contained in a Qt::DBusVariant
2007-01-31 Richard Dale <rdale@foton.es>
* Added a Qt::DBusVariant class and a marshaller for it
2007-01-17 Richard Dale <rdale@foton.es>
* QtRuby was crashing in virtual method callbacks with a memory corruption
problem. The stack of ruby VALUES for the arguments to the callback is
now allocated via ALLOCA_N, rather than calloc which cures the crashes.
* Changed tabs to spaces in the pixelator example
2007-01-15 Richard Dale <rdale@foton.es>
* Code generated with the rbuic tool '-x' option has a require 'Qt4'
option. Fixes problem reported by Sylvain Joyeux
* Add setup_ui() and retranslate_ui() methods as aliases for the camel
case ones as suggested by Sylvain Joyeux
2006-12-16 Richard Dale <rdale@foton.es>
* Added the painting/fontsampler example
* There is no way to distinguish between the two constructors:
QTreeWidgetItem (const QTreeWidgetItem & other)
QTreeWidgetItem (QTreeWidgetItem * parent, const QStringList &
strings, int type = Type)
when the latter has a single argument. So force the second variant to
be called
* Added the desktop/screenshot example
* Added the desktop/systray example
2006-12-14 Richard Dale <rdale@foton.es>
* Added the painting/svgviewer example
* Added the painting/imagecomposition example
* Added a convenience method Qt::Image.fromImage() to assign one image
from another. This is because the C++ QImage::operator=(const QImage&)
method isn't easily called from QtRuby
* Fixed do_method_missing() so that 'operator=' methods don't get
transformed into setOperator() methods
2006-12-12 Richard Dale <rdale@foton.es>
* Removed the qtrubyinit program as it's a pita to build, and isn't very
useful
2006-12-04 Richard Dale <rdale@foton.es>
* Add a QMap<int,QVariant> marshaller
* When marhalling QMap types with QVariant values, if the Ruby value isn't
a Qt::Variant then one is created
* Qt::Variants can now be constructed with Hash's of String/Qt::Variant
pairs, and from Arrays of Qt::Variants
* Custom types know to the QMetaType system, such as some QtDBus types,
can be used to construct Qt::Variant via the QMetaType::constructor() call
* Fixed a bug in Qt::AbstractItemModel.createIndex() which meant it wouldn't
work on 64 bit machines
* When marshalling QList<QVariant> types from Ruby to C++, if any elements
aren't Ruby Qt::Variants, they are automatically converted. Hence, the
following will work:
v = Qt::Variant.new([1, 2, 3])
The Qt::Variant v will contain a list of 3 QVariants with typeName 'int'
* Add an option extra argument to Qt::Variant.fromValue() and qVariantFromValue
to specify a type string, for use with QtDBus args. For example:
v = Qt::Variant.fromValue(5, "uint")
Will force the Qt::Variant to be a specific type
* Change all instances of strcmp() to qstrcmp()
2006-11-30 Richard Dale <rdale@foton.es>
* The Qt::KeySequence constructor wasn't working when passed a
Qt::Key enum type and it needed to be cast to an Integer via
a to_i() call.
* When a Qt::DBusInterface.call() method was invoked without using
the call() method, but by calling the method directly, and the method
returned a QVariant Qt::DBusArgument value, the QVariant return
value was converted to nil.
* Fixed some errors in the mainwindows/mdi example, thanks to shirk
and |Vargas| for pointing them out.
2006-11-23 Richard Dale <rdale@foton.es>
* Made Qt::TreeWidgetItem and Qt::TreeWidget Enumerable
* Added a Qt::TreeWidgetItemIterator.current() method to get the
current value of the iterator without needing to use 'operator*'
* Added inspect() and pretty_print() methods to Qt::TreeWidgetItem,
Qt::ListWidgetItem and Qt::TableWidgetItem
* Removed instructions for creating a 'rubyw' executable in Mac OS X
as it isn't needed anymore with Qt 4.x. Thanks to Hans Fugal for
pointing that out.
2006-11-21 Richard Dale <rdale@foton.es>
* The rbuic and rbrcc tools were being built with a .app extension
on Mac OS X when using qmake. Fixed the .pro files so this doesn't
happen. Thanks to Hans Fugel for reporting the problem.
2006-11-15 Richard Dale <rdale@foton.es>
* When Qt::DBusInterface.call() was called with a single argument,
it was failing with a method_missing() error. Fixes problem
reported by Carsten Niehaus.
2006-11-07 Richard Dale <rdale@foton.es>
* Fixed a crash when a slot was inherited by a subclass, and the
subclass had no slots or signals of its own
|