[WebKit-devel] playground/libs/webkitkde/part

Dawit Alemayehu adawit at kde.org
Fri Dec 18 02:13:16 CET 2009


SVN commit 1063389 by adawit:

- Renamed WebKitPart to KWebKitPart
- Renamed all files named webkitpart* to kwebkitpart*
- Changed the export define name from WEBKITKDE_EXPORT to KWEBKIT_EXPORT
- Removed redundant target_link_library entry from CMakeLists.txt
- Changed the install location of kwebkitpart.h to the same location as kweb{page|view}.h
- Updated all necessary files that are affected by the above changes.

CCMAIL: webkit-devel at kde.org


 M  +17 -25    CMakeLists.txt  
 M  +2 -2      includes/CMakeLists.txt  
 A             includes/KWebKitPart   includes/WebKitPart#1063126
 D             includes/WebKitPart  
 A             kwebkit_export.h   webkitkde_export.h#1063126 [License: LGPL (v2+)]
 A             kwebkitpart.cpp   webkitpart.cpp#1063126 [License: LGPL (v2+)]
 A             kwebkitpart.desktop   webkitpart.desktop#1063126
 A             kwebkitpart.h   webkitpart.h#1063126 [License: LGPL (v2+)]
 A             kwebkitpart.rc   webkitpart.rc#1063126
 A             kwebkitpart_ext.cpp   webkitpart_ext.cpp#1063126 [License: LGPL (v2+)]
 A             kwebkitpart_ext.h   webkitpart_ext.h#1063126 [License: LGPL (v2+)]
 A             kwebkitpartfactory.cpp   webkitpartfactory.cpp#1063126 [License: LGPL (v2+)]
 A             kwebkitpartfactory.h   webkitpartfactory.h#1063126 [License: LGPL (v2+)]
 D             webkitkde_export.h  
 D             webkitpart.cpp  
 D             webkitpart.desktop  
 D             webkitpart.h  
 D             webkitpart.rc  
 D             webkitpart_ext.cpp  
 D             webkitpart_ext.h  
 D             webkitpartfactory.cpp  
 D             webkitpartfactory.h  
 M  +5 -5      webpage.cpp  
 M  +2 -2      webpage.h  
 M  +3 -3      webview.cpp  
 M  +2 -2      webview.h  


--- trunk/playground/libs/webkitkde/part/CMakeLists.txt #1063388:1063389
@@ -1,4 +1,4 @@
-project(webkitpart)
+project(kwebkitpart)
 
 # search packages used by KDE
 find_package(KDE4 REQUIRED)
@@ -19,8 +19,8 @@
 add_subdirectory(includes)
 
 set(kwebkit_LIB_SRCS
-    webkitpart.cpp
-    webkitpart_ext.cpp
+    kwebkitpart.cpp
+    kwebkitpart_ext.cpp
     webview.cpp
     webpage.cpp
     websslinfo.cpp
@@ -32,42 +32,34 @@
 )
 
 kde4_add_ui_files(kwebkit_LIB_SRCS
-    ui/searchbar.ui
-    ui/passwordbar.ui
+                  ui/searchbar.ui
+                  ui/passwordbar.ui
 )
 
+# The kpart library...
 kde4_add_library(kwebkit SHARED ${kwebkit_LIB_SRCS})
-
-target_link_libraries(kwebkit ${KDE4_KPARTS_LIBS} ${QT_QTWEBKIT_LIBRARY} ${QT_QTUITOOLS_LIBRARY})
 if(${KDE_VERSION} VERSION_LESS 4.3.74)
-    target_link_libraries(kwebkit ${KDEWEBKIT_LIBRARIES})
+    target_link_libraries(kwebkit ${KDE4_KPARTS_LIBS} ${KDEWEBKIT_LIBRARIES} ${QT_QTWEBKIT_LIBRARY} ${QT_QTUITOOLS_LIBRARY})
 else(${KDE_VERSION} VERSION_LESS 4.3.74)
-    target_link_libraries(kwebkit ${KDE4_KDEWEBKIT_LIBS})
+    target_link_libraries(kwebkit ${KDE4_KPARTS_LIBS} ${KDE4_KDEWEBKIT_LIBS} ${QT_QTWEBKIT_LIBRARY} ${QT_QTUITOOLS_LIBRARY})
 endif(${KDE_VERSION} VERSION_LESS 4.3.74)
-
 set_target_properties(kwebkit PROPERTIES VERSION 1.0.0 SOVERSION 1)
 
-install(TARGETS kwebkit ${INSTALL_TARGETS_DEFAULT_ARGS})
-
-
-kde4_add_plugin(kwebkitpart webkitpartfactory.cpp)
-
+# The kpart factory library...
+kde4_add_plugin(kwebkitpart kwebkitpartfactory.cpp)
 target_link_libraries(kwebkitpart kwebkit ${KDE4_KPARTS_LIBS} ${QT_QTWEBKIT_LIBRARY})
-if(${KDE_VERSION} VERSION_LESS 4.3.74)
-    target_link_libraries(kwebkit ${KDEWEBKIT_LIBRARIES})
-else(${KDE_VERSION} VERSION_LESS 4.3.74)
-    target_link_libraries(kwebkit ${KDE4_KDEWEBKIT_LIBS})
-endif(${KDE_VERSION} VERSION_LESS 4.3.74)
 
 install(FILES
-        webkitkde_export.h
-        webkitpart.h
+        kwebkit_export.h
+        kwebkitpart.h
         DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel)
 
+install(TARGETS kwebkit ${INSTALL_TARGETS_DEFAULT_ARGS})
+
 install(TARGETS kwebkitpart DESTINATION ${PLUGIN_INSTALL_DIR})
 
-install(FILES webkitpart.desktop DESTINATION ${SERVICES_INSTALL_DIR})
+install(FILES kwebkitpart.desktop DESTINATION ${SERVICES_INSTALL_DIR})
 
-install(FILES webkitpart.rc DESTINATION  ${DATA_INSTALL_DIR}/webkitpart)
+install(FILES kwebkitpart.rc DESTINATION  ${DATA_INSTALL_DIR}/kwebkitpart)
 
-install(FILES error.html DESTINATION ${DATA_INSTALL_DIR}/webkitpart)
+install(FILES error.html DESTINATION ${DATA_INSTALL_DIR}/kwebkitpart)
--- trunk/playground/libs/webkitkde/part/includes/CMakeLists.txt #1063388:1063389
@@ -1,3 +1,3 @@
 install(FILES
-    WebKitPart
-    DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/WebKitPart COMPONENT Devel)
+        KWebKitPart
+        DESTINATION ${INCLUDE_INSTALL_DIR}/KDE COMPONENT Devel)
--- trunk/playground/libs/webkitkde/part/webpage.cpp #1063388:1063389
@@ -24,7 +24,7 @@
 
 #include "webpage.h"
 
-#include "webkitpart.h"
+#include "kwebkitpart.h"
 #include "websslinfo.h"
 #include "webview.h"
 #include "sslinfodialog_p.h"
@@ -177,10 +177,10 @@
     QHash<QString, WebFrameState> frameStateContainer;
     // Holds list of requests including those from children frames
     QMultiHash<QUrl, QWebFrame*> requestQueue;
-    QPointer<WebKitPart> part;
+    QPointer<KWebKitPart> part;
 };
 
-WebPage::WebPage(WebKitPart *part, QWidget *parent)
+WebPage::WebPage(KWebKitPart *part, QWidget *parent)
         :KWebPage(parent, (KWebPage::KPartsIntegration|KWebPage::KWalletIntegration)),
          d (new WebPagePrivate)
 {
@@ -394,11 +394,11 @@
     d->part->browserExtension()->createNewWindow(KUrl("about:blank"), args, bargs,
                                                  KParts::WindowArgs(), &part);
 
-    WebKitPart *webKitPart = qobject_cast<WebKitPart*>(part);
+    KWebKitPart *webKitPart = qobject_cast<KWebKitPart*>(part);
 
     if (!webKitPart) {
         if (part)
-            kDebug() << "Got a non WebKitPart" << part->metaObject()->className();
+            kDebug() << "Got a non KWebKitPart" << part->metaObject()->className();
         else
             kDebug() << "part is null";
 
--- trunk/playground/libs/webkitkde/part/webpage.h #1063388:1063389
@@ -32,7 +32,7 @@
 
 class KUrl;
 class WebSslInfo;
-class WebKitPart;
+class KWebKitPart;
 class QVariant;
 class QWebFrame;
 
@@ -56,7 +56,7 @@
 {
     Q_OBJECT
 public:
-    WebPage(WebKitPart *wpart, QWidget *parent);
+    WebPage(KWebKitPart *wpart, QWidget *parent);
     ~WebPage();
 
     /**
--- trunk/playground/libs/webkitkde/part/webview.cpp #1063388:1063389
@@ -25,7 +25,7 @@
 
 #include "webview.h"
 #include "webpage.h"
-#include "webkitpart.h"
+#include "kwebkitpart.h"
 
 #include <kio/global.h>
 #include <KDE/KParts/GenericFactory>
@@ -65,11 +65,11 @@
 
     KActionCollection* actionCollection;
     QWebHitTestResult result;
-    QPointer<WebKitPart> part;
+    QPointer<KWebKitPart> part;
 };
 
 
-WebView::WebView(WebKitPart *wpart, QWidget *parent)
+WebView::WebView(KWebKitPart *wpart, QWidget *parent)
         :KWebView(parent, false), d(new WebViewPrivate())
 {
     d->part = wpart;
--- trunk/playground/libs/webkitkde/part/webview.h #1063388:1063389
@@ -32,14 +32,14 @@
 #include <kdewebkit/kwebview.h>
 
 class KUrl;
-class WebKitPart;
+class KWebKitPart;
 class QWebHitTestResult;
 
 class WebView : public KWebView
 {
     Q_OBJECT
 public:
-    WebView(WebKitPart *part, QWidget *parent);
+    WebView(KWebKitPart *part, QWidget *parent);
     ~WebView();   
 
     /**


More information about the WebKit-devel mailing list