Commit c9747e37 authored by Fabian Vogt's avatar Fabian Vogt

Port scripting to Qt WebEngine

Summary:
Unfortunately it relies on Qt WebKit features quite intensely, so a few
godawful hacks were necessary to make it work. Most of those are needed
to workaround restrictions of QWebChannel as bridge to the browser page.

We gain:
+ Independence from WebKit
+ Support for newer JS and HTML features in scripts

We lose:
- Performance (especially memory use)
- Independence from WebEngine
- Sanity

Test Plan:
Tested the detailed memory info pages on a few processes, info is
correct and the page seems to work fully.

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D15209
parent a8ede95e
......@@ -26,10 +26,10 @@ include(CheckLibraryExists)
include(FeatureSummary)
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED CONFIG COMPONENTS DBus Network Widgets)
find_package(Qt5WebKitWidgets ${QT_MIN_VERSION} CONFIG)
set_package_properties(Qt5WebKitWidgets PROPERTIES
URL "git://gitorious.org/qt/qtwebkit.git"
DESCRIPTION "Qt Webkit module (web browsing engine)"
find_package(Qt5WebEngineWidgets ${QT_MIN_VERSION} CONFIG)
set_package_properties(Qt5WebEngineWidgets PROPERTIES
URL "git://code.qt.org/qt/qtwebenginewidgets.git"
DESCRIPTION "Qt WebEngine module (web browsing engine)"
TYPE OPTIONAL
PURPOSE "Used by the HTML-based GUI ksysguard library"
)
......@@ -76,7 +76,7 @@ endif()
set(HAVE_X11 ${X11_FOUND})
set(HAVE_XRES ${X11_XRes_FOUND})
set(HAVE_QTWEBKITWIDGETS ${Qt5WebKitWidgets_FOUND})
set(HAVE_QTWEBENGINEWIDGETS ${Qt5WebEngineWidgets_FOUND})
configure_file(config-ksysguard.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-ksysguard.h )
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
......
......@@ -10,8 +10,8 @@
/* Define to 1 if you have the X11 xres file */
#cmakedefine HAVE_XRES 1
/* Define if you have QtWebKitWidgets */
#cmakedefine01 HAVE_QTWEBKITWIDGETS
/* Define if you have QtWebEngineWidgets */
#cmakedefine01 HAVE_QTWEBENGINEWIDGETS
/* Define if you have X11 at all */
#cmakedefine01 HAVE_X11
......@@ -58,8 +58,8 @@ if(X11_FOUND)
target_link_libraries(processui PRIVATE Qt5::X11Extras KF5::WindowSystem)
endif()
if(Qt5WebKitWidgets_FOUND)
target_link_libraries(processui PRIVATE Qt5::WebKitWidgets)
if(Qt5WebEngineWidgets_FOUND)
target_link_libraries(processui PRIVATE Qt5::WebEngineWidgets)
endif()
if(NOT HAVE_CLOCK_GETTIME_C)
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment