View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0013194 | Scribus | User Interface | public | 2015-07-01 11:37 | 2015-07-28 12:59 |
Reporter | simonaw | Assigned To | cbradney | ||
Priority | normal | Severity | tweak | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Fixed in Version | 1.5.1svn | ||||
Summary | 0013194: Replace Qt5Webkit with Qt5WebEngineWidgets | ||||
Description | With the advent of Qt 5.5 QtWebkit gets replaced by QWebEngine (see https://wiki.qt.io/QtWebEngine and https://wiki.qt.io/QtWebEnginePortingFromQtWebKit). This patch tries to be a start for this conversion. Altough it is not perfect I got scribus successfully built on Qt 5.5. | ||||
Tags | No tags attached. | ||||
Patch | Yes | ||||
|
scribus-webengine.patch (7,360 bytes)
diff --git a/CMakeLists.txt b/CMakeLists.txt index f1ef87f..e3a8975 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -347,10 +347,8 @@ ENDIF (APPLEBUNDLE) ADD_DEFINITIONS("-DLIBDIR=\\\"${CMAKE_INSTALL_PREFIX}/${LIBDIR}\\\"") #C++11 Support -IF(WANT_CPP11) - MESSAGE(STATUS "Enabling C++11 compiler features") - ADD_DEFINITIONS("-std=c++11") -ENDIF(WANT_CPP11) +MESSAGE(STATUS "Enabling C++11 compiler features") +ADD_DEFINITIONS("-std=c++11") #PLUGINS IF(WIN32) @@ -554,18 +552,12 @@ IF(Qt5Xml_FOUND) ELSE(Qt5Xml_FOUND) MESSAGE(FATAL_ERROR "ERROR: No QT 5 XML found") ENDIF(Qt5Xml_FOUND) -FIND_PACKAGE(Qt5WebKit REQUIRED) -IF(Qt5WebKit_FOUND) - MESSAGE(STATUS "----- USE Qt5WebKit -----") -ELSE(Qt5WebKit_FOUND) - MESSAGE(FATAL_ERROR "ERROR: No Qt5WebKit found") -ENDIF(Qt5WebKit_FOUND) -FIND_PACKAGE(Qt5WebKitWidgets REQUIRED) -IF(Qt5WebKitWidgets_FOUND) - MESSAGE(STATUS "----- USE Qt5WebKitWidgets -----") -ELSE(Qt5WebKitWidgets_FOUND) - MESSAGE(FATAL_ERROR "ERROR: No Qt5WebKitWidgets found") -ENDIF(Qt5WebKitWidgets_FOUND) +FIND_PACKAGE(Qt5WebEngineWidgets REQUIRED) +IF(Qt5WebEngineWidgets_FOUND) + MESSAGE(STATUS "----- USE Qt5WebEngineWidgets -----") +ELSE(Qt5WebEngineWidgets_FOUND) + MESSAGE(FATAL_ERROR "ERROR: No Qt5WebEngineWidgets found") +ENDIF(Qt5WebEngineWidgets_FOUND) FIND_PACKAGE(Qt5Network REQUIRED) IF(Qt5Network_FOUND) MESSAGE(STATUS "----- USE Qt5Network -----") @@ -604,10 +596,8 @@ INCLUDE_DIRECTORIES(${Qt5Gui_INCLUDE_DIRS}) ADD_DEFINITIONS(${Qt5Gui_DEFINITIONS}) INCLUDE_DIRECTORIES(${Qt5Xml_INCLUDE_DIRS}) ADD_DEFINITIONS(${Qt5Xml_DEFINITIONS}) -INCLUDE_DIRECTORIES(${Qt5WebKit_INCLUDE_DIRS}) -ADD_DEFINITIONS(${Qt5WebKit_DEFINITIONS}) -INCLUDE_DIRECTORIES(${Qt5WebKitWidgets_INCLUDE_DIRS}) -ADD_DEFINITIONS(${Qt5WebKitWidgets_DEFINITIONS}) +INCLUDE_DIRECTORIES(${Qt5WebEngineWidgets_INCLUDE_DIRS}) +ADD_DEFINITIONS(${Qt5WebEngineWidgets_DEFINITIONS}) INCLUDE_DIRECTORIES(${Qt5Network_INCLUDE_DIRS}) ADD_DEFINITIONS(${Qt5Network_DEFINITIONS}) INCLUDE_DIRECTORIES(${Qt5OpenGL_INCLUDE_DIRS}) diff --git a/scribus/CMakeLists.txt b/scribus/CMakeLists.txt index 6425e22..a4b6281 100644 --- a/scribus/CMakeLists.txt +++ b/scribus/CMakeLists.txt @@ -1193,8 +1193,7 @@ TARGET_LINK_LIBRARIES(${EXE_NAME} ${Qt5Widgets_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Xml_LIBRARIES} - ${Qt5WebKit_LIBRARIES} - ${Qt5WebKitWidgets_LIBRARIES} + ${Qt5WebEngineWidgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5OpenGL_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} @@ -1293,8 +1292,7 @@ SET(PLUGIN_LIBRARIES ${Qt5Widgets_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Xml_LIBRARIES} - ${Qt5WebKit_LIBRARIES} - ${Qt5WebKitWidgets_LIBRARIES} + ${Qt5WebEngineWidgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5OpenGL_LIBRARIES} ${LIBXML2_LIBRARIES} diff --git a/scribus/ui/helpbrowser.cpp b/scribus/ui/helpbrowser.cpp index ef7eceb..37b32c7 100644 --- a/scribus/ui/helpbrowser.cpp +++ b/scribus/ui/helpbrowser.cpp @@ -359,11 +359,14 @@ void HelpBrowser::languageChange() void HelpBrowser::print() { - QPrinter printer; - printer.setFullPage(true); - QPrintDialog dialog(&printer, this); - if (dialog.exec()) - textBrowser->print(&printer); + QPrintDialog dialog(&printer, this); + if (dialog.exec()) { + textBrowser->page()->toHtml([this](const QString& str) { + QTextDocument doc(this); + doc.setHtml(str); + doc.print(&printer); + }); + } } void HelpBrowser::searchingButton_clicked() diff --git a/scribus/ui/helpbrowser.h b/scribus/ui/helpbrowser.h index 921023a..aa92097 100644 --- a/scribus/ui/helpbrowser.h +++ b/scribus/ui/helpbrowser.h @@ -43,6 +43,7 @@ for which a new license (GPL+exception) is in place. #include <QUrl> #include <QVariant> #include <QWidget> +#include <QPrinter> class QEvent; @@ -135,6 +136,8 @@ protected: ScHelpTreeModel* menuModel; QMap<QString, QString> quickHelpIndex; QMap<QString, QPair<QString, QString> > bookmarkIndex; + + QPrinter printer; protected slots: virtual void languageChange(); diff --git a/scribus/ui/sctextbrowser.cpp b/scribus/ui/sctextbrowser.cpp index 21df643..02151fc 100644 --- a/scribus/ui/sctextbrowser.cpp +++ b/scribus/ui/sctextbrowser.cpp @@ -7,7 +7,6 @@ for which a new license (GPL+exception) is in place. #include "sctextbrowser.h" -#include <QWebFrame> #include <QEvent> #include <QDebug> @@ -19,13 +18,13 @@ for which a new license (GPL+exception) is in place. #include "urllauncher.h" ScTextBrowser::ScTextBrowser( QWidget * parent ) - : QWebView(parent) + : QWebEngineView(parent) { hideContextMenus=false; // Questionable - e.g. I would like to browse only through help browser (a pref?) - page()->setLinkDelegationPolicy(QWebPage::DelegateExternalLinks); + //page()->setLinkDelegationPolicy(QWebEnginePage::DelegateExternalLinks); connect(this, SIGNAL(urlChanged(QUrl)), this, SLOT(catchHome(QUrl))); - connect(this, SIGNAL(linkClicked(QUrl)), this, SLOT(externalLinkClick(QUrl))); + //connect(this, SIGNAL(linkClicked(QUrl)), this, SLOT(externalLinkClick(QUrl))); } void ScTextBrowser::clear() @@ -43,7 +42,7 @@ void ScTextBrowser::setSimpleText(const QString& str) void ScTextBrowser::find(const QString& txt, const int& options) { - findText(txt, QWebPage::FindFlag(options)); + findText(txt, QWebEnginePage::FindFlag(options)); } void ScTextBrowser::swallowContextMenus(bool b) @@ -51,19 +50,6 @@ void ScTextBrowser::swallowContextMenus(bool b) hideContextMenus=b; } - -QString ScTextBrowser::toPlainText() -{ - if(page()) - { - if(page()->mainFrame()) - { - return page()->mainFrame()->toPlainText(); - } - } - return QString(); -} - void ScTextBrowser::home() { setUrl(homeUrl); @@ -78,23 +64,25 @@ void ScTextBrowser::catchHome(QUrl url) } } +/* void ScTextBrowser::externalLinkClick(QUrl url) { UrlLauncher::instance()->launchUrlExt(url, parentWidget()); } +*/ bool ScTextBrowser::event(QEvent * e) { -// bool ret(QWebView::event(e)); +// bool ret(QWebEngineView::event(e)); // qDebug()<<"ScTextBrowser::event"<<e->type()<<ret; // return ret; - return QWebView::event(e); + return QWebEngineView::event(e); } void ScTextBrowser::contextMenuEvent(QContextMenuEvent* e) { - if (hideContextMenus) - page()->swallowContextMenuEvent(e); - else - QWebView::contextMenuEvent(e); + //if (hideContextMenus) + // page()->swallowContextMenuEvent(e); + //else + QWebEngineView::contextMenuEvent(e); } diff --git a/scribus/ui/sctextbrowser.h b/scribus/ui/sctextbrowser.h index 9e49a17..38e7442 100644 --- a/scribus/ui/sctextbrowser.h +++ b/scribus/ui/sctextbrowser.h @@ -9,9 +9,9 @@ for which a new license (GPL+exception) is in place. #include "scribusapi.h" #include <QUrl> -#include <QWebView> +#include <QWebEngineView> -class SCRIBUS_API ScTextBrowser : public QWebView +class SCRIBUS_API ScTextBrowser : public QWebEngineView { Q_OBJECT @@ -24,7 +24,6 @@ class SCRIBUS_API ScTextBrowser : public QWebView void setSimpleText(const QString& str); void find(const QString& txt, const int& options = 0); void swallowContextMenus(bool b); - QString toPlainText(); protected: bool event(QEvent *e); @@ -36,7 +35,7 @@ class SCRIBUS_API ScTextBrowser : public QWebView private slots: void catchHome(QUrl url); - void externalLinkClick(QUrl url); + //void externalLinkClick(QUrl url); }; |
|
At this point the problem is that at least Fedora and Debian do not plan to provide packages for QtWebEngine due to dependencies handling problem: https://www.phoronix.com/scan.php?page=news_item&px=QtWebEngine-Mess-Debian So currently we are not even sure that we'll use QtWebEngine. We may choose to use QtHelp. Depending on further development, it might also be possible to use the qtwebview module which aims to bring a lighter web engine based on native engines available on each platforms. |
|
Thanks for the quick reply! According to http://doc.qt.io/qt-4.8/qthelp-framework.html#using-qhelpengine-api the QtHelp system relies on QTextBrowser (if QtWebKit is not built). Maybe using QTextBrowser instead of QtWebKit is a viable solution for Scribus as well? |
|
QTextBrowser says what it is.. a text browser, therefore does not support images which we need for documentation. |
|
Yes, I know. But why is there http://doc.qt.io/qt-5/qtextbrowser.html#loadResource ? Unfortunately I couldn't get it to work until now... |
|
scribus-help-qtextbrowser.patch (10,538 bytes)
diff --git a/CMakeLists.txt b/CMakeLists.txt index f1ef87f..8d8f723 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -347,10 +347,8 @@ ENDIF (APPLEBUNDLE) ADD_DEFINITIONS("-DLIBDIR=\\\"${CMAKE_INSTALL_PREFIX}/${LIBDIR}\\\"") #C++11 Support -IF(WANT_CPP11) - MESSAGE(STATUS "Enabling C++11 compiler features") - ADD_DEFINITIONS("-std=c++11") -ENDIF(WANT_CPP11) +MESSAGE(STATUS "Enabling C++11 compiler features") +ADD_DEFINITIONS("-std=c++11") #PLUGINS IF(WIN32) @@ -554,18 +552,6 @@ IF(Qt5Xml_FOUND) ELSE(Qt5Xml_FOUND) MESSAGE(FATAL_ERROR "ERROR: No QT 5 XML found") ENDIF(Qt5Xml_FOUND) -FIND_PACKAGE(Qt5WebKit REQUIRED) -IF(Qt5WebKit_FOUND) - MESSAGE(STATUS "----- USE Qt5WebKit -----") -ELSE(Qt5WebKit_FOUND) - MESSAGE(FATAL_ERROR "ERROR: No Qt5WebKit found") -ENDIF(Qt5WebKit_FOUND) -FIND_PACKAGE(Qt5WebKitWidgets REQUIRED) -IF(Qt5WebKitWidgets_FOUND) - MESSAGE(STATUS "----- USE Qt5WebKitWidgets -----") -ELSE(Qt5WebKitWidgets_FOUND) - MESSAGE(FATAL_ERROR "ERROR: No Qt5WebKitWidgets found") -ENDIF(Qt5WebKitWidgets_FOUND) FIND_PACKAGE(Qt5Network REQUIRED) IF(Qt5Network_FOUND) MESSAGE(STATUS "----- USE Qt5Network -----") @@ -604,10 +590,6 @@ INCLUDE_DIRECTORIES(${Qt5Gui_INCLUDE_DIRS}) ADD_DEFINITIONS(${Qt5Gui_DEFINITIONS}) INCLUDE_DIRECTORIES(${Qt5Xml_INCLUDE_DIRS}) ADD_DEFINITIONS(${Qt5Xml_DEFINITIONS}) -INCLUDE_DIRECTORIES(${Qt5WebKit_INCLUDE_DIRS}) -ADD_DEFINITIONS(${Qt5WebKit_DEFINITIONS}) -INCLUDE_DIRECTORIES(${Qt5WebKitWidgets_INCLUDE_DIRS}) -ADD_DEFINITIONS(${Qt5WebKitWidgets_DEFINITIONS}) INCLUDE_DIRECTORIES(${Qt5Network_INCLUDE_DIRS}) ADD_DEFINITIONS(${Qt5Network_DEFINITIONS}) INCLUDE_DIRECTORIES(${Qt5OpenGL_INCLUDE_DIRS}) diff --git a/scribus/CMakeLists.txt b/scribus/CMakeLists.txt index 6425e22..80b82e1 100644 --- a/scribus/CMakeLists.txt +++ b/scribus/CMakeLists.txt @@ -1193,8 +1193,6 @@ TARGET_LINK_LIBRARIES(${EXE_NAME} ${Qt5Widgets_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Xml_LIBRARIES} - ${Qt5WebKit_LIBRARIES} - ${Qt5WebKitWidgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5OpenGL_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} @@ -1293,8 +1291,6 @@ SET(PLUGIN_LIBRARIES ${Qt5Widgets_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Xml_LIBRARIES} - ${Qt5WebKit_LIBRARIES} - ${Qt5WebKitWidgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5OpenGL_LIBRARIES} ${LIBXML2_LIBRARIES} diff --git a/scribus/ui/helpbrowser.cpp b/scribus/ui/helpbrowser.cpp index ef7eceb..34a44fb 100644 --- a/scribus/ui/helpbrowser.cpp +++ b/scribus/ui/helpbrowser.cpp @@ -249,7 +249,7 @@ void HelpBrowser::setupLocalUI() //Add Toolbar items goHome=toolBar->addAction(IconManager::instance()->loadIcon("16/go-home.png"), "", textBrowser, SLOT(home())); - goBack=toolBar->addAction(IconManager::instance()->loadIcon("16/go-previous.png"), "", textBrowser, SLOT(back())); + goBack=toolBar->addAction(IconManager::instance()->loadIcon("16/go-previous.png"), "", textBrowser, SLOT(backward())); goFwd=toolBar->addAction(IconManager::instance()->loadIcon("16/go-next.png"), "", textBrowser, SLOT(forward())); goBack->setMenu(histMenu); @@ -280,10 +280,10 @@ void HelpBrowser::setupLocalUI() // connect(textBrowser, SIGNAL(overLink(const QString &)), this, SLOT(showLinkContents(const QString &))); // status bar - connect( textBrowser, SIGNAL(statusBarMessage(QString)), this->statusBar(), SLOT(showMessage(QString))); - connect(textBrowser,SIGNAL(loadStarted()), this, SLOT(loadStart())); - connect(textBrowser,SIGNAL(loadProgress(int)), this, SLOT(loadProcess(int))); - connect(textBrowser,SIGNAL(loadFinished(bool)), this, SLOT(loadEnd(bool))); + //connect(textBrowser, SIGNAL(statusBarMessage(QString)), this->statusBar(), SLOT(showMessage(QString))); + //connect(textBrowser,SIGNAL(loadStarted()), this, SLOT(loadStart())); + //connect(textBrowser,SIGNAL(loadProgress(int)), this, SLOT(loadProcess(int))); + //connect(textBrowser,SIGNAL(loadFinished(bool)), this, SLOT(loadEnd(bool))); languageChange(); } @@ -308,7 +308,7 @@ void HelpBrowser::loadEnd(bool e) { progressBar->setVisible(false); if(e) - statusBar()->showMessage( textBrowser->title() ); + statusBar()->showMessage( textBrowser->documentTitle() ); else statusBar()->showMessage( tr("Loading Failed") ); } @@ -342,7 +342,7 @@ void HelpBrowser::languageChange() Ui::HelpBrowser::retranslateUi(this); if (!firstRun) { - QString fname(QDir::cleanPath(textBrowser->url().toLocalFile())); + QString fname(QDir::cleanPath(textBrowser->source().toLocalFile())); QFileInfo fi(fname); QString filename(fi.fileName()); if (ScCore->getGuiLanguage().isEmpty()) @@ -359,11 +359,11 @@ void HelpBrowser::languageChange() void HelpBrowser::print() { - QPrinter printer; - printer.setFullPage(true); - QPrintDialog dialog(&printer, this); - if (dialog.exec()) - textBrowser->print(&printer); + QPrinter printer; + QPrintDialog dialog(&printer, this); + if (dialog.exec()) { + textBrowser->print(&printer); + } } void HelpBrowser::searchingButton_clicked() @@ -446,8 +446,8 @@ void HelpBrowser::findPrevious() void HelpBrowser::bookmarkButton_clicked() { - QString title = textBrowser->title(); - QString fname(QDir::cleanPath(textBrowser->url().toLocalFile())); + QString title = textBrowser->documentTitle(); + QString fname(QDir::cleanPath(textBrowser->source().toLocalFile())); title = QInputDialog::getText(this, tr("New Bookmark"), tr("New Bookmark's Title:"), QLineEdit::Normal, title, 0); // user cancel if (title.isNull()) @@ -487,7 +487,7 @@ void HelpBrowser::deleteAllBookmarkButton_clicked() void HelpBrowser::histChosen(QAction* i) { if (mHistory.contains(i)) - textBrowser->setUrl( QUrl::fromLocalFile(mHistory[i].url) ); + textBrowser->setSource( QUrl::fromLocalFile(mHistory[i].url) ); } void HelpBrowser::jumpToHelpSection(const QString& jumpToSection, const QString& jumpToFile, bool dontChangeIfAlreadyLoaded) @@ -551,9 +551,9 @@ void HelpBrowser::loadHelp(const QString& filename) Avail=false; if (Avail) { - textBrowser->setUrl( QUrl::fromLocalFile(toLoad) ); + textBrowser->setSource( QUrl::fromLocalFile(toLoad) ); - his.title = textBrowser->title(); + his.title = textBrowser->documentTitle(); if (his.title.isEmpty()) his.title = toLoad; his.url = toLoad; diff --git a/scribus/ui/helpbrowser.h b/scribus/ui/helpbrowser.h index 921023a..d12d9c6 100644 --- a/scribus/ui/helpbrowser.h +++ b/scribus/ui/helpbrowser.h @@ -43,6 +43,7 @@ for which a new license (GPL+exception) is in place. #include <QUrl> #include <QVariant> #include <QWidget> +#include <QPrinter> class QEvent; diff --git a/scribus/ui/sctextbrowser.cpp b/scribus/ui/sctextbrowser.cpp index 21df643..0160f84 100644 --- a/scribus/ui/sctextbrowser.cpp +++ b/scribus/ui/sctextbrowser.cpp @@ -7,7 +7,6 @@ for which a new license (GPL+exception) is in place. #include "sctextbrowser.h" -#include <QWebFrame> #include <QEvent> #include <QDebug> @@ -19,31 +18,27 @@ for which a new license (GPL+exception) is in place. #include "urllauncher.h" ScTextBrowser::ScTextBrowser( QWidget * parent ) - : QWebView(parent) + : QTextBrowser(parent) { hideContextMenus=false; // Questionable - e.g. I would like to browse only through help browser (a pref?) - page()->setLinkDelegationPolicy(QWebPage::DelegateExternalLinks); - connect(this, SIGNAL(urlChanged(QUrl)), this, SLOT(catchHome(QUrl))); - connect(this, SIGNAL(linkClicked(QUrl)), this, SLOT(externalLinkClick(QUrl))); -} - -void ScTextBrowser::clear() -{ - setHtml(QString::fromLatin1("<html></html>")); + //page()->setLinkDelegationPolicy(QWebEnginePage::DelegateExternalLinks); + //connect(this, SIGNAL(urlChanged(QUrl)), this, SLOT(catchHome(QUrl))); + connect(this, SIGNAL(anchorClicked(QUrl)), this, SLOT(externalLinkClick(QUrl))); } void ScTextBrowser::setSimpleText(const QString& str) { if(!str.isEmpty()) - setContent(str.toUtf8(), QLatin1String("text/plain; charset=utf-8")); + //setContent(str.toUtf8(), QLatin1String("text/plain; charset=utf-8")); + setPlainText(str); else clear(); } void ScTextBrowser::find(const QString& txt, const int& options) { - findText(txt, QWebPage::FindFlag(options)); + //findText(txt, QTextDocument::FindFlag(options)); } void ScTextBrowser::swallowContextMenus(bool b) @@ -51,22 +46,9 @@ void ScTextBrowser::swallowContextMenus(bool b) hideContextMenus=b; } - -QString ScTextBrowser::toPlainText() -{ - if(page()) - { - if(page()->mainFrame()) - { - return page()->mainFrame()->toPlainText(); - } - } - return QString(); -} - void ScTextBrowser::home() { - setUrl(homeUrl); + setSource(homeUrl); } void ScTextBrowser::catchHome(QUrl url) @@ -74,7 +56,7 @@ void ScTextBrowser::catchHome(QUrl url) if(homeUrl.isEmpty()) { homeUrl = url; - disconnect(this, SIGNAL(urlChanged(QUrl)), this, SLOT(catchHome(QUrl))); + //disconnect(this, SIGNAL(urlChanged(QUrl)), this, SLOT(catchHome(QUrl))); } } @@ -85,16 +67,16 @@ void ScTextBrowser::externalLinkClick(QUrl url) bool ScTextBrowser::event(QEvent * e) { -// bool ret(QWebView::event(e)); +// bool ret(QWebEngineView::event(e)); // qDebug()<<"ScTextBrowser::event"<<e->type()<<ret; // return ret; - return QWebView::event(e); + return QTextBrowser::event(e); } void ScTextBrowser::contextMenuEvent(QContextMenuEvent* e) { - if (hideContextMenus) - page()->swallowContextMenuEvent(e); - else - QWebView::contextMenuEvent(e); + //if (hideContextMenus) + // page()->swallowContextMenuEvent(e); + //else + QTextBrowser::contextMenuEvent(e); } diff --git a/scribus/ui/sctextbrowser.h b/scribus/ui/sctextbrowser.h index 9e49a17..7ba2a86 100644 --- a/scribus/ui/sctextbrowser.h +++ b/scribus/ui/sctextbrowser.h @@ -9,9 +9,9 @@ for which a new license (GPL+exception) is in place. #include "scribusapi.h" #include <QUrl> -#include <QWebView> +#include <QTextBrowser> -class SCRIBUS_API ScTextBrowser : public QWebView +class SCRIBUS_API ScTextBrowser : public QTextBrowser { Q_OBJECT @@ -20,11 +20,9 @@ class SCRIBUS_API ScTextBrowser : public QWebView public: ScTextBrowser( QWidget * parent = 0 ); - void clear(); void setSimpleText(const QString& str); void find(const QString& txt, const int& options = 0); void swallowContextMenus(bool b); - QString toPlainText(); protected: bool event(QEvent *e); @@ -36,7 +34,7 @@ class SCRIBUS_API ScTextBrowser : public QWebView private slots: void catchHome(QUrl url); - void externalLinkClick(QUrl url); + void externalLinkClick(QUrl url); }; |
|
|
|
Images are loaded using QTextBrowser. |
|
Cool. Looks like Craig committed it in r20227 (http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20227) SimonAW, Thanks for the heads up! Does this have any bearing on the future of 0009507 ? |
|
Thanks for the fix, SimonAW and the commit, Craig. |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-07-01 11:37 | simonaw | New Issue | |
2015-07-01 11:37 | simonaw | File Added: scribus-webengine.patch | |
2015-07-01 11:49 | jghali | Note Added: 0035598 | |
2015-07-01 12:57 | simonaw | Note Added: 0035599 | |
2015-07-01 14:17 | simonaw | Note Edited: 0035599 | |
2015-07-01 17:17 | cbradney | Note Added: 0035604 | |
2015-07-01 17:20 | simonaw | Note Added: 0035605 | |
2015-07-01 21:24 | simonaw | File Added: scribus-help-qtextbrowser.patch | |
2015-07-01 21:24 | simonaw | File Added: scribus-help-textbrowser.png | |
2015-07-01 21:25 | simonaw | Note Added: 0035608 | |
2015-07-01 23:01 | cbradney | Status | new => resolved |
2015-07-01 23:01 | cbradney | Fixed in Version | => 1.5.1svn |
2015-07-01 23:01 | cbradney | Resolution | open => fixed |
2015-07-01 23:01 | cbradney | Assigned To | => cbradney |
2015-07-01 23:20 | Kunda | Note Added: 0035611 | |
2015-07-28 12:59 | Kunda | Note Added: 0035929 | |
2015-07-28 12:59 | Kunda | Status | resolved => closed |