From 3b7e9c03126ad3b87a3d5c61ed7f939c8b0545d3 Mon Sep 17 00:00:00 2001 From: Jose Fonseca Date: Mon, 21 Mar 2016 14:20:55 +0000 Subject: gui: Use QTextBrowser instead of QWebView. QWebView was deprecated in Qt 5.5 and removed in Qt 5.6. QTextBrowser seems sufficient for our needs and avoids the hassle of making the code compatible both with QWebView and QWebEngineView. --- gui/CMakeLists.txt | 4 ++-- gui/mainwindow.cpp | 14 +------------- gui/mainwindow.h | 1 - gui/ui/mainwindow.ui | 15 +++------------ 4 files changed, 6 insertions(+), 28 deletions(-) (limited to 'gui') diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index b74e3ece..2746711a 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -101,11 +101,11 @@ add_executable (qapitrace ${qapitrace_SRCS} ${qapitrace_UIS_H}) if (Qt5Core_VERSION_STRING VERSION_LESS 5.2.0) qt5_use_modules (qubjson Widgets) qt5_use_modules (qubjson_test Widgets) - qt5_use_modules (qapitrace Widgets WebKitWidgets) + qt5_use_modules (qapitrace Widgets Network) else () target_link_libraries (qubjson Qt5::Widgets) target_link_libraries (qubjson_test Qt5::Widgets) - target_link_libraries (qapitrace Qt5::Widgets Qt5::WebKitWidgets) + target_link_libraries (qapitrace Qt5::Widgets Qt5::Network) endif () target_link_libraries (qapitrace diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 129e634d..e1859973 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -40,8 +40,7 @@ #include #include #include -#include -#include +#include typedef QLatin1String _; @@ -886,11 +885,6 @@ void MainWindow::leakTraceFinished(){ delete t; } -void MainWindow::openHelp(const QUrl &url) -{ - QDesktopServices::openUrl(url); -} - void MainWindow::showSurfacesMenu(const QPoint &pos) { QTreeWidget *tree = m_ui.surfacesTreeWidget; @@ -1005,9 +999,6 @@ void MainWindow::initObjects() m_ui.surfacesTreeWidget->setContextMenuPolicy(Qt::CustomContextMenu); - m_ui.detailsWebView->page()->setLinkDelegationPolicy( - QWebPage::DelegateExternalLinks); - m_jumpWidget = new JumpWidget(this); m_ui.centralLayout->addWidget(m_jumpWidget); m_jumpWidget->hide(); @@ -1121,9 +1112,6 @@ void MainWindow::initConnections() SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), SLOT(showSelectedSurface())); - connect(m_ui.detailsWebView, SIGNAL(linkClicked(const QUrl&)), - this, SLOT(openHelp(const QUrl&))); - connect(m_ui.nonDefaultsCB, SIGNAL(toggled(bool)), this, SLOT(fillState(bool))); diff --git a/gui/mainwindow.h b/gui/mainwindow.h index 0378d2c0..1f1e5797 100644 --- a/gui/mainwindow.h +++ b/gui/mainwindow.h @@ -74,7 +74,6 @@ private slots: void showSettings(); void leakTrace(); void leakTraceFinished(); - void openHelp(const QUrl &url); void showSurfacesMenu(const QPoint &pos); void showSelectedSurface(); void saveSelectedSurface(); diff --git a/gui/ui/mainwindow.ui b/gui/ui/mainwindow.ui index 376f70e3..89fc378c 100644 --- a/gui/ui/mainwindow.ui +++ b/gui/ui/mainwindow.ui @@ -134,17 +134,15 @@ - + 0 0 - - - about:blank - + + true @@ -790,13 +788,6 @@ errorsDock backtraceDock - - - QWebView - QWidget -
QtWebKitWidgets/QWebView
-
-
-- cgit v1.2.3