Notes:
Needs Qt 4.x and automake/autoconf.
Many fixes and improvements. More Qt examples converted to ruby. The smoke library and qtruby extension have been ported to Windows, and should also build on Mac OS X as well as Linux, BSD* etc.
* The smoke library can be built on windows by manually editing qtguess.pl.in and generate.pl.in (automake doesn't work with qtruby on Windows). Run 'perl qtguess.pl' to for the configure tests. Then run 'perl generate.pl' to generate the Smoke sources, and build with qmake. Use extconf.rb and qmake to build the qtruby extension and rbuic tool.
Highlights from the ChangeLog:
* Support for Qt 4.2 with over 80 new classes
* Added the rbrcc Ruby resource compiler tool
* Optional support for the QtDbus classes
* Optional support for the Qwt plotting library
* Properties can be set and got with 'myinstance.prop' or 'myinstance.prop = val', even if the class isn't in the Smoke library
* More examples added, and bugs in existing ones fixed
* Slots and signals can have return types and values
Changes:
2006-07-18 Richard Dale <rdale@foton.es>
* The code to change a Ruby 'foo?' method call to a Qt C++ 'setFoo()' was
using QStrings to change the text. However, it then converted the result
to a QByteArray via toLatin() and referenced the contents of the
QByteArray via a 'const char *' cast when the QByteArray had gone out of
scope and had been deleted. Thanks to Carlto Wang again for reporting
this bug.
* Some of the code for debug logging of garbage collection wrote spurious
newlines
2006-07-17 Richard Dale <rdale@foton.es>
* Some QtRuby QHash based caches were defined with QStrings, and when the value
was accessed the QString was converted to a QByteArray via toLatin1() and then
to a 'char *'. However, the 'char *' only lasted as long as the QByteArray,
and this caused memory corruption if the 'char *' was still in use after the
QByteArray was freed. So the QHash's are now defined like this:
QHash<QByteArray, Smoke::Index *> methcache;
QHash<QByteArray, Smoke::Index *> classcache;
QHash<int, QByteArray> classname;
This doesn't completely fix a crash in QtRuby though, although it does seem to
improve things. Thanks to Charlton Wang for tracking down where the string was
being corrupted.
2006-07-16 Richard Dale <rdale@foton.es>
* Added a QVariantList marshaller
* The correct QGraphicsScene event class instance is instantianted from
the event.type()'s
* The Qt::GraphicsItems in a Qt::GraphicsScene are marked so they won't
won't get garbage collected prematurely
* Added QT_TR_NOOP() and QT_TRANSLATE_NOOP() methods for completeness
* Added Qt::Graphics examples: graphicsview/collidingmice and dragdroprobot
2006-07-05 Richard Dale <rdale@foton.es>
* Added some marshallers for Qt 4.2, for QList<QGraphicsItem*>,
QList<QStandardItem*> and QList<QUndoStack*> types.
* The Ruby String to 'char *' and String to 'unsigned char *' were using
the pointer within the Ruby String directly which meant they were
deleted when the Ruby String was gc'd. So they are copied with
strdup () instead.
2006-06-26 Richard Dale <rdale@foton.es>
* Applied a fix from Cvetoslav Ludmiloff to make
Qt::AbstractItemModel.createIndex() work without conversion errrors
for large Ruby BigNum values.
2006-06-19 Richard Dale <rdale@foton.es>
* The 'EmitSignal' class in marshall_types.cpp was not linking against
the code calling it from Qt.cpp with some versions of the gcc
compiler/linker. So the code was moved to Qt.cpp so that it should
build on all environments.
* Added a 'designer/calculatorbuilder' example using the Qt::UiBuilder
class to load .ui files from a .qrc file compiled with the rbrcc
resource compiler
* Added some extra marshallers for QList<QWidget*> and QVector<qreal>
types.
2006-06-13 Richard Dale <rdale@foton.es>
* Slot and signals can now have return types and return values.
For example:
class Foo < Qt::PushButton
slots 'int greeting(QString)'
signals 'int doit(QString)'
def initialize
super
connect(self, SIGNAL('doit(QString)'), self, SLOT('greeting(QString)'))
end
...
* Added some missing marshaller types for QTreeWidgetItem and QListWidgetItem
lists
2006-06-07 Richard Dale <rdale@foton.es>
* qt_metacall() was returning an incorrect value when called with,
Ruby slots. This doesn't normally matter, but was causing D-BUS
slot invocations via qt-dbus to fail.
2006-06-05 Richard Dale <rdale@foton.es>
* Added support for q_classinfo() attributes, equivalent to the c++
Q_CLASSINFO() macro. If the key of the q_classinfo is 'D-Bus Interface'
the slots in the class are marked as Q_SCRIPTABLE in the QMetaObject.
For example:
class LCDRange < Qt::Widget
q_classinfo('D-Bus Interface', 'MyInterface')
signals 'valueChanged(int)'
slots 'setValue(int)'
...
* The metaObject methods for slots and signals are no longer added when
a Qt::Object is constructed, but when slots or signals are added to
a class. This means that signals as well as slots can be added to an
existing instance.
2006-06-04 Richard Dale <rdale@foton.es>
* For Qt::QObject classes which are immediate subclasses of Qt::Base,
don't add C metaObject() and qt_metacall() methods as they aren't
needed. This means that a QMetaObject is no longer constructed for
these classes, and the one that the corresponding C++ class has is
returned instead.
* Bring the itemviews/pixelator example code in line with the current
C++ version.
2006-06-01 Richard Dale <rdale@foton.es>
* Added a rbrcc resource compiler, a ruby version of rcc
* Two new module methods Qt.qRegisterResourceData() and
Qt.qRegisterResourceData() were added to Qt.cpp to support the
resource compiler.
2006-05-23 Richard Dale <rdale@foton.es>
* With code like the following, the QtRuby runtime was choosing
an operator method which took a QByteArray and a QString and
returned a QString. So the 'block' became a Ruby String, rather
than staying as a Qt::ByteArray:
block = Qt::ByteArray.new
if comment
block += "/*\n"
block += " " + header + "\n"
So the operator '+' for Qt::ByteArray is special cased to return
a Qt::ByteArray.
* The example dialogs/simplewizard now works correctly
2006-05-22 Richard Dale <rdale@foton.es>
* Fix regression for dynamic class creation via QMetaObject info causing
a crash.
* A list of properties is now returned via Qt::MetaObject.propertyNames
for a Qt::Object with properties for the inspect and pretty_print
methods.
* Fixed a pile of errors in the itemviews/chart example
* Added Qt::ItemSelection.at, [], count and length methods
2006-05-19 Richard Dale <rdale@foton.es>
* When an unknown C++ class is found, a corresponding Ruby class is now
created. For instance, if a KPresenter KPart is loaded, a
KDE::PresenterDoc class is created.
* It is now possible to set and get properties without needing to use
Qt::Object.property() and Qt::Object.setProperty(). For instance:
factory = KDE::LibLoader.self().factory("libkpresenterpart")
@kpresenter = factory.create(self)
p @kpresenter.presentationDuration
@kpresenter.presentationDuration = true
* A Qt::Variant.to_ruby method has been added which returns a Ruby value
corresponding to the current value of a Qt::Variant
* Added a Qt::MetaObject.propertyNames method to return a list of property
names
2006-05-15 Richard Dale <rdale@foton.es>
* Added an entry for a missing marshaller for QModelIndexLists.
Thanks to Daniel Morris for the bug report and fix.
2006-05-07 Richard Dale <rdale@foton.es>
* Added a Qt3:: module for the Q3* support classes
* The rbuic now correctly gives Q3* classes a Qt3::
module prefix.
2006-05-04 Richard Dale <rdale@foton.es>
* A spurious warning was be output when Qt::ContextMenuEvent.type
was called. Fixes problem reported by Alessio Caiazza
2006-04-25 Richard Dale <rdale@foton.es>
* Added a namespace of Qwt:: for use with widgets from the Qwt
3D plotting library
|