[freemat] 08/13: Remove qtwebkit:disables help-menu functionality, need to be port to Qt5

Anton Gladky gladk at moszumanska.debian.org
Tue Jan 26 09:50:32 UTC 2016


This is an automated email from the git hooks/post-receive script.

gladk pushed a commit to branch experimental
in repository freemat.

commit 8b25b9d725d4ee6227242ddd1f4eeb76b2c9cf49
Author: Anton Gladky <gladk at debian.org>
Date:   Fri Jan 22 21:56:41 2016 +0100

    Remove qtwebkit:disables help-menu functionality, need to be port to Qt5
---
 debian/control                         |   1 -
 debian/patches/15_remove_qwebkit.patch | 138 +++++++++++++++++++++++++++++++++
 debian/patches/series                  |   1 +
 3 files changed, 139 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 04332c5..e02cd2e 100644
--- a/debian/control
+++ b/debian/control
@@ -18,7 +18,6 @@ Build-Depends: debhelper (>= 9),
                python-all-dev,
                llvm-dev,
                doxygen,
-               libqtwebkit-dev,
                libsuitesparse-dev,
                zlib1g-dev,
                portaudio19-dev,
diff --git a/debian/patches/15_remove_qwebkit.patch b/debian/patches/15_remove_qwebkit.patch
new file mode 100644
index 0000000..6617d00
--- /dev/null
+++ b/debian/patches/15_remove_qwebkit.patch
@@ -0,0 +1,138 @@
+Description: Remove qwebkit dependencies.
+ This is bad patch, because it disables the functionality
+ of help-menu. But it can only be fixed, when FreeMat will
+ be ported on Qt5. Qt4-Webkit will be removed soon, so we
+ do not have any choice.
+Author: Anton Gladky <gladk at debian.org>
+Last-Update: 2016-01-22
+
+Index: FreeMat-4.2-Source/libs/libCore/helpwidget.cpp
+===================================================================
+--- FreeMat-4.2-Source.orig/libs/libCore/helpwidget.cpp
++++ FreeMat-4.2-Source/libs/libCore/helpwidget.cpp
+@@ -85,7 +85,6 @@ void HelpWindow::activateModule(QListWid
+   QRegExp modname_pattern("^\\s*(\\b\\w+\\b)\\s*\\((\\b\\w+\\b)\\)");
+   if (modname_pattern.indexIn(name_and_section) < 0)
+     return;
+-  tb->load(QUrl::fromLocalFile(m_initial+"/"+modname_pattern.cap(2) + "_" + modname_pattern.cap(1)+".html"));
+ }
+ 
+ void HelpWindow::activateModuleSearch(QListWidgetItem* item) {
+@@ -93,11 +92,6 @@ void HelpWindow::activateModuleSearch(QL
+   QRegExp modname_pattern("^\\s*(\\b\\w+\\b)\\s*\\((\\b\\w+\\b)\\)");
+   if (modname_pattern.indexIn(name_and_section) < 0)
+     return;
+-  tb->load(QUrl::fromLocalFile(m_initial+"/"+modname_pattern.cap(2) + "_" + modname_pattern.cap(1)+".html"));
+-
+-  /* Highlight search text*/
+-  if (!searchString.isEmpty())
+-    tb->findText(searchString,QWebPage::HighlightAllOccurrences);
+ }
+ 
+ void HelpWindow::activateModule(QTreeWidgetItem* item, int) {
+@@ -106,7 +100,6 @@ void HelpWindow::activateModule(QTreeWid
+   if (modname.indexIn(fulltext) < 0)
+     return;
+   QString module(modname.cap(1).toLower());
+-  tb->load(QUrl::fromLocalFile(m_initial+"/"+item->text(1)+"_"+module+".html"));
+ }
+ 
+ void HelpWindow::helpText(QString fulltext) {
+@@ -122,7 +115,6 @@ void HelpWindow::helpText(QString fullte
+   QRegExp modname_pattern("^\\s*(\\b\\w+\\b)\\s*\\((\\b\\w+\\b)\\)");
+   if (modname_pattern.indexIn(name_and_section) < 0)
+     return;
+-  tb->load(QUrl::fromLocalFile(m_initial+"/"+modname_pattern.cap(2) + "_" + modname_pattern.cap(1)+".html"));
+   m_helpwidget->m_flist->setCurrentItem(item);
+ }
+ 
+@@ -156,9 +148,6 @@ HelpWindow::HelpWindow(QString url) {
+   setWindowIcon(QPixmap(":/images/freemat_help_small_mod_64.png"));
+   setWindowTitle(QString(Interpreter::getVersionString()) + " Online Help");
+   m_initial = url;
+-  tb = new QWebView(this);
+-  tb->load(QUrl::fromLocalFile(m_initial+"/index.html"));
+-  setCentralWidget(tb);
+   m_helpwidget = new HelpWidget(url,this);
+   addDockWidget(Qt::LeftDockWidgetArea,m_helpwidget);
+   createActions();
+@@ -196,29 +185,23 @@ void HelpWindow::createActions() {
+ 
+   zoominAct = new QAction(QIcon(":/images/zoomin.png"),"Zoom &In",this);
+   zoominAct->setShortcut(Qt::Key_Plus | Qt::CTRL); 
+-  connect(zoominAct,SIGNAL(triggered()),tb,SLOT(zoomIn()));
+   zoomoutAct = new QAction(QIcon(":/images/zoomout.png"),"Zoom &Out",this);
+   zoomoutAct->setShortcut(Qt::Key_Minus | Qt::CTRL); 
+-  connect(zoomoutAct,SIGNAL(triggered()),tb,SLOT(zoomOut()));
+   copyAct = new QAction(QIcon(":/images/copy.png"),"&Copy Selection",this);
+   stemp.clear();
+   stemp.push_back(QKeySequence(Qt::Key_C | Qt::CTRL));
+   stemp.push_back(QKeySequence(Qt::Key_Insert | Qt::CTRL));
+   copyAct->setShortcuts(stemp);
+ 
+-  connect(copyAct,SIGNAL(triggered()),tb,SLOT(copy()));
+   exitAct = new QAction(QIcon(":/images/quit.png"),"&Exit Help",this);
+   exitAct->setShortcut(Qt::Key_Q | Qt::CTRL); 
+   connect(exitAct,SIGNAL(triggered()),this,SLOT(close()));
+   forwardAct = new QAction(QIcon(":/images/next.png"),"&Next",this);
+   forwardAct->setShortcut(Qt::Key_Right | Qt::Key_Alt); 
+-  connect(forwardAct,SIGNAL(triggered()),tb,SLOT(forward()));
+   backAct = new QAction(QIcon(":/images/previous.png"),"&Previous",this);
+   backAct->setShortcut(Qt::Key_Left | Qt::Key_Alt); 
+-  connect(backAct,SIGNAL(triggered()),tb,SLOT(back()));
+   homeAct = new QAction(QIcon(":/images/home.png"),"&Home",this);
+   homeAct->setShortcut(Qt::Key_Home | Qt::CTRL); 
+-  connect(homeAct,SIGNAL(triggered()),tb,SLOT(home()));
+   executeSelectionAct = new QAction(QIcon(":/images/player_playselection.png"),"&Execute Selection",this);
+   executeSelectionAct->setShortcut(Qt::Key_F9); 
+   connect(executeSelectionAct,SIGNAL(triggered()),this,SLOT(execSelected()));
+@@ -226,9 +209,7 @@ void HelpWindow::createActions() {
+   helpOnSelectionAct->setShortcut(Qt::Key_F2);
+   connect(helpOnSelectionAct,SIGNAL(triggered()),this,SLOT(helpOnSelection()));
+   
+-  connect(tb,SIGNAL(forwardAvailable(bool)),forwardAct,SLOT(setEnabled(bool)));
+   forwardAct->setEnabled(false);
+-  connect(tb,SIGNAL(backwardAvailable(bool)),backAct,SLOT(setEnabled(bool)));
+   backAct->setEnabled(false);
+ }
+ 
+@@ -267,19 +248,9 @@ void HelpWindow::createStatusBar() {
+ }
+ 
+ void HelpWindow::execSelected() {
+-  QString executeText = tb->selectedText();
+-  executeText.remove("--> ");
+-  executeText.remove("-> ");
+-  executeText = executeText.trimmed();
+-  if (!executeText.isEmpty())
+-    emit EvaluateText(executeText + "\n");
+ }
+ 
+ void HelpWindow::helpOnSelection() {
+-  QString executeText = tb->selectedText();
+-  executeText = executeText.trimmed();
+-  if (!executeText.isEmpty())
+-    helpText(executeText);
+ }
+ 
+ 
+Index: FreeMat-4.2-Source/libs/libCore/helpwidget.hpp
+===================================================================
+--- FreeMat-4.2-Source.orig/libs/libCore/helpwidget.hpp
++++ FreeMat-4.2-Source/libs/libCore/helpwidget.hpp
+@@ -23,7 +23,6 @@
+ #include <QObject>
+ #include <QMainWindow>
+ #include <QDockWidget>
+-#include <QWebView>
+ #include <QMenu>
+ #include <QToolBar>
+ #include <QAction>
+@@ -80,7 +79,6 @@ private:
+   void readSettings();
+   void closeEvent(QCloseEvent* ce);
+ 
+-  QWebView *tb;
+   HelpWidget *m_helpwidget;
+   QMenu *fileMenu, *editMenu, *goMenu, *helpMenu;
+   QToolBar *editToolBar;
diff --git a/debian/patches/series b/debian/patches/series
index d112661..c7ff4f0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 07_fix_FTBFS_with_GCC_4.4.patch
 12_update_clang_deps.patch
 14_disable_pdf_install.patch
+15_remove_qwebkit.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/freemat.git



More information about the debian-science-commits mailing list