diff --git a/doc/auto-doc.htm b/doc/auto-doc.htm index 49a68f2..5d811a6 100644 --- a/doc/auto-doc.htm +++ b/doc/auto-doc.htm @@ -21,7 +21,10 @@ Defines Lisp methods for all Qt methods/signals/slots of given library.
(See This macro simplifies the definition of UI variables:
-  (defvar-ui *main* *label* *line-edit*...)
+  (defvar-ui *main*
+    *label*
+    *line-edit*
+    ...)
   
   ;; the above will expand to:
   
diff --git a/examples/M-modules/webengine/minimal.lisp b/examples/M-modules/webengine/minimal.lisp
index 5cd6ef9..57468d9 100644
--- a/examples/M-modules/webengine/minimal.lisp
+++ b/examples/M-modules/webengine/minimal.lisp
@@ -7,6 +7,12 @@
 
 (defvar *view* (qnew "QWebEngineView"))
 
+(defun to-text ()
+  ;; N.B: This call is asynchronous (because WebEngine is all asynchronous).
+  ;; So, we won't have a return value, but need to pass a function.
+  ;; (See 'FunctorOrLambda' in both Qt Assistant and EQL sources.)
+  (|toPlainText| (|page| *view*) (lambda (text) (print text))))
+
 (x:do-with *view*
   (|setUrl| (qnew "QUrl(QString)" "http://planet.lisp.org/"))
   (|resize| '(800 600))
diff --git a/helper/generate.lisp b/helper/generate.lisp
index 5eff7d4..9dc6bbf 100644
--- a/helper/generate.lisp
+++ b/helper/generate.lisp
@@ -319,34 +319,36 @@
       ""))
 
 (defun add-namespace (name class)
-  (unless (empty-string name)
-    (if (and class
-             (string/= "Handle" name)
-             (not (starts-with "GL" name)))
-        (let ((1st (char name 0))
-              (templ (position #\< name)))
-          (when templ
-            (setf 1st (char name (incf templ))))
-          (if (and (not (qt-class-p (if templ
-                                        (subseq name templ (1- (length name)))
-                                        name)))
-                   (not (find #\: name))
-                   (upper-case-p 1st))
-              (if templ
-                  (format nil "~A~A::~A"
-                          (subseq name 0 templ)
-                          class
-                          (subseq name templ))
-                  (if-it (and (not (search "()" name))
-                              (position #\( name))
-                      (let* ((names (split (subseq name (1+ it) (1- (length name)))
-                                           #\|)))
-                        (join (mapcar (lambda (name) (format nil "~A::~A" class name))
-                                      names)
-                              #\|))
-                      (format nil "~A::~A" class name)))
-              name))
-        name)))
+  (if (string= "FunctorOrLambda" name)
+      "FunctorOrLambda"
+      (unless (empty-string name)
+        (if (and class
+                 (string/= "Handle" name)
+                 (not (starts-with "GL" name)))
+            (let ((1st (char name 0))
+                  (templ (position #\< name)))
+              (when templ
+                (setf 1st (char name (incf templ))))
+              (if (and (not (qt-class-p (if templ
+                                            (subseq name templ (1- (length name)))
+                                            name)))
+                       (not (find #\: name))
+                       (upper-case-p 1st))
+                  (if templ
+                      (format nil "~A~A::~A"
+                              (subseq name 0 templ)
+                              class
+                              (subseq name templ))
+                      (if-it (and (not (search "()" name))
+                                  (position #\( name))
+                          (let* ((names (split (subseq name (1+ it) (1- (length name)))
+                                               #\|)))
+                            (join (mapcar (lambda (name) (format nil "~A::~A" class name))
+                                          names)
+                                  #\|))
+                          (format nil "~A::~A" class name)))
+                  name))
+            name))))
 
 (defun constructor-p (x)
   (find :constructor x))
@@ -1161,6 +1163,7 @@
                     "QHashIntQByteArray"
                     "QLine"
                     "QLineF"
+                    "QList"
                     "QList"
                     "QList"
                     "QList"
diff --git a/helper/missing-types.txt b/helper/missing-types.txt
index db5aeab..1f6136a 100644
--- a/helper/missing-types.txt
+++ b/helper/missing-types.txt
@@ -13,7 +13,6 @@ QJsonDocument
 QJsonObject
 QJsonValue
 QLatin1String
-QList
 QList
 QList
 QList
@@ -74,6 +73,4 @@ QVariantHash
 QVector
 QVector
 QVector
-QWebChannel
-QWebEngineContextMenuData
 QWindowList
diff --git a/helper/parse.lisp b/helper/parse.lisp
index 07408ff..242b75a 100644
--- a/helper/parse.lisp
+++ b/helper/parse.lisp
@@ -54,7 +54,6 @@
         "DefaultAction"
         "EditFocus"
         "ExecutionEngine"
-        "Functor"
         "QIconEngine"
         "QPaintEngine"
         "QPrintEngine"
@@ -75,7 +74,7 @@
         "KeyValue"
         "NavigationMode"
         " Margins "
-        (format nil "Margins~Cmargins" #\Tab)
+        "Margins	margins"
         "MSG"
         "OffsetData"
         "PaperSources"
@@ -86,7 +85,7 @@
         "RSgImage"
         "SearchHit"
         "T "
-        (format nil "T~C" #\Tab)
+        "T	"
         "Q_PID"
         "Q_IPV6ADDR"        
         "QAbstractOpenGLFunctions"
@@ -127,9 +126,11 @@
         "QVector2D *"
         "QVector3D *"
         "QVector4D *"
+        "QWebChannel"
+        "QWebEngineContextMenuData"
         "QWebEngineHistory"
         "QWebHistory"
-        (format nil "QWebEngineScriptCollection &~C" #\Tab)
+        "QWebEngineScriptCollection &	"
         "QWebNetworkRequest"
         "QWSEvent"
         "QXmlStreamReader"
@@ -159,9 +160,9 @@
         "Renderer *"
         "TexturePoint2D *"
         ;; exclude what won't compile with Qt 5.5.1:
-        "QAudio::Role"                    ; 5.6
-        "textureFactoryForImage("         ; 5.6
-        (format nil "~CmoveMedia(" #\Tab) ; 5.7
+        "QAudio::Role"            ; 5.6
+        "textureFactoryForImage(" ; 5.6
+        "	moveMedia("       ; 5.7
         ))
 
 (defvar *check*         nil)
@@ -263,7 +264,9 @@
                             (when (search skip x:it)
                               (return t)))
                           (and (search "QHash<" x:it)
-                               (not (search "QHash" x:it)))) ; needed in QAbstractItemModel
+                               (not (search "QHash" x:it))) ; needed in QAbstractItemModel
+                          (and (search "Functor" x:it)
+                               (not (search "FunctorOrLambda" x:it))))       ; needed for QWebEngine
                 (when (search "QByteArray const" x:it)
                   (setf x:it (x:string-substitute "const QByteArray" "QByteArray const" x:it)))
                 (when (search "QHash" x:it)
diff --git a/helper/parsed/q-methods.lisp b/helper/parsed/q-methods.lisp
index fe76b48..257295f 100644
--- a/helper/parsed/q-methods.lisp
+++ b/helper/parsed/q-methods.lisp
@@ -5305,20 +5305,24 @@
    "QAction * action ( WebAction ) const"
    "QColor backgroundColor () const"
    "QSizeF contentsSize () const"
-   "const QWebEngineContextMenuData & contextMenuData () const"
    "QMenu * createStandardContextMenu ()"
    "void findText ( const QString & , FindFlags = FindFlags() )"
+   "void findText ( const QString & , FindFlags , FunctorOrLambda )"
    "bool hasSelection () const"
    "QIcon icon () const"
    "QUrl iconUrl () const"
    "bool isAudioMuted () const"
    "void load ( const QUrl & )"
+   "void print ( QPrinter * , FunctorOrLambda )"
    "void printToPdf ( const QString & , const QPageLayout & = QPageLayout_DEFAULT )"
+   "void printToPdf ( FunctorOrLambda , const QPageLayout & = QPageLayout_DEFAULT )"
    "QWebEngineProfile * profile () const"
    "bool recentlyAudible () const"
    "void replaceMisspelledWord ( const QString & )"
    "QUrl requestedUrl () const"
+   "void runJavaScript ( const QString & , quint32 , FunctorOrLambda )"
    "void runJavaScript ( const QString & , quint32 )"
+   "void runJavaScript ( const QString & , FunctorOrLambda )"
    "void runJavaScript ( const QString & )"
    "void save ( const QString & , QWebEngineDownloadItem::SavePageFormat = QWebEngineDownloadItem::MimeHtmlSaveFormat ) const"
    "QPointF scrollPosition () const"
@@ -5330,15 +5334,14 @@
    "void setHtml ( const QString & , const QUrl & = QUrl() )"
    "void setUrl ( const QUrl & )"
    "void setView ( QWidget * )"
-   "void setWebChannel ( QWebChannel * , uint )"
-   "void setWebChannel ( QWebChannel * )"
    "void setZoomFactor ( qreal )"
    "QWebEngineSettings * settings () const"
    "QString title () const"
+   "void toHtml ( FunctorOrLambda ) const"
+   "void toPlainText ( FunctorOrLambda ) const"
    "virtual void triggerAction ( WebAction , bool = false )"
    "QUrl url () const"
    "QWidget * view () const"
-   "QWebChannel * webChannel () const"
    "qreal zoomFactor () const"
    "virtual bool event ( QEvent * )")
   (("QWebEngineProfile" . "QObject")
@@ -5387,6 +5390,7 @@
   (("QWebEngineView" . "QWidget")
    "new QWebEngineView ( QWidget * = Q_NULLPTR )"
    "void findText ( const QString & , QWebEnginePage::FindFlags = QWebEnginePage::FindFlags() )"
+   "void findText ( const QString & , QWebEnginePage::FindFlags , FunctorOrLambda )"
    "bool hasSelection () const"
    "QIcon icon () const"
    "QUrl iconUrl () const"
diff --git a/src/ecl_fun.cpp b/src/ecl_fun.cpp
index 53c324b..8706319 100644
--- a/src/ecl_fun.cpp
+++ b/src/ecl_fun.cpp
@@ -33,6 +33,7 @@ META_TYPE (T_quint8,                           quint8)
 META_TYPE (T_quint16,                          quint16)
 META_TYPE (T_quint32,                          quint32)
 META_TYPE (T_quint64,                          quint64)
+META_TYPE (T_FunctorOrLambda,                  FunctorOrLambda)
 META_TYPE (T_QFileInfo,                        QFileInfo)
 META_TYPE (T_QFileInfoList,                    QFileInfoList)
 META_TYPE (T_QGradient,                        QGradient)
@@ -1162,6 +1163,14 @@ static cl_object from_qvariantlist(const QVariantList& l) {
     l_list = cl_nreverse(l_list);
     return l_list; }
 
+static void* ensurePersistentFunction(cl_object l_fun) {
+    STATIC_SYMBOL_PKG (s_ensure_persistent_function, "%ENSURE-PERSISTENT-FUNCTION", "EQL") // see "lisp/ini.lisp"
+    cl_object l_ret = cl_funcall(2, s_ensure_persistent_function, l_fun);
+    return (Cnil == l_ret) ? 0 : (void*)l_ret; }
+
+void FunctorOrLambda::operator()(const QVariant& var) {
+    cl_funcall(2, (cl_object)function, from_qvariant_value(var)); }
+
 static MetaArg toMetaArg(const QByteArray& sType, cl_object l_arg) {
     void* p = 0;
     const int n = QMetaType::type(sType);
@@ -1318,6 +1327,7 @@ static MetaArg toMetaArg(const QByteArray& sType, cl_object l_arg) {
         else if(T_quint16 == n)                          p = new quint16(toUInt(l_arg));
         else if(T_quint32 == n)                          p = new quint32(toUInt(l_arg));
         else if(T_quint64 == n)                          p = new quint64(toUInt(l_arg));
+        else if(T_FunctorOrLambda == n)                  p = new FunctorOrLambda(ensurePersistentFunction(l_arg));
         // module types
         else {
             bool found = false;
@@ -1534,7 +1544,6 @@ static void clearMetaArg(const MetaArg& arg, bool is_ret = false) {
     // enums
     else if(!sType.endsWith('>') && sType.contains(':')) {
         delete (int*)p; }
-    // default
     else {
         QMetaType::destroy(n, p); }}
 
@@ -2203,11 +2212,6 @@ ok3:
     error_msg("QINVOKE-METHOD", LIST4(l_obj, l_cast, l_name, l_args));
     return Cnil; }
 
-static void* ensurePersistentFunction(cl_object l_fun) {
-    STATIC_SYMBOL_PKG (s_ensure_persistent_function, "%ENSURE-PERSISTENT-FUNCTION", "EQL") // see "lisp/ini.lisp"
-    cl_object l_ret = cl_funcall(2, s_ensure_persistent_function, l_fun);
-    return (Cnil == l_ret) ? 0 : (void*)l_ret; }
-
 cl_object qconnect2(cl_object l_caller, cl_object l_signal, cl_object l_receiver, cl_object l_slot) {
     /// args: (caller signal receiver/function &optional slot)
     /// Connects either a Qt signal to a Qt slot, or a Qt signal to a Lisp function.
diff --git a/src/ecl_fun.h b/src/ecl_fun.h
index 825f3dc..1e8fb5f 100644
--- a/src/ecl_fun.h
+++ b/src/ecl_fun.h
@@ -312,6 +312,16 @@ struct eql_pointer {
     eql_pointer(void* v, int i) : pointer(v), id(i) {}
 };
 
+// for WebEngine
+struct FunctorOrLambda {
+    void* function;
+
+    FunctorOrLambda()          : function(0)   {}
+    FunctorOrLambda(void* fun) : function(fun) {}
+
+    void operator()(const QVariant&);
+};
+
 struct QtMetaObject : private QObject {
     // commonly used trick to access staticQtMetaObject
     static const QMetaObject* get() { return &static_cast(0)->staticQtMetaObject; }
diff --git a/src/eql.cpp b/src/eql.cpp
index 023ead5..450f8a2 100644
--- a/src/eql.cpp
+++ b/src/eql.cpp
@@ -7,7 +7,7 @@
 #include 
 #include 
 
-const char EQL::version[] = "17.3.3"; // Mar 2017
+const char EQL::version[] = "17.3.4"; // Mar 2017
 
 extern "C" void ini_EQL(cl_object);
 
diff --git a/src/gen/webengine/_q_methods.h b/src/gen/webengine/_q_methods.h
index 1212717..d64b129 100644
--- a/src/gen/webengine/_q_methods.h
+++ b/src/gen/webengine/_q_methods.h
@@ -46,20 +46,24 @@ public:
     Q_INVOKABLE QAction* Maction(QWebEnginePage* o, QWebEnginePage::WebAction x1) const { return o->action(x1); }
     Q_INVOKABLE QColor MbackgroundColor(QWebEnginePage* o) const { return o->backgroundColor(); }
     Q_INVOKABLE QSizeF McontentsSize(QWebEnginePage* o) const { return o->contentsSize(); }
-    Q_INVOKABLE QWebEngineContextMenuData McontextMenuData(QWebEnginePage* o) const { return o->contextMenuData(); }
     Q_INVOKABLE QMenu* McreateStandardContextMenu(QWebEnginePage* o) { return o->createStandardContextMenu(); }
     Q_INVOKABLE void MfindText(QWebEnginePage* o, const QString& x1, QWebEnginePage::FindFlags x2 = QWebEnginePage::FindFlags()) { o->findText(x1, x2); }
+    Q_INVOKABLE void MfindText(QWebEnginePage* o, const QString& x1, QWebEnginePage::FindFlags x2, FunctorOrLambda x3) { o->findText(x1, x2, x3); }
     Q_INVOKABLE bool MhasSelection(QWebEnginePage* o) const { return o->hasSelection(); }
     Q_INVOKABLE QIcon Micon(QWebEnginePage* o) const { return o->icon(); }
     Q_INVOKABLE QUrl MiconUrl(QWebEnginePage* o) const { return o->iconUrl(); }
     Q_INVOKABLE bool MisAudioMuted(QWebEnginePage* o) const { return o->isAudioMuted(); }
     Q_INVOKABLE void Mload(QWebEnginePage* o, const QUrl& x1) { o->load(x1); }
+    Q_INVOKABLE void Mprint(QWebEnginePage* o, QPrinter* x1, FunctorOrLambda x2) { o->print(x1, x2); }
     Q_INVOKABLE void MprintToPdf(QWebEnginePage* o, const QString& x1, const QPageLayout& x2 = QPageLayout_DEFAULT) { o->printToPdf(x1, x2); }
+    Q_INVOKABLE void MprintToPdf(QWebEnginePage* o, FunctorOrLambda x1, const QPageLayout& x2 = QPageLayout_DEFAULT) { o->printToPdf(x1, x2); }
     Q_INVOKABLE QWebEngineProfile* Mprofile(QWebEnginePage* o) const { return o->profile(); }
     Q_INVOKABLE bool MrecentlyAudible(QWebEnginePage* o) const { return o->recentlyAudible(); }
     Q_INVOKABLE void MreplaceMisspelledWord(QWebEnginePage* o, const QString& x1) { o->replaceMisspelledWord(x1); }
     Q_INVOKABLE QUrl MrequestedUrl(QWebEnginePage* o) const { return o->requestedUrl(); }
+    Q_INVOKABLE void MrunJavaScript(QWebEnginePage* o, const QString& x1, quint32 x2, FunctorOrLambda x3) { o->runJavaScript(x1, x2, x3); }
     Q_INVOKABLE void MrunJavaScript(QWebEnginePage* o, const QString& x1, quint32 x2) { o->runJavaScript(x1, x2); }
+    Q_INVOKABLE void MrunJavaScript(QWebEnginePage* o, const QString& x1, FunctorOrLambda x2) { o->runJavaScript(x1, x2); }
     Q_INVOKABLE void MrunJavaScript(QWebEnginePage* o, const QString& x1) { o->runJavaScript(x1); }
     Q_INVOKABLE void Msave(QWebEnginePage* o, const QString& x1, QWebEngineDownloadItem::SavePageFormat x2 = QWebEngineDownloadItem::MimeHtmlSaveFormat) const { o->save(x1, x2); }
     Q_INVOKABLE QPointF MscrollPosition(QWebEnginePage* o) const { return o->scrollPosition(); }
@@ -71,15 +75,14 @@ public:
     Q_INVOKABLE void MsetHtml(QWebEnginePage* o, const QString& x1, const QUrl& x2 = QUrl()) { o->setHtml(x1, x2); }
     Q_INVOKABLE void MsetUrl(QWebEnginePage* o, const QUrl& x1) { o->setUrl(x1); }
     Q_INVOKABLE void MsetView(QWebEnginePage* o, QWidget* x1) { o->setView(x1); }
-    Q_INVOKABLE void MsetWebChannel(QWebEnginePage* o, QWebChannel* x1, uint x2) { o->setWebChannel(x1, x2); }
-    Q_INVOKABLE void MsetWebChannel(QWebEnginePage* o, QWebChannel* x1) { o->setWebChannel(x1); }
     Q_INVOKABLE void MsetZoomFactor(QWebEnginePage* o, qreal x1) { o->setZoomFactor(x1); }
     Q_INVOKABLE QWebEngineSettings* Msettings(QWebEnginePage* o) const { return o->settings(); }
     Q_INVOKABLE QString Mtitle(QWebEnginePage* o) const { return o->title(); }
+    Q_INVOKABLE void MtoHtml(QWebEnginePage* o, FunctorOrLambda x1) const { o->toHtml(x1); }
+    Q_INVOKABLE void MtoPlainText(QWebEnginePage* o, FunctorOrLambda x1) const { o->toPlainText(x1); }
     Q_INVOKABLE void MtriggerAction(QWebEnginePage* o, QWebEnginePage::WebAction x1, bool x2 = false) { o->triggerAction(x1, x2); }
     Q_INVOKABLE QUrl Murl(QWebEnginePage* o) const { return o->url(); }
     Q_INVOKABLE QWidget* Mview(QWebEnginePage* o) const { return o->view(); }
-    Q_INVOKABLE QWebChannel* MwebChannel(QWebEnginePage* o) const { return o->webChannel(); }
     Q_INVOKABLE qreal MzoomFactor(QWebEnginePage* o) const { return o->zoomFactor(); }
     Q_INVOKABLE bool Mevent(QWebEnginePage* o, QEvent* x1) { return o->event(x1); }
 };
@@ -148,6 +151,7 @@ class Q272 : public Q279 { // QWebEngineView
 public:
     Q_INVOKABLE void* C(uint u, QWidget* x1 = 0) { return new LWebEngineView(u, x1); }
     Q_INVOKABLE void MfindText(QWebEngineView* o, const QString& x1, QWebEnginePage::FindFlags x2 = QWebEnginePage::FindFlags()) { o->findText(x1, x2); }
+    Q_INVOKABLE void MfindText(QWebEngineView* o, const QString& x1, QWebEnginePage::FindFlags x2, FunctorOrLambda x3) { o->findText(x1, x2, x3); }
     Q_INVOKABLE bool MhasSelection(QWebEngineView* o) const { return o->hasSelection(); }
     Q_INVOKABLE QIcon Micon(QWebEngineView* o) const { return o->icon(); }
     Q_INVOKABLE QUrl MiconUrl(QWebEngineView* o) const { return o->iconUrl(); }
diff --git a/src/lisp/all-wrappers-webengine-1.lisp b/src/lisp/all-wrappers-webengine-1.lisp
index 4588ad1..c804e90 100644
--- a/src/lisp/all-wrappers-webengine-1.lisp
+++ b/src/lisp/all-wrappers-webengine-1.lisp
@@ -5,7 +5,6 @@
    #:|clearAllVisitedLinks|
    #:|clearHttpCache|
    #:|clearVisitedLinks|
-   #:|contextMenuData|
    #:|cookieAdded|
    #:|cookieRemoved|
    #:|cookieStore|
@@ -31,6 +30,10 @@
    #:|loadAllCookies|
    #:|persistentCookiesPolicy|
    #:|persistentStoragePath|
+   #:|printToPdf(FunctorOrLambda)|
+   #:|printToPdf(FunctorOrLambda...)|
+   #:|printToPdf(QString)|
+   #:|printToPdf(QString...)|
    #:|printToPdf|
    #:|receivedBytes|
    #:|recentlyAudibleChanged|
@@ -42,6 +45,8 @@
    #:|requestMethod|
    #:|requestStarted|
    #:|requestUrl|
+   #:|runJavaScript(QString,FunctorOrLambda)|
+   #:|runJavaScript(QString,uint)|
    #:|runJavaScript|
    #:|runsOnSubFrames|
    #:|savePageFormat|
@@ -63,11 +68,9 @@
    #:|setSourceCode|
    #:|setSpellCheckEnabled|
    #:|setSpellCheckLanguages|
-   #:|setWebChannel|
    #:|setWorldId|
    #:|spellCheckLanguages|
    #:|storageName|
    #:|toggleOn|
    #:|visitedLinksContainsUrl|
-   #:|webChannel|
    #:|worldId|))
diff --git a/src/lisp/all-wrappers-webengine-2.lisp b/src/lisp/all-wrappers-webengine-2.lisp
index e1c062e..8648668 100644
--- a/src/lisp/all-wrappers-webengine-2.lisp
+++ b/src/lisp/all-wrappers-webengine-2.lisp
@@ -15,9 +15,6 @@
 (defun |clearVisitedLinks| (object &rest arguments)
   (%qinvoke-method object nil "clearVisitedLinks" arguments))
 
-(defun |contextMenuData| (object &rest arguments)
-  (%qinvoke-method object nil "contextMenuData" arguments))
-
 (defun |cookieAdded| (object &rest arguments)
   (%qinvoke-method object nil "cookieAdded" arguments))
 
@@ -93,6 +90,18 @@
 (defun |persistentStoragePath| (object &rest arguments)
   (%qinvoke-method object nil "persistentStoragePath" arguments))
 
+(defun |printToPdf(FunctorOrLambda)| (object &rest arguments)
+  (%qinvoke-method object nil "printToPdf(FunctorOrLambda)" arguments))
+
+(defun |printToPdf(FunctorOrLambda...)| (object &rest arguments)
+  (%qinvoke-method object nil "printToPdf(FunctorOrLambda...)" arguments))
+
+(defun |printToPdf(QString)| (object &rest arguments)
+  (%qinvoke-method object nil "printToPdf(QString)" arguments))
+
+(defun |printToPdf(QString...)| (object &rest arguments)
+  (%qinvoke-method object nil "printToPdf(QString...)" arguments))
+
 (defun |printToPdf| (object &rest arguments)
   (%qinvoke-method object nil "printToPdf" arguments))
 
@@ -126,6 +135,12 @@
 (defun |requestUrl| (object &rest arguments)
   (%qinvoke-method object nil "requestUrl" arguments))
 
+(defun |runJavaScript(QString,FunctorOrLambda)| (object &rest arguments)
+  (%qinvoke-method object nil "runJavaScript(QString,FunctorOrLambda)" arguments))
+
+(defun |runJavaScript(QString,uint)| (object &rest arguments)
+  (%qinvoke-method object nil "runJavaScript(QString,uint)" arguments))
+
 (defun |runJavaScript| (object &rest arguments)
   (%qinvoke-method object nil "runJavaScript" arguments))
 
@@ -189,9 +204,6 @@
 (defun |setSpellCheckLanguages| (object &rest arguments)
   (%qinvoke-method object nil "setSpellCheckLanguages" arguments))
 
-(defun |setWebChannel| (object &rest arguments)
-  (%qinvoke-method object nil "setWebChannel" arguments))
-
 (defun |setWorldId| (object &rest arguments)
   (%qinvoke-method object nil "setWorldId" arguments))
 
@@ -207,8 +219,5 @@
 (defun |visitedLinksContainsUrl| (object &rest arguments)
   (%qinvoke-method object nil "visitedLinksContainsUrl" arguments))
 
-(defun |webChannel| (object &rest arguments)
-  (%qinvoke-method object nil "webChannel" arguments))
-
 (defun |worldId| (object &rest arguments)
   (%qinvoke-method object nil "worldId" arguments))
diff --git a/src/lisp/ini.lisp b/src/lisp/ini.lisp
index dc3cd04..6f4cc55 100644
--- a/src/lisp/ini.lisp
+++ b/src/lisp/ini.lisp
@@ -107,7 +107,10 @@
 (defmacro defvar-ui (main &rest names)
   "args: (main-widget &rest variables)
    This macro simplifies the definition of UI variables:
-       (defvar-ui *main* *label* *line-edit*...)
+       (defvar-ui *main*
+         *label*
+         *line-edit*
+         ...)
        
        ;; the above will expand to: