Implicit conversion constructor implementation
commit099235d132b17b2b735cfd46b196cc954f8cba51
authorMichal Kottman <michal.kottman@gmail.com>
Mon, 22 Nov 2010 00:02:59 +0000 (22 01:02 +0100)
committerMichal Kottman <michal.kottman@gmail.com>
Thu, 25 Nov 2010 22:05:01 +0000 (25 23:05 +0100)
treec399ce835f9a8b936d422ff743df1830685fbb1a
parent7293bff0c064c6845431ac08dc833141e8aef540
Implicit conversion constructor implementation

Now, Lqt does what the C++ compiler does for you - in a place where const
reference or const pointer to classes like QString or QVariant, you can
pass other value for which the class has a constructor (like Lua string for
QString or numbers for QVariant), and Lqt automatically generates a temporary
instance.

This simplifies programming, because now you can use Lua strings where
QString is expected, and also helps with QVariant, QBrush, QPen, and some
other GUI classes.

The temporaries are garbage collected by Lua.
common/lqt_common.cpp
common/lqt_common.hpp
common/lqt_qt.cpp
common/lqt_qt.hpp
generator/class_types.lua
generator/classes.lua
generator/qt_internal.lua
generator/qtypes.lua
generator/virtuals.lua