[Kde-bindings] branches/KDE/4.4/kdebindings/csharp/qtwebkit

Arno Rehn kde at arnorehn.de
Thu Jan 28 19:52:48 UTC 2010


SVN commit 1081580 by arnorehn:

Implement the IEnumerable<T> interface for QWebElementCollection.
It can now be iterated with

foreach (QWebElement element in collection) {
	/* code */
}

CCMAIL: kde-bindings at kde.org



 M  +1 -1      qtwebkit/QWebElementCollection.cs  
 A             qtwebkit/QWebElementCollectionExtras.cs  
 M  +8 -0      src/qtwebkithandlers.cpp  


--- branches/KDE/4.4/kdebindings/csharp/qtwebkit/qtwebkit/QWebElementCollection.cs #1081579:1081580
@@ -3,7 +3,7 @@
     using System;
     using System.Collections.Generic;
     [SmokeClass("QWebElementCollection")]
-    public class QWebElementCollection : Object, IDisposable {
+    public partial class QWebElementCollection : Object, IDisposable, IEnumerable<QWebElement> {
         protected SmokeInvocation interceptor = null;
         private IntPtr smokeObject;
         protected QWebElementCollection(Type dummy) {}
--- branches/KDE/4.4/kdebindings/csharp/qtwebkit/src/qtwebkithandlers.cpp #1081579:1081580
@@ -25,8 +25,16 @@
 DEF_LIST_MARSHALLER( QWebFrameList, QList<QWebFrame*>, QWebFrame )
 DEF_VALUELIST_MARSHALLER( QWebHistoryItemList, QList<QWebHistoryItem>, QWebHistoryItem )
 
+#if QT_VERSION >= 0x40600
+#include <QtWebKit/qwebelement.h>
+DEF_VALUELIST_MARSHALLER( QWebElementList, QList<QWebElement>, QWebElement )
+#endif
+
 TypeHandler QtWebKit_handlers[] = {
     { "QList<QWebFrame*>", marshall_QWebFrameList },
     { "QList<QWebHistoryItem>", marshall_QWebHistoryItemList },
+#if QT_VERSION >= 0x40600
+    { "QList<QWebElement>", marshall_QWebElementList },
+#endif
     { 0, 0 }
 };



More information about the Kde-bindings mailing list