operators & qt:variant
Sun Apr 12 22:56:16 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* operators & qt:variant
diff -rN -u old-doc/qt.docbook new-doc/qt.docbook
--- old-doc/qt.docbook 2014-10-30 06:55:32.000000000 +0100
+++ new-doc/qt.docbook 2014-10-30 06:55:32.000000000 +0100
@@ -86,6 +86,13 @@
</section>
+<section><title>Variant</title>
+<para>
+A <classname>qt:variant</classname> can be constructed with <genericfunction>qt:make-variant</genericfunction>
+or to pass a Lisp object with <methodname>qt:make-lisp-variant</methodname>.
+Its value is returned by <methodname>qt:from-variant</methodname>.
+</para>
+</section>
<section><title>i18n</title>
<para>
diff -rN -u old-doc/smoke.docbook new-doc/smoke.docbook
--- old-doc/smoke.docbook 2014-10-30 06:55:32.000000000 +0100
+++ new-doc/smoke.docbook 2014-10-30 06:55:32.000000000 +0100
@@ -54,6 +54,7 @@
<programlisting>(frob my-instance 1)</programlisting>
</informalexample>
</para>
+<section><title>defmethod</title>
<para>
You can extend the <package>:cxx</package> generic functions by
adding methods. <code>:around</code>, <code>:before</code>, <code>:after</code>
@@ -64,7 +65,7 @@
()
(:metaclass <classname>cxx:class</classname>))
-(defmethod cxx:timer-event ((object the-object-does-nothing) event)
+(defmethod <genericfunction>cxx:timer-event</genericfunction> ((object the-object-does-nothing) event)
(declare (ignore object event))
(call-next-method))
</programlisting>
@@ -78,6 +79,14 @@
not be called.
</para></note>
</section>
+<section><title>Operators</title>
+<para>
+Insted of using the various <code>cxx:operator</code> methods you can use their Lisp equivalent
+in the <package>:cxx</package> package.
+(e.g.: <methodname>cxx:aref</methodname>, <methodname>cxx:incf</methodname>)
+</para>
+</section>
+</section>
<section><title>Static Methods</title>
<para>
@@ -118,7 +127,7 @@
An instance may depend on an other one.
It is a bad idea to do something like this:
<programlisting>
-(defvar *meta* (cxx:meta-object (make-instance 'qt:object)))
+(defvar *meta* (<genericfunction>cxx:meta-object</genericfunction> (make-instance 'qt:object)))
</programlisting>
<code>*meta*</code> references a <classname>qt:meta-class</classname>
that can become invalid at any time, since the <classname>qt:object</classname> instance can