Wed, 02 Sep 2015 18:56:01 +0200
Corrected some source style issues, removed the (disabled) VirusTotal code and regenerated the source docu.
--- a/Documentation/Source/eric6.eric6.html Wed Sep 02 18:47:08 2015 +0200 +++ b/Documentation/Source/eric6.eric6.html Wed Sep 02 18:56:01 2015 +0200 @@ -88,13 +88,7 @@ <b>main</b>(<i></i>) <p> Main entry point into the application. -</p><dl> -<dt>Raises <b>Exception</b>:</dt> -<dd> -re-raised for any exception occurring in the main - program logic -</dd> -</dl> +</p> <div align="right"><a href="#top">Up</a></div> <hr /><hr /> <a NAME="uiStartUp" ID="uiStartUp"></a>
--- a/Helpviewer/AdBlock/AdBlockSubscription.py Wed Sep 02 18:47:08 2015 +0200 +++ b/Helpviewer/AdBlock/AdBlockSubscription.py Wed Sep 02 18:56:01 2015 +0200 @@ -126,7 +126,7 @@ # Check for required subscription self.__requiresLocation = QUrl.fromPercentEncoding( QByteArray(urlQuery.queryItemValue( - "requiresLocation").encode())) + "requiresLocation").encode())) self.__requiresTitle = QUrl.fromPercentEncoding( QByteArray(urlQuery.queryItemValue("requiresTitle").encode())) if self.__requiresLocation and self.__requiresTitle:
--- a/Helpviewer/Download/DownloadItem.py Wed Sep 02 18:47:08 2015 +0200 +++ b/Helpviewer/Download/DownloadItem.py Wed Sep 02 18:56:01 2015 +0200 @@ -199,7 +199,7 @@ ## if dlg.getAction() == "scan": ## self.__mainWindow.requestVirusTotalScan(url) -## +## ## self.progressBar.setVisible(False) ## self.__reply.close() ## self.on_stopButton_clicked() @@ -208,7 +208,7 @@ ## QFileInfo(defaultFileName).fileName())) ## self.__canceledFileSelect = True ## return -## +## self.__autoOpen = dlg.getAction() == "open" if PYQT_VERSION_STR >= "5.0.0": from PyQt5.QtCore import QStandardPaths
--- a/Helpviewer/HelpBrowserWV.py Wed Sep 02 18:47:08 2015 +0200 +++ b/Helpviewer/HelpBrowserWV.py Wed Sep 02 18:56:01 2015 +0200 @@ -1485,7 +1485,7 @@ ## act = self.sender() ## url = act.data() ## self.mw.requestVirusTotalScan(url) -## +## def __searchRequested(self, act): """ Private slot to search for some text with a selected search engine.
--- a/Helpviewer/HelpWindow.py Wed Sep 02 18:47:08 2015 +0200 +++ b/Helpviewer/HelpWindow.py Wed Sep 02 18:56:01 2015 +0200 @@ -20,8 +20,8 @@ from PyQt5.QtGui import QDesktopServices, QKeySequence, QFont, QFontMetrics, \ QIcon from PyQt5.QtWidgets import QWidget, QVBoxLayout, QSizePolicy, QDockWidget, \ - QComboBox, QLabel, QSplitter, QMenu, QToolButton, QLineEdit, \ - QApplication, QWhatsThis, QDialog, QHBoxLayout, QProgressBar, QAction + QComboBox, QLabel, QSplitter, QMenu, QToolButton, QApplication, \ + QWhatsThis, QDialog, QHBoxLayout, QProgressBar, QAction from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkRequest from PyQt5.QtWebKit import QWebSettings, QWebDatabase, QWebSecurityOrigin from PyQt5.QtWebKitWidgets import QWebPage @@ -128,7 +128,6 @@ from .HelpBrowserWV import HelpBrowser from .HelpTabWidget import HelpTabWidget from .AdBlock.AdBlockIcon import AdBlockIcon -## from .VirusTotalApi import VirusTotalAPI HelpWindow.setUseQtHelp(self.fromEric) @@ -270,14 +269,6 @@ self.__initHelpDb() -## self.__virusTotal = VirusTotalAPI(self) -## self.__virusTotal.submitUrlError.connect( -## self.__virusTotalSubmitUrlError) -## self.__virusTotal.urlScanReport.connect( -## self.__virusTotalUrlScanReport) -## self.__virusTotal.fileScanReport.connect( -## self.__virusTotalFileScanReport) -## self.__previewer = None self.__shutdownCalled = False @@ -1823,76 +1814,6 @@ self.bookmarksToolBar.newUrl.connect(self.openUrlNewTab) self.addToolBarBreak() self.addToolBar(self.bookmarksToolBar) -## -## self.addToolBarBreak() -## vttb = self.addToolBar(self.tr("VirusTotal")) -## vttb.setObjectName("VirusTotalToolBar") -## vttb.setIconSize(UI.Config.ToolBarIconSize) -## vttb.setToolButtonStyle(Qt.ToolButtonTextBesideIcon) -## self.virustotalSearchEdit = QLineEdit() -## self.virustotalSearchEdit.setMaximumWidth(250) -## self.virustotalSearchEdit.setWhatsThis(self.tr( -## """<h2>File search</h2>""" -## """<p>In order to search for the last VirusTotal report on a""" -## """ given file just enter its hash. Currently the allowed""" -## """ hashes are MD5, SHA1 and SHA256. You can also search for""" -## """ a particular file report by typing in its permalink id.</p>""" -## """<h2>URL search</h2>""" -## """<p>URL searches are simple, just type in the given URL, the""" -## """ application will normalize it and compare it with the""" -## """ entries in VirusTotal's database. Alternatively you may""" -## """ enter the MD5 hash of an URL preceded by "url:", e.g.""" -## """ url:7f911bbcf618f052ac6b9928600d2820.</p>""" -## """<h2>User search</h2>""" -## """<p>Do you want to know whether a friend has a VT Community""" -## """ account? Simply type in his nick preceded by the symbol""" -## """ "@", e.g. @EmilianoMartinez.</p>""" -## """<h2>Search through comments</h2>""" -## """<p>The comments in VT Community may often help in""" -## """ disinfecting your PC or may proof themselves useful when""" -## """ analysing a particular malware sample, comment tags enable""" -## """ users to search through the VT Community reviews. The""" -## """ standard file tags are: {0} The standard URL tags are: {1}""" -## """User generated tags are preceded by the symbol "#", e.g.""" -## """ #disinfect.</p>""" -## ).format( -## """<ul>""" -## """<li>goodware</li>""" -## """<li>malware</li>""" -## """<li>spamattachmentorlink</li>""" -## """<li>p2pdownload</li>""" -## """<li>impropagating</li>""" -## """<li>networkworm</li>""" -## """<li>drivebydownload</li>""" -## """</ul>""", -## """<ul>""" -## """<li>malicious</li>""" -## """<li>benign</li>""" -## """<li>malewaredownload</li>""" -## """<li>phishingsite</li>""" -## """<li>browserexploit</li>""" -## """<li>spamlink</li>""" -## """</ul>""", -## )) -## self.virustotalSearchEdit.textChanged.connect( -## self.__virusTotalSearchChanged) -## self.virustotalSearchEdit.returnPressed.connect( -## self.__virusTotalSearch) -## vttb.addWidget(self.virustotalSearchEdit) -## self.virustotalSearchAct = vttb.addAction( -## UI.PixmapCache.getIcon("virustotal.png"), -## self.tr("Search VirusTotal"), -## self.__virusTotalSearch) -## self.virustotalSearchAct.setEnabled(False) -## vttb.addSeparator() -## self.virustotalScanCurrentAct = vttb.addAction( -## UI.PixmapCache.getIcon("virustotal.png"), -## self.tr("Scan current site"), -## self.__virusTotalScanCurrentSite) -## if not Preferences.getHelp("VirusTotalEnabled") or \ -## Preferences.getHelp("VirusTotalServiceKey") == "": -## self.virustotalSearchEdit.setEnabled(False) -## self.virustotalScanCurrentAct.setEnabled(False) def __nextTab(self): """ @@ -2506,16 +2427,6 @@ self.tabWidget.preferencesChanged() self.searchEdit.preferencesChanged() -## -## self.__virusTotal.preferencesChanged() -## if not Preferences.getHelp("VirusTotalEnabled") or \ -## Preferences.getHelp("VirusTotalServiceKey") == "": -## self.virustotalSearchEdit.setEnabled(False) -## self.virustotalScanCurrentAct.setEnabled(False) -## else: -## self.virustotalSearchEdit.setEnabled(True) -## self.virustotalScanCurrentAct.setEnabled(True) -## self.__virusTotalSearchChanged(self.virustotalSearchEdit.text()) def masterPasswordChanged(self, oldPassword, newPassword): """ @@ -3580,78 +3491,6 @@ super(HelpWindow, self).keyPressEvent(evt) -## ########################################################################### -## ## Interface to VirusTotal below ## -## ########################################################################### -## -## def __virusTotalSearchChanged(self, txt): -## """ -## Private slot to react upon changes of the VirusTotal search text. -## -## @param txt contents of the search (string) -## """ -## self.virustotalSearchAct.setEnabled( -## txt != "" and -## Preferences.getHelp("VirusTotalEnabled") and -## Preferences.getHelp("VirusTotalServiceKey") != "") -## -## def __virusTotalSearch(self): -## """ -## Private slot to search VirusTotal for a given entry. -## """ -## search = self.virustotalSearchEdit.text() -## if search: -## from .VirusTotalApi import VirusTotalAPI -## requestData = VirusTotalAPI.getSearchRequestData(search) -## self.newTab(requestData=requestData) -## -## def __virusTotalScanCurrentSite(self): -## """ -## Private slot to ask VirusTotal for a scan of the URL of the current -## browser. -## """ -## cb = self.currentBrowser() -## if cb is not None: -## url = cb.url() -## if url.scheme() in ["http", "https", "ftp"]: -## self.requestVirusTotalScan(url) -## -## def requestVirusTotalScan(self, url): -## """ -## Public method to submit a request to scan an URL by VirusTotal. -## -## @param url URL to be scanned (QUrl) -## """ -## self.__virusTotal.submitUrl(url) -## -## def __virusTotalSubmitUrlError(self, msg): -## """ -## Private slot to handle an URL scan submission error. -## -## @param msg error message (str) -## """ -## E5MessageBox.critical( -## self, -## self.tr("VirusTotal Scan"), -## self.tr("""<p>The VirusTotal scan could not be""" -## """ scheduled.<p>\n<p>Reason: {0}</p>""").format(msg)) -## -## def __virusTotalUrlScanReport(self, url): -## """ -## Private slot to initiate the display of the URL scan report page. -## -## @param url URL of the URL scan report page (string) -## """ -## self.newTab(url) -## -## def __virusTotalFileScanReport(self, url): -## """ -## Private slot to initiate the display of the file scan report page. -## -## @param url URL of the file scan report page (string) -## """ -## self.newTab(url) -## def reloadUserStyleSheet(self): """ Public method to reload the user style sheet.
--- a/Preferences/ConfigurationDialog.py Wed Sep 02 18:47:08 2015 +0200 +++ b/Preferences/ConfigurationDialog.py Wed Sep 02 18:56:01 2015 +0200 @@ -277,9 +277,6 @@ [self.tr("Help Viewers"), "preferences-helpviewers.png", "HelpViewersPage", "0helpPage", None], -## "helpVirusTotalPage": -## [self.tr("VirusTotal Interface"), "virustotal.png", -## "HelpVirusTotalPage", "0helpPage", None], "helpWebBrowserPage": [self.tr("eric6 Web Browser"), "ericWeb.png", "HelpWebBrowserPage", "0helpPage", None], @@ -342,9 +339,6 @@ [self.tr("Help Documentation"), "preferences-helpdocumentation.png", "HelpDocumentationPage", "0helpPage", None], -## "helpVirusTotalPage": -## [self.tr("VirusTotal Interface"), "virustotal.png", -## "HelpVirusTotalPage", "0helpPage", None], "helpWebBrowserPage": [self.tr("eric6 Web Browser"), "ericWeb.png", "HelpWebBrowserPage", "0helpPage", None],
--- a/eric6.py Wed Sep 02 18:47:08 2015 +0200 +++ b/eric6.py Wed Sep 02 18:56:01 2015 +0200 @@ -191,9 +191,6 @@ def main(): """ Main entry point into the application. - - @exception Exception re-raised for any exception occurring in the main - program logic """ from Globals import AppInfo import Globals