Sat, 28 Sep 2013 20:07:36 +0200
Continued correcting doc strings by using the new doc string checker.
--- a/Helpviewer/Bookmarks/BookmarkPropertiesDialog.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Bookmarks/BookmarkPropertiesDialog.py Sat Sep 28 20:07:36 2013 +0200 @@ -20,6 +20,7 @@ """ Constructor + @param node reference to the bookmark (BookmarkNode) @param parent reference to the parent widget (QWidget) """ super().__init__(parent)
--- a/Helpviewer/Bookmarks/BookmarksImporters/BookmarksImporter.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Bookmarks/BookmarksImporters/BookmarksImporter.py Sat Sep 28 20:07:36 2013 +0200 @@ -34,6 +34,8 @@ Public method to set the path of the bookmarks file or directory. @param path bookmarks file or directory (string) + @exception NotImplementedError raised to indicate this method must + be implemented by a subclass """ raise NotImplementedError @@ -41,7 +43,10 @@ """ Public method to open the bookmarks file. - @return flag indicating success (boolean) + It must return a flag indicating success (boolean). + + @exception NotImplementedError raised to indicate this method must + be implemented by a subclass """ raise NotImplementedError @@ -49,7 +54,10 @@ """ Public method to get the imported bookmarks. - @return imported bookmarks (BookmarkNode) + It must return the imported bookmarks (BookmarkNode). + + @exception NotImplementedError raised to indicate this method must + be implemented by a subclass """ raise NotImplementedError
--- a/Helpviewer/Bookmarks/BookmarksImporters/ChromeImporter.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Bookmarks/BookmarksImporters/ChromeImporter.py Sat Sep 28 20:07:36 2013 +0200 @@ -22,9 +22,11 @@ """ Module function to get information for the given source id. + @param id id of the browser ("chrome" or "chromium") @return tuple with an icon (QPixmap), readable name (string), name of the default bookmarks file (string), an info text (string), a prompt (string) and the default directory of the bookmarks file (string) + @exception ValueError raised to indicate an invalid browser ID """ if id == "chrome": if Globals.isWindowsPlatform():
--- a/Helpviewer/Bookmarks/BookmarksImporters/FirefoxImporter.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Bookmarks/BookmarksImporters/FirefoxImporter.py Sat Sep 28 20:07:36 2013 +0200 @@ -22,9 +22,11 @@ """ Module function to get information for the given source id. + @param id id of the browser ("chrome" or "chromium") @return tuple with an icon (QPixmap), readable name (string), name of the default bookmarks file (string), an info text (string), a prompt (string) and the default directory of the bookmarks file (string) + @exception ValueError raised to indicate an invalid browser ID """ if id == "firefox": if Globals.isWindowsPlatform():
--- a/Helpviewer/Bookmarks/BookmarksImporters/HtmlImporter.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Bookmarks/BookmarksImporters/HtmlImporter.py Sat Sep 28 20:07:36 2013 +0200 @@ -20,9 +20,11 @@ """ Module function to get information for the given HTML source id. + @param id id of the browser ("chrome" or "chromium") @return tuple with an icon (QPixmap), readable name (string), name of the default bookmarks file (string), an info text (string), a prompt (string) and the default directory of the bookmarks file (string) + @exception ValueError raised to indicate an invalid browser ID """ if id == "html": return (
--- a/Helpviewer/Bookmarks/BookmarksImporters/IExplorerImporter.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Bookmarks/BookmarksImporters/IExplorerImporter.py Sat Sep 28 20:07:36 2013 +0200 @@ -21,9 +21,11 @@ """ Module function to get information for the given source id. + @param id id of the browser ("chrome" or "chromium") @return tuple with an icon (QPixmap), readable name (string), name of the default bookmarks file (string), an info text (string), a prompt (string) and the default directory of the bookmarks file (string) + @exception ValueError raised to indicate an invalid browser ID """ if id == "ie": if Globals.isWindowsPlatform():
--- a/Helpviewer/Bookmarks/BookmarksImporters/OperaImporter.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Bookmarks/BookmarksImporters/OperaImporter.py Sat Sep 28 20:07:36 2013 +0200 @@ -21,9 +21,11 @@ """ Module function to get information for the given source id. + @param id id of the browser ("chrome" or "chromium") @return tuple with an icon (QPixmap), readable name (string), name of the default bookmarks file (string), an info text (string), a prompt (string) and the default directory of the bookmarks file (string) + @exception ValueError raised to indicate an invalid browser ID """ if id == "opera": if Globals.isWindowsPlatform():
--- a/Helpviewer/Bookmarks/BookmarksImporters/SafariImporter.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Bookmarks/BookmarksImporters/SafariImporter.py Sat Sep 28 20:07:36 2013 +0200 @@ -23,9 +23,11 @@ """ Module function to get information for the given source id. + @param id id of the browser ("chrome" or "chromium") @return tuple with an icon (QPixmap), readable name (string), name of the default bookmarks file (string), an info text (string), a prompt (string) and the default directory of the bookmarks file (string) + @exception ValueError raised to indicate an invalid browser ID """ if id == "safari": if Globals.isWindowsPlatform():
--- a/Helpviewer/Bookmarks/BookmarksImporters/XbelImporter.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Bookmarks/BookmarksImporters/XbelImporter.py Sat Sep 28 20:07:36 2013 +0200 @@ -20,9 +20,11 @@ """ Module function to get information for the given XBEL source id. + @param id id of the browser ("chrome" or "chromium") @return tuple with an icon (QPixmap), readable name (string), name of the default bookmarks file (string), an info text (string), a prompt (string) and the default directory of the bookmarks file (string) + @exception ValueError raised to indicate an invalid browser ID """ if id == "e5browser": from ..BookmarksManager import BookmarksManager
--- a/Helpviewer/Bookmarks/BookmarksImporters/__init__.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Bookmarks/BookmarksImporters/__init__.py Sat Sep 28 20:07:36 2013 +0200 @@ -22,7 +22,8 @@ """ importers = [] importers.append( - (UI.PixmapCache.getIcon("ericWeb48.png"), "eric5 Web Browser", "e5browser")) + (UI.PixmapCache.getIcon("ericWeb48.png"), "eric5 Web Browser", + "e5browser")) importers.append( (UI.PixmapCache.getIcon("firefox.png"), "Mozilla Firefox", "firefox")) importers.append( @@ -31,14 +32,16 @@ importers.append( (UI.PixmapCache.getIcon("chromium.png"), "Chromium", "chromium")) importers.append( - (UI.PixmapCache.getIcon("konqueror.png"), "Konqueror", "konqueror")) + (UI.PixmapCache.getIcon("konqueror.png"), "Konqueror", + "konqueror")) importers.append( (UI.PixmapCache.getIcon("opera.png"), "Opera", "opera")) importers.append( (UI.PixmapCache.getIcon("safari.png"), "Apple Safari", "safari")) if Globals.isWindowsPlatform(): importers.append( - (UI.PixmapCache.getIcon("internet_explorer.png"), "Internet Explorer", "ie")) + (UI.PixmapCache.getIcon("internet_explorer.png"), + "Internet Explorer", "ie")) importers.append( (UI.PixmapCache.getIcon("xbel.png"), QCoreApplication.translate("BookmarksImporters", "XBEL File"), @@ -57,7 +60,9 @@ @param id source id to get info for (string) @return tuple with an icon (QPixmap), readable name (string), name of the default bookmarks file (string), an info text (string), - a prompt (string) and the default directory of the bookmarks file (string) + a prompt (string) and the default directory of the bookmarks + file (string) + @exception ValueError raised to indicate an unsupported importer """ if id in ["e5browser", "xbel", "konqueror"]: from . import XbelImporter @@ -91,6 +96,7 @@ @param id source id to get an importer for (string) @param parent reference to the parent object (QObject) @return bookmarks importer (BookmarksImporter) + @exception ValueError raised to indicate an unsupported importer """ if id in ["e5browser", "xbel", "konqueror"]: from . import XbelImporter
--- a/Helpviewer/Bookmarks/BookmarksManager.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Bookmarks/BookmarksManager.py Sat Sep 28 20:07:36 2013 +0200 @@ -112,6 +112,9 @@ def load(self): """ Public method to load the bookmarks. + + @exception RuntimeError raised to indicate an error loading the + bookmarks """ if self.__loaded: return @@ -260,7 +263,10 @@ def setNodeChanged(self, node): """ - Public method to signal changes of bookmarks other than title, URL or timestamp. + Public method to signal changes of bookmarks other than title, URL + or timestamp. + + @param node reference to the bookmark (BookmarkNode) """ self.__saveTimer.changeOccurred() @@ -269,8 +275,9 @@ Public method to set the URL of a bookmark. @param node reference to the node to be changed (BookmarkNode) - @param timestampType type of the timestamp to set (BookmarkNode.TsAdded, - BookmarkNode.TsModified, BookmarkNode.TsVisited) + @param timestampType type of the timestamp to set + (BookmarkNode.TsAdded, BookmarkNode.TsModified, + BookmarkNode.TsVisited) @param timestamp timestamp to set (QDateTime) """ if not self.__loaded:
--- a/Helpviewer/Bookmarks/BookmarksModel.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Bookmarks/BookmarksModel.py Sat Sep 28 20:07:36 2013 +0200 @@ -111,7 +111,7 @@ @param row row of the first bookmark to remove (integer) @param count number of bookmarks to remove (integer) - @param index of the parent bookmark node (QModelIndex) + @param parent index of the parent bookmark node (QModelIndex) @return flag indicating successful removal (boolean) """ if row < 0 or count <= 0 or row + count > self.rowCount(parent):
--- a/Helpviewer/Bookmarks/NsHtmlWriter.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Bookmarks/NsHtmlWriter.py Sat Sep 28 20:07:36 2013 +0200 @@ -33,6 +33,7 @@ @param fileNameOrDevice name of the file to write (string) or device to write to (QIODevice) @param root root node of the bookmark tree (BookmarkNode) + @return flag indicating success (boolean) """ if isinstance(fileNameOrDevice, QIODevice): f = fileNameOrDevice @@ -49,6 +50,7 @@ Private method to write an Netscape HTML bookmark file. @param root root node of the bookmark tree (BookmarkNode) + @return flag indicating success (boolean) """ self.__dev.write("<!DOCTYPE NETSCAPE-Bookmark-file-1>\n" "<!-- This is an automatically generated file.\n"
--- a/Helpviewer/Bookmarks/XbelWriter.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Bookmarks/XbelWriter.py Sat Sep 28 20:07:36 2013 +0200 @@ -31,6 +31,7 @@ @param fileNameOrDevice name of the file to write (string) or device to write to (QIODevice) @param root root node of the bookmark tree (BookmarkNode) + @return flag indicating success (boolean) """ if isinstance(fileNameOrDevice, QIODevice): f = fileNameOrDevice @@ -47,6 +48,7 @@ Private method to write an XBEL bookmark file. @param root root node of the bookmark tree (BookmarkNode) + @return flag indicating success (boolean) """ self.writeStartDocument() self.writeDTD("<!DOCTYPE xbel>")
--- a/Helpviewer/ClosedTabsManager.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/ClosedTabsManager.py Sat Sep 28 20:07:36 2013 +0200 @@ -32,6 +32,7 @@ Special method implementing the equality operator. @param other reference to the object to compare against (ClosedTab) + @return flag indicating equality of the tabs (boolean) """ return self.url == other.url and \ self.title == other.title and \
--- a/Helpviewer/CookieJar/CookieJar.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/CookieJar/CookieJar.py Sat Sep 28 20:07:36 2013 +0200 @@ -190,7 +190,7 @@ def __purgeOldCookies(self): """ - Private method to purge old cookies + Private method to purge old cookies. """ cookies = self.allCookies() if len(cookies) == 0: @@ -315,6 +315,8 @@ def keepPolicy(self): """ Private method to get the keep policy. + + @return keep policy """ if not self.__loaded: self.load()
--- a/Helpviewer/CookieJar/CookiesConfigurationDialog.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/CookieJar/CookiesConfigurationDialog.py Sat Sep 28 20:07:36 2013 +0200 @@ -22,6 +22,8 @@ def __init__(self, parent): """ Constructor + + @param parent reference to the parent object (QWidget) """ super().__init__(parent) self.setupUi(self)
--- a/Helpviewer/Download/DownloadAskActionDialog.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Download/DownloadAskActionDialog.py Sat Sep 28 20:07:36 2013 +0200 @@ -22,6 +22,9 @@ """ Constructor + @param fileName file name (string) + @param mimeType mime type (string) + @param baseUrl URL (string) @param parent reference to the parent widget (QWidget) """ super().__init__(parent)
--- a/Helpviewer/Download/DownloadItem.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Download/DownloadItem.py Sat Sep 28 20:07:36 2013 +0200 @@ -148,9 +148,7 @@ def __getFileName(self): """ - Private method to get the filename to save to from the user. - - @return flag indicating success (boolean) + Private method to get the file name to save to from the user. """ if self.__gettingFileName: return
--- a/Helpviewer/Download/DownloadManager.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Download/DownloadManager.py Sat Sep 28 20:07:36 2013 +0200 @@ -24,7 +24,7 @@ class DownloadManager(QDialog, Ui_DownloadManager): """ - Class implementing the download manager + Class implementing the download manager. """ RemoveNever = 0 RemoveExit = 1 @@ -165,13 +165,14 @@ mainWindow=mainWindow) def handleUnsupportedContent(self, reply, requestFileName=False, - webPage=None, download=False, mainWindow=None): + webPage=None, download=False, + mainWindow=None): """ Public method to handle unsupported content by downloading the referenced resource. @param reply reference to the reply object (QNetworkReply) - @keyparam requestFilename indicating to ask for a filename + @keyparam requestFileName indicating to ask for a filename (boolean) @keyparam webPage reference to the web page (HelpWebPage) @keyparam download flag indicating a download request (boolean) @@ -185,8 +186,10 @@ return from .DownloadItem import DownloadItem - itm = DownloadItem(reply=reply, requestFilename=requestFileName, - webPage=webPage, download=download, parent=self, mainWindow=mainWindow) + itm = DownloadItem( + reply=reply, requestFilename=requestFileName, + webPage=webPage, download=download, parent=self, + mainWindow=mainWindow) self.__addItem(itm) if itm.canceledFileSelect():
--- a/Helpviewer/Download/DownloadModel.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Download/DownloadModel.py Sat Sep 28 20:07:36 2013 +0200 @@ -60,7 +60,7 @@ @param row row of the first bookmark to remove (integer) @param count number of bookmarks to remove (integer) - @param index of the parent bookmark node (QModelIndex) + @param parent index of the parent bookmark node (QModelIndex) @return flag indicating successful removal (boolean) """ if parent.isValid():
--- a/Helpviewer/Download/DownloadUtilities.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Download/DownloadUtilities.py Sat Sep 28 20:07:36 2013 +0200 @@ -3,6 +3,10 @@ # Copyright (c) 2010 - 2013 Detlev Offenbach <detlev@die-offenbachs.de> # +""" +Module implementing some utility functions for the Download package. +""" + from PyQt4.QtCore import QCoreApplication @@ -16,9 +20,10 @@ if timeRemaining > 60: minutes = int(timeRemaining / 60) seconds = int(timeRemaining % 60) - remaining = QCoreApplication.translate("DownloadUtilities", - "%n:{0:02} minutes remaining""", "", QCoreApplication.UnicodeUTF8, minutes)\ - .format(seconds) + remaining = QCoreApplication.translate( + "DownloadUtilities", + "%n:{0:02} minutes remaining""", "", + QCoreApplication.UnicodeUTF8, minutes).format(seconds) else: seconds = int(timeRemaining) remaining = QCoreApplication.translate("DownloadUtilities",
--- a/Helpviewer/Feeds/FeedEditDialog.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Feeds/FeedEditDialog.py Sat Sep 28 20:07:36 2013 +0200 @@ -21,6 +21,8 @@ """ Constructor + @param urlString feed URL (string) + @param title feed title (string) @param parent reference to the parent widget (QWidget) """ super().__init__(parent) @@ -58,7 +60,7 @@ self.__setOkButton() @pyqtSlot(str) - def on_urlEdit_textChanged(self, p0): + def on_urlEdit_textChanged(self, txt): """ Private slot to handle changes of the feed URL.
--- a/Helpviewer/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationDialog.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationDialog.py Sat Sep 28 20:07:36 2013 +0200 @@ -29,6 +29,7 @@ """ Constructor + @param manager reference to the manager object (GreaseMonkeyManager) @param parent reference to the parent widget (QWidget) """ super().__init__(parent) @@ -54,6 +55,8 @@ def on_downloadLabel_linkActivated(self, link): """ Private slot to open the userscript.org web site. + + @param link URL (string) """ import Helpviewer.HelpWindow Helpviewer.HelpWindow.HelpWindow.mainWindow().newTab( @@ -64,6 +67,8 @@ def on_scriptsList_itemDoubleClicked(self, item): """ Private slot to show information about the selected script. + + @param item reference to the double clicked item (QListWidgetItem) """ script = self.__getScript(item) if script is not None: @@ -77,7 +82,8 @@ Private method to load all the available scripts. """ for script in self.__manager.allScripts(): - itm = QListWidgetItem(UI.PixmapCache.getIcon("greaseMonkeyScript.png"), + itm = QListWidgetItem( + UI.PixmapCache.getIcon("greaseMonkeyScript.png"), script.name(), self.scriptsList) itm.setData(GreaseMonkeyConfigurationDialog.ScriptVersionRole, script.version())
--- a/Helpviewer/GreaseMonkey/GreaseMonkeyScript.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/GreaseMonkey/GreaseMonkeyScript.py Sat Sep 28 20:07:36 2013 +0200 @@ -168,6 +168,7 @@ """ Public method to check, if the script matches the given URL. + @param urlString URL (string) @return flag indicating a match (boolean) """ if not self.__enabled:
--- a/Helpviewer/GreaseMonkey/GreaseMonkeyUrlMatcher.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/GreaseMonkey/GreaseMonkeyUrlMatcher.py Sat Sep 28 20:07:36 2013 +0200 @@ -18,6 +18,7 @@ @param string string to match (string) @param pattern pattern to be used (string) + @return flag indicating a successful match (boolean) """ stringSize = len(string) @@ -73,6 +74,7 @@ Public method to match the given URL. @param urlString URL to match (string) + @return flag indicating a successful match (boolean) """ if self.__useRegExp: return self.__regExp.indexIn(urlString) != -1
--- a/Helpviewer/HelpBrowserWV.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/HelpBrowserWV.py Sat Sep 28 20:07:36 2013 +0200 @@ -501,6 +501,8 @@ def showSslInfo(self, pos): """ Public slot to show some SSL information for the loaded page. + + @param pos position to show the info at (QPoint) """ if SSL_AVAILABLE and self.__sslConfiguration is not None: from E5Network.E5SslInfoWidget import E5SslInfoWidget @@ -1777,6 +1779,8 @@ def progress(self): """ Public method to get the load progress. + + @return load progress (integer) """ return self.__progress @@ -2085,15 +2089,16 @@ self.__accessKeyLabels.append(label) self.__accessKeyNodes[accessKey] = element - ############################################################################ + ########################################################################### ## Miscellaneous methods below - ############################################################################ + ########################################################################### def createWindow(self, windowType): """ Protected method called, when a new window should be created. @param windowType type of the requested window (QWebPage.WebWindowType) + @return reference to the created browser window (HelpBrowser) """ self.mw.newTab() return self.mw.currentBrowser() @@ -2108,9 +2113,9 @@ self.reload() - ############################################################################ + ########################################################################### ## RSS related methods below - ############################################################################ + ########################################################################### def checkRSS(self): """ @@ -2305,6 +2310,7 @@ """ Module function to do some content sniffing to check, if the data is HTML. + @param data data block to sniff at (string) @return flag indicating HTML content (boolean) """ if data.contains("<!doctype") or \
--- a/Helpviewer/HelpTabBar.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/HelpTabBar.py Sat Sep 28 20:07:36 2013 +0200 @@ -74,7 +74,7 @@ """ Protected method to handle mouse move events. - @param reference to the mouse move event (QMouseEvent) + @param evt reference to the mouse move event (QMouseEvent) """ if self.count() == 1: return
--- a/Helpviewer/HelpWebSearchWidget.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/HelpWebSearchWidget.py Sat Sep 28 20:07:36 2013 +0200 @@ -166,6 +166,7 @@ Private slot handling the highlighting of an entry of the completer. @param index index of the item (QModelIndex) + @return flah indicating a successful highlighting (boolean) """ if self.__suggestionsItem and \ self.__suggestionsItem.index().row() == index.row():
--- a/Helpviewer/History/HistoryCompleter.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/History/HistoryCompleter.py Sat Sep 28 20:07:36 2013 +0200 @@ -55,6 +55,7 @@ Public method to give a size hint for rows. @param row row number (integer) + @return desired row height (integer) """ metrics = self.fontMetrics() return metrics.height() @@ -131,7 +132,7 @@ """ Public method to check the model for validity. - @param flag indicating a valid status (boolean) + @return flag indicating a valid status (boolean) """ return self.__isValid @@ -211,6 +212,9 @@ class HistoryCompleter(QCompleter): + """ + Class implementing a completer for the browser history. + """ def __init__(self, model, parent=None): """ Constructor
--- a/Helpviewer/History/HistoryFilterModel.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/History/HistoryFilterModel.py Sat Sep 28 20:07:36 2013 +0200 @@ -315,7 +315,7 @@ @param row row of the first entry to remove (integer) @param count number of entries to remove (integer) - @param index of the parent entry (QModelIndex) + @param parent index of the parent entry (QModelIndex) @return flag indicating successful removal (boolean) """ if row < 0 or \
--- a/Helpviewer/History/HistoryModel.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/History/HistoryModel.py Sat Sep 28 20:07:36 2013 +0200 @@ -146,7 +146,7 @@ @param row row of the first history entry to remove (integer) @param count number of history entries to remove (integer) - @param index of the parent entry (QModelIndex) + @param parent index of the parent entry (QModelIndex) @return flag indicating successful removal (boolean) """ if parent.isValid():
--- a/Helpviewer/History/HistoryTreeModel.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/History/HistoryTreeModel.py Sat Sep 28 20:07:36 2013 +0200 @@ -297,7 +297,7 @@ @param row row of the first entry to remove (integer) @param count number of entries to remove (integer) - @param index of the parent entry (QModelIndex) + @param parent index of the parent entry (QModelIndex) @return flag indicating successful removal (boolean) """ if row < 0 or \
--- a/Helpviewer/Network/FollowRedirectReply.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Network/FollowRedirectReply.py Sat Sep 28 20:07:36 2013 +0200 @@ -13,7 +13,7 @@ class FollowRedirectReply(QObject): """ - Class implementing a network reply delegate allowing to check redirects + Class implementing a network reply delegate allowing to check redirects. """ finished = pyqtSignal()
--- a/Helpviewer/Network/QtHelpAccessHandler.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Network/QtHelpAccessHandler.py Sat Sep 28 20:07:36 2013 +0200 @@ -71,6 +71,7 @@ Private method to guess the mime type given an URL. @param url URL to guess the mime type from (QUrl) + @return mime type for the given URL (string) """ path = url.path() ext = os.path.splitext(path)[1].lower()
--- a/Helpviewer/Network/SchemeAccessHandler.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Network/SchemeAccessHandler.py Sat Sep 28 20:07:36 2013 +0200 @@ -8,6 +8,7 @@ """ from PyQt4.QtCore import QObject +from PyQt4.QtNetwork import QNetworkReply class SchemeAccessHandler(QObject): @@ -26,10 +27,14 @@ """ Protected method to create a request. - @param op the operation to be performed (QNetworkAccessManager.Operation) + @param op the operation to be performed + (QNetworkAccessManager.Operation) @param request reference to the request object (QNetworkRequest) @param outgoingData reference to an IODevice containing data to be sent (QIODevice) @return reference to the created reply object (QNetworkReply) + @exception NotImplementedError raised to indicate that the method must + be implemented by a subclass """ raise NotImplementedError() + return QNetworkReply()
--- a/Helpviewer/OpenSearch/OpenSearchDialog.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/OpenSearch/OpenSearchDialog.py Sat Sep 28 20:07:36 2013 +0200 @@ -24,6 +24,8 @@ def __init__(self, parent=None): """ Constructor + + @param parent reference to the parent object (QWidget) """ super().__init__(parent) self.setupUi(self)
--- a/Helpviewer/OpenSearch/OpenSearchEditDialog.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/OpenSearch/OpenSearchEditDialog.py Sat Sep 28 20:07:36 2013 +0200 @@ -19,6 +19,9 @@ def __init__(self, engine, parent=None): """ Constructor + + @param engine reference to the search engine (OpenSearchEngine) + @param parent reference to the parent object (QWidget) """ super().__init__(parent) self.setupUi(self)
--- a/Helpviewer/OpenSearch/OpenSearchEngine.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/OpenSearch/OpenSearchEngine.py Sat Sep 28 20:07:36 2013 +0200 @@ -285,7 +285,7 @@ """ Public method to set the engine image URL. - @param description image URL of the engine (string) + @param imageUrl image URL of the engine (string) """ self._imageUrl = imageUrl @@ -293,7 +293,7 @@ """ Public method to set the engine image URL. - @param description image URL of the engine (string) + @param imageUrl image URL of the engine (string) """ self.setImageUrl(imageUrl) self.__iconMoved = False
--- a/Helpviewer/OpenSearch/OpenSearchManager.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/OpenSearch/OpenSearchManager.py Sat Sep 28 20:07:36 2013 +0200 @@ -122,6 +122,7 @@ Public method to check, if an engine exists. @param name name of the engine (string) + @return flag indicating an existing engine (boolean) """ return name in self.__engines
--- a/Helpviewer/OpenSearch/OpenSearchWriter.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/OpenSearch/OpenSearchWriter.py Sat Sep 28 20:07:36 2013 +0200 @@ -28,6 +28,7 @@ @param device reference to the device to write to (QIODevice) @param engine reference to the engine (OpenSearchEngine) + @return flag indicating success (boolean) """ if engine is None: return False
--- a/Helpviewer/Passwords/PasswordWriter.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Passwords/PasswordWriter.py Sat Sep 28 20:07:36 2013 +0200 @@ -31,6 +31,7 @@ @param logins dictionary with login data (user name, password) @param forms list of forms data (list of LoginForm) @param nevers list of URLs to never store data for (list of strings) + @return flag indicating success (boolean) """ if isinstance(fileNameOrDevice, QIODevice): f = fileNameOrDevice
--- a/Helpviewer/QtHelpFiltersDialog.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/QtHelpFiltersDialog.py Sat Sep 28 20:07:36 2013 +0200 @@ -18,7 +18,7 @@ class QtHelpFiltersDialog(QDialog, Ui_QtHelpFiltersDialog): """ - Class implementing a dialog to manage the QtHelp filters + Class implementing a dialog to manage the QtHelp filters. """ def __init__(self, engine, parent=None): """
--- a/Helpviewer/SearchWidget.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/SearchWidget.py Sat Sep 28 20:07:36 2013 +0200 @@ -94,7 +94,9 @@ @pyqtSlot(bool) def on_highlightAllCheckBox_toggled(self, checked): """ - Private slot to toggle the highlight of all occurences. + Private slot to toggle the highlight of all occurrences. + + @param checked flag indicating the check box toggle state (boolean) """ cbr = self.__mainWindow.currentBrowser() if cbr is None:
--- a/Helpviewer/SpeedDial/Page.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/SpeedDial/Page.py Sat Sep 28 20:07:36 2013 +0200 @@ -18,6 +18,7 @@ @param url URL of the page (string) @param title title of the page (string) + @param broken flag indicating a broken connection (boolean) """ self.url = url self.title = title
--- a/Helpviewer/SpeedDial/SpeedDialWriter.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/SpeedDial/SpeedDialWriter.py Sat Sep 28 20:07:36 2013 +0200 @@ -31,6 +31,7 @@ @param pages list of speed dial pages (list of Page) @param pagesPerRow number of pages per row (integer) @param speedDialSize size of the speed dial pages (integer) + @return flag indicating success (boolean) """ if isinstance(fileNameOrDevice, QIODevice): f = fileNameOrDevice
--- a/Helpviewer/Sync/SyncHandler.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/Sync/SyncHandler.py Sat Sep 28 20:07:36 2013 +0200 @@ -117,30 +117,45 @@ def syncBookmarks(self): """ Public method to synchronize the bookmarks. + + @exception NotImplementedError raised to indicate that this method + must be implemented by subclasses """ raise NotImplementedError def syncHistory(self): """ Public method to synchronize the history. + + @exception NotImplementedError raised to indicate that this method + must be implemented by subclasses """ raise NotImplementedError def syncPasswords(self): """ Public method to synchronize the passwords. + + @exception NotImplementedError raised to indicate that this method + must be implemented by subclasses """ raise NotImplementedError def syncUserAgents(self): """ Public method to synchronize the user agents. + + @exception NotImplementedError raised to indicate that this method + must be implemented by subclasses """ raise NotImplementedError def syncSpeedDial(self): """ Public method to synchronize the speed dial data. + + @exception NotImplementedError raised to indicate that this method + must be implemented by subclasses """ raise NotImplementedError @@ -149,12 +164,17 @@ Public method to do the initial check. @keyparam forceUpload flag indicating a forced upload of the files (boolean) + @exception NotImplementedError raised to indicate that this method + must be implemented by subclasses """ raise NotImplementedError def shutdown(self): """ Public method to shut down the handler. + + @exception NotImplementedError raised to indicate that this method + must be implemented by subclasses """ raise NotImplementedError
--- a/Helpviewer/UrlBar/BookmarkActionSelectionDialog.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/UrlBar/BookmarkActionSelectionDialog.py Sat Sep 28 20:07:36 2013 +0200 @@ -4,7 +4,8 @@ # """ -Module implementing a dialog to select the action to be performed on the bookmark. +Module implementing a dialog to select the action to be performed on the +bookmark. """ from PyQt4.QtCore import pyqtSlot @@ -17,7 +18,8 @@ class BookmarkActionSelectionDialog(QDialog, Ui_BookmarkActionSelectionDialog): """ - Class implementing a dialog to select the action to be performed on the bookmark. + Class implementing a dialog to select the action to be performed on + the bookmark. """ Undefined = -1 AddBookmark = 0 @@ -51,7 +53,8 @@ if Helpviewer.HelpWindow.HelpWindow.speedDial().pageForUrl(url).url: self.__sdAction = self.RemoveSpeeddial - self.speeddialPushButton.setText(self.trUtf8("Remove from Speed Dial")) + self.speeddialPushButton.setText( + self.trUtf8("Remove from Speed Dial")) else: self.__sdAction = self.AddSpeeddial self.speeddialPushButton.setText(self.trUtf8("Add to Speed Dial")) @@ -75,5 +78,7 @@ def getAction(self): """ Public method to get the selected action. + + @return reference to the associated action """ return self.__action
--- a/Helpviewer/UrlBar/StackedUrlBar.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/UrlBar/StackedUrlBar.py Sat Sep 28 20:07:36 2013 +0200 @@ -40,6 +40,7 @@ """ Public method to get a reference to the url bar for a given index. + @param index index of the url bar (integer) @return reference to the url bar for the given index (UrlBar) """ return self.widget(index)
--- a/Helpviewer/UrlBar/UrlBar.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/UrlBar/UrlBar.py Sat Sep 28 20:07:36 2013 +0200 @@ -111,7 +111,9 @@ def browser(self): """ - Public method to get the associated browser (HelpBrowser) + Public method to get the associated browser. + + @return reference to the associated browser (HelpBrowser) """ return self.__browser
--- a/Helpviewer/UserAgent/UserAgentWriter.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/UserAgent/UserAgentWriter.py Sat Sep 28 20:07:36 2013 +0200 @@ -28,7 +28,9 @@ @param fileNameOrDevice name of the file to write (string) or device to write to (QIODevice) - @param agents dictionary with user agent data (host as key, agent string as value) + @param agents dictionary with user agent data (host as key, agent + string as value) + @return flag indicating success (boolean) """ if isinstance(fileNameOrDevice, QIODevice): f = fileNameOrDevice @@ -44,7 +46,8 @@ """ Private method to write a user agent file. - @param agents dictionary with user agent data (host as key, agent string as value) + @param agents dictionary with user agent data (host as key, agent + string as value) @return flag indicating success (boolean) """ self.writeStartDocument()
--- a/Helpviewer/VirusTotalApi.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/VirusTotalApi.py Sat Sep 28 20:07:36 2013 +0200 @@ -91,8 +91,6 @@ @param key service key (string) @param protocol protocol used to access VirusTotal (string) - @return flag indicating validity (boolean) and an error message in - case of a network error (string) """ if protocol == "": urlStr = self.GetFileReportUrl @@ -133,7 +131,6 @@ Public method to submit an URL to be scanned. @param url url to be scanned (QUrl) - @return flag indicating success (boolean) and the scan ID (string) """ request = QNetworkRequest(QUrl(self.ScanUrlUrl)) request.setHeader(QNetworkRequest.ContentTypeHeader, @@ -170,7 +167,6 @@ Private method to get the report URL for a file scan. @param scanId ID of the scan to get the report URL for (string) - @return file scan report URL (string) """ request = QNetworkRequest(QUrl(self.GetUrlReportUrl)) request.setHeader(QNetworkRequest.ContentTypeHeader,
--- a/Helpviewer/WebPlugins/ClickToFlash/ClickToFlash.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/WebPlugins/ClickToFlash/ClickToFlash.py Sat Sep 28 20:07:36 2013 +0200 @@ -302,6 +302,7 @@ @param url URL to be checked for (QUrl) @param argumentNames argument names to be checked for (list of strings) @param argumentValues argument values to be checked for (list of strings) + @return flag indicating that this was already accepted (boolean) """ return url == cls._acceptedUrl and \ argumentNames == cls._acceptedArgNames and \
--- a/Helpviewer/WebPlugins/ClickToFlash/ClickToFlashPlugin.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/WebPlugins/ClickToFlash/ClickToFlashPlugin.py Sat Sep 28 20:07:36 2013 +0200 @@ -135,6 +135,8 @@ def isAnonymous(self): """ Public method to indicate an anonymous plug-in. + + @return flag indicating anonymous state (boolean) """ return True
--- a/Helpviewer/WebPlugins/ClickToFlash/ClickToFlashWhitelistDialog.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/WebPlugins/ClickToFlash/ClickToFlashWhitelistDialog.py Sat Sep 28 20:07:36 2013 +0200 @@ -18,7 +18,7 @@ class ClickToFlashWhitelistDialog(QDialog, Ui_ClickToFlashWhitelistDialog): """ - Class implementing a dialog to manage the ClickToFlash whitelist + Class implementing a dialog to manage the ClickToFlash whitelist. """ def __init__(self, whitelist, parent=None): """
--- a/Helpviewer/WebPlugins/WebPluginFactory.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/WebPlugins/WebPluginFactory.py Sat Sep 28 20:07:36 2013 +0200 @@ -87,6 +87,7 @@ Public method to get a reference to the named plug-in. @param name name of the plug-in (string) + @return reference to the named plug-in """ if not self.__loaded: self.__initialize()
--- a/Helpviewer/WebPlugins/WebPluginInterface.py Sat Sep 28 19:06:25 2013 +0200 +++ b/Helpviewer/WebPlugins/WebPluginInterface.py Sat Sep 28 20:07:36 2013 +0200 @@ -7,6 +7,9 @@ Module implementing the web plug-in interface. """ +from PyQt4.QtGui import QWidget +from PyQt4.QtWebKit import QWebPluginFactory + class WebPluginInterface(object): """ @@ -17,8 +20,11 @@ Public method to create a meta plug-in object containing plug-in info. @return meta plug-in object (QWebPluginFactory.Plugin) + @exception NotImplementedError raised to indicate that this method + must be implemented by subclasses """ raise NotImplementedError + return QWebPluginFactory.Plugin() def create(self, mimeType, url, argumentNames, argumentValues): """ @@ -29,17 +35,25 @@ @param argumentNames list of argument names (list of strings) @param argumentValues list of argument values (list of strings) @return reference to the created object (QWidget) + @exception NotImplementedError raised to indicate that this method + must be implemented by subclasses """ raise NotImplementedError + return QWidget() def configure(self): """ Public method to configure the plug-in. + + @exception NotImplementedError raised to indicate that this method + must be implemented by subclasses """ raise NotImplementedError def isAnonymous(self): """ Public method to indicate an anonymous plug-in. + + @return flag indicating anonymous state (boolean) """ return False