[freemat] 03/04: Disable update check

Graham Inggs ginggs at moszumanska.debian.org
Wed Jun 7 20:45:12 UTC 2017


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

ginggs pushed a commit to branch master
in repository freemat.

commit 0bff2dacc16e4148afd15b0a265f921d49b1211c
Author: Graham Inggs <ginggs at debian.org>
Date:   Wed Jun 7 22:40:34 2017 +0200

    Disable update check
---
 debian/patches/disable-update-check.patch | 67 +++++++++++++++++++++++++++++++
 debian/patches/series                     |  1 +
 2 files changed, 68 insertions(+)

diff --git a/debian/patches/disable-update-check.patch b/debian/patches/disable-update-check.patch
new file mode 100644
index 0000000..39043ae
--- /dev/null
+++ b/debian/patches/disable-update-check.patch
@@ -0,0 +1,67 @@
+Description: Disable update check
+Forwarded: not-needed
+Author: Graham Inggs <ginggs at debian.org>
+Last Update: 2017-06-07
+--- a/src/application.cpp
++++ b/src/application.cpp
+@@ -313,7 +313,6 @@
+   connect(stopAct,SIGNAL(triggered()),m_keys,SLOT(StopAction()));
+   connect(dbStepAct,SIGNAL(triggered()),m_keys,SLOT(DbStepAction()));
+   connect(dbTraceAct,SIGNAL(triggered()),m_keys,SLOT(DbTraceAction()));
+-  connect(checkUpdates,SIGNAL(triggered()),this,SLOT(checkForUpdates()));
+   connect(cdCombo,SIGNAL(activated(const QString&)),
+ 	  m_keys,SLOT(ChangeDir(const QString&)));
+   connect(dirChooseAct,SIGNAL(triggered()),this,SLOT(dirButtonClicked()));
+@@ -441,10 +440,6 @@
+   //  m_variables->setContext(m_keys->GetCompletionContext());
+   // Check for the latest version?
+   QSettings settings("FreeMat", Interpreter::getVersionString());
+-  QDate lastCheck = settings.value("mainwindow/lastcheckdate").toDate();
+-  if (QDate::currentDate().daysTo(lastCheck) > 7) {
+-    checkForUpdates();
+-  }
+   QString font = settings.value("terminal/font").toString();
+   if (!font.isNull()) {
+     QFont new_font;
+@@ -479,30 +474,3 @@
+ void ApplicationWindow::dirUp() {
+   m_keys->ChangeDir("..");
+ }
+-
+-void ApplicationWindow::checkForUpdates() {
+-  m_http = new QHttp(this);
+-  connect(m_http, SIGNAL(requestFinished(int, bool)),
+-	  this, SLOT(httpRequestFinished(int, bool)));
+-  QUrl url("http://freemat.sourceforge.net/version.txt");
+-  m_buffer.open(QBuffer::ReadWrite);
+-  m_http->setHost(url.host(), url.port() != -1 ? url.port() : 80);
+-  httpGetId = m_http->get(url.path(), &m_buffer);
+-  QSettings settings("FreeMat", Interpreter::getVersionString());
+-  settings.setValue("mainwindow/lastcheckdate",QDate::currentDate());
+-}
+-
+-void ApplicationWindow::httpRequestFinished(int requestId, bool error) {
+-  char buffer[1000];
+-  if (error)
+-    statusBar()->showMessage("Unable to check for updates...");
+-  if (requestId != httpGetId) return;
+-  const char *qp = m_buffer.data();
+-
+-  if (atof(QUOTEME(FREEMAT_VERSION)) < atof(m_buffer.data())) {
+-    sprintf(buffer,"A newer version of FreeMat appears to available. \n Please update by downloading version %s at http://freemat.org",qp);
+-    QMessageBox::information(this,"Update Available",
+-			     buffer,QMessageBox::Ok);
+-  } else 
+-    statusBar()->showMessage("You are running the latest version of FreeMat");
+-}
+--- a/src/application.hpp
++++ b/src/application.hpp
+@@ -86,8 +86,6 @@
+   void writeSettings();
+   void checkEditorExist(bool isExist);
+ private slots:
+-  void httpRequestFinished(int requestId, bool error);
+-  void checkForUpdates();
+   void newf();
+   void open();
+   void save();
diff --git a/debian/patches/series b/debian/patches/series
index cce2ce5..8bcdf74 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@ skip-failing-tests2.patch
 skip-failing-tests3.patch
 restore-missing-files.patch
 fix-help-about-version.patch
+disable-update-check.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