Changed some signal handlings (disconnect).

Mon, 07 Jan 2013 16:34:02 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 07 Jan 2013 16:34:02 +0100
changeset 2318
3a3ee7cc2ad6
parent 2317
ac7ffbf5b36b
child 2319
116c547dedce

Changed some signal handlings (disconnect).

Debugger/DebugServer.py file | annotate | diff | comparison | revisions
Helpviewer/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationDialog.py file | annotate | diff | comparison | revisions
Helpviewer/Network/FollowRedirectReply.py file | annotate | diff | comparison | revisions
Helpviewer/OpenSearch/OpenSearchEngine.py file | annotate | diff | comparison | revisions
Helpviewer/SpeedDial/SpeedDial.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/HgClient.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/hg.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsPySvn/subversion.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsSubversion/subversion.py file | annotate | diff | comparison | revisions
Project/Project.py file | annotate | diff | comparison | revisions
VCS/StatusMonitorThread.py file | annotate | diff | comparison | revisions
--- a/Debugger/DebugServer.py	Mon Jan 07 15:34:36 2013 +0100
+++ b/Debugger/DebugServer.py	Mon Jan 07 16:34:02 2013 +0100
@@ -358,13 +358,14 @@
         # only start the client, if we are not in passive mode
         if not self.passive:
             if self.clientProcess:
-                self.clientProcess.readyReadStandardError.disconnect(
-                    self.__clientProcessError)
-                self.clientProcess.readyReadStandardOutput.disconnect(
-                    self.__clientProcessOutput)
+##                self.clientProcess.readyReadStandardError.disconnect(
+##                    self.__clientProcessError)
+##                self.clientProcess.readyReadStandardOutput.disconnect(
+##                    self.__clientProcessOutput)
                 self.clientProcess.close()
                 self.clientProcess.kill()
                 self.clientProcess.waitForFinished(10000)
+                self.clientProcess.deleteLater()
                 self.clientProcess = None
             
             self.__createDebuggerInterface()
--- a/Helpviewer/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationDialog.py	Mon Jan 07 15:34:36 2013 +0100
+++ b/Helpviewer/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationDialog.py	Mon Jan 07 16:34:02 2013 +0100
@@ -46,6 +46,7 @@
         self.__loadScripts()
         
         self.scriptsList.removeItemRequested.connect(self.__removeItem)
+        self.scriptsList.itemChanged.connect(self.__itemChanged)
     
     @pyqtSlot()
     def on_openDirectoryButton_clicked(self):
@@ -77,12 +78,6 @@
         """
         Private method to load all the available scripts.
         """
-        try:
-            self.scriptsList.itemChanged.disconnect(self.__itemChanged)
-        except TypeError:
-            # it isn't connected yet
-            pass
-        
         for script in self.__manager.allScripts():
             itm = QListWidgetItem(UI.PixmapCache.getIcon("greaseMonkeyScript.png"),
                 script.name(), self.scriptsList)
@@ -114,8 +109,6 @@
                     itm = self.scriptsList.takeItem(row + 1)
                     self.scriptsList.insertItem(row, itm)
                     itemMoved = True
-        
-        self.scriptsList.itemChanged.connect(self.__itemChanged)
     
     def __getScript(self, itm):
         """
--- a/Helpviewer/Network/FollowRedirectReply.py	Mon Jan 07 15:34:36 2013 +0100
+++ b/Helpviewer/Network/FollowRedirectReply.py	Mon Jan 07 16:34:02 2013 +0100
@@ -102,7 +102,9 @@
         
         redirectUrl = self.__reply.attribute(QNetworkRequest.RedirectionTargetAttribute)
         self.__reply.close()
-        self.__reply.finished[()].disconnect(self.__replyFinished)
+##        self.__reply.finished[()].disconnect(self.__replyFinished)
+        self.__reply.deleteLater()
+        self.__reply = None
         
         self.__reply = self.__manager.get(QNetworkRequest(redirectUrl))
         self.__reply.finished[()].connect(self.__replyFinished)
--- a/Helpviewer/OpenSearch/OpenSearchEngine.py	Mon Jan 07 15:34:36 2013 +0100
+++ b/Helpviewer/OpenSearch/OpenSearchEngine.py	Mon Jan 07 16:34:02 2013 +0100
@@ -414,8 +414,9 @@
             return
         
         if self.__suggestionsReply is not None:
-            self.__suggestionsReply.finished[()].disconnect(self.__suggestionsObtained)
+##            self.__suggestionsReply.finished[()].disconnect(self.__suggestionsObtained)
             self.__suggestionsReply.abort()
+            self.__suggestionsReply.deleteLater()
             self.__suggestionsReply = None
         
         if self.__suggestionsMethod not in self.__requestMethods:
--- a/Helpviewer/SpeedDial/SpeedDial.py	Mon Jan 07 15:34:36 2013 +0100
+++ b/Helpviewer/SpeedDial/SpeedDial.py	Mon Jan 07 16:34:02 2013 +0100
@@ -384,7 +384,8 @@
                 frame.evaluateJavaScript("setTitleToUrl('{0}', '{1}');".format(
                                          url, title))
         
-        thumbnailer.thumbnailCreated.disconnect(self.__thumbnailCreated)
+##        thumbnailer.thumbnailCreated.disconnect(self.__thumbnailCreated)
+        thumbnailer.deleteLater()
         self.__thumbnailers.remove(thumbnailer)
     
     def __cleanFrames(self):
--- a/Plugins/VcsPlugins/vcsMercurial/HgClient.py	Mon Jan 07 15:34:36 2013 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/HgClient.py	Mon Jan 07 16:34:02 2013 +0100
@@ -109,7 +109,8 @@
                     self.__server.waitForFinished(3000)
             
             self.__started = False
-            self.__server.finished.disconnect(self.__serverFinished)
+##            self.__server.finished.disconnect(self.__serverFinished)
+            self.__server.deleteLater()
             self.__server = None
     
     def restartServer(self):
--- a/Plugins/VcsPlugins/vcsMercurial/hg.py	Mon Jan 07 15:34:36 2013 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/hg.py	Mon Jan 07 16:34:02 2013 +0100
@@ -466,7 +466,8 @@
             msg = self.__commitDialog.logMessage()
             amend = self.__commitDialog.amend()
             commitSubrepositories = self.__commitDialog.commitSubrepositories()
-            self.__commitDialog.accepted.disconnect(self.__vcsCommit_Step2)
+##            self.__commitDialog.accepted.disconnect(self.__vcsCommit_Step2)
+            self.__commitDialog.deleteLater()
             self.__commitDialog = None
         else:
             amend = False
--- a/Plugins/VcsPlugins/vcsPySvn/subversion.py	Mon Jan 07 15:34:36 2013 +0100
+++ b/Plugins/VcsPlugins/vcsPySvn/subversion.py	Mon Jan 07 16:34:02 2013 +0100
@@ -532,7 +532,8 @@
                 changelists, keepChangelists = self.__commitDialog.changelistsData()
             else:
                 changelists, keepChangelists = [], False
-            self.__commitDialog.accepted.disconnect(self.__vcsCommit_Step2)
+##            self.__commitDialog.accepted.disconnect(self.__vcsCommit_Step2)
+            self.__commitDialog.deleteLater()
             self.__commitDialog = None
         else:
             changelists, keepChangelists = [], False
--- a/Plugins/VcsPlugins/vcsSubversion/subversion.py	Mon Jan 07 15:34:36 2013 +0100
+++ b/Plugins/VcsPlugins/vcsSubversion/subversion.py	Mon Jan 07 16:34:02 2013 +0100
@@ -502,7 +502,8 @@
                 changelists, keepChangelists = self.__commitDialog.changelistsData()
             else:
                 changelists, keepChangelists = [], False
-            self.__commitDialog.accepted.disconnect(self.__vcsCommit_Step2)
+##            self.__commitDialog.accepted.disconnect(self.__vcsCommit_Step2)
+            self.__commitDialog.deleteLater()
             self.__commitDialog = None
         else:
             changelists, keepChangelists = [], False
--- a/Project/Project.py	Mon Jan 07 15:34:36 2013 +0100
+++ b/Project/Project.py	Mon Jan 07 16:34:02 2013 +0100
@@ -2251,9 +2251,10 @@
                 # stop the VCS monitor thread and shutdown VCS
                 if self.vcs is not None:
                     self.vcs.stopStatusMonitor()
-                    self.vcs.vcsStatusMonitorData.disconnect(self.__model.changeVCSStates)
-                    self.vcs.vcsStatusMonitorStatus.disconnect(self.__statusMonitorStatus)
+##                    self.vcs.vcsStatusMonitorData.disconnect(self.__model.changeVCSStates)
+##                    self.vcs.vcsStatusMonitorStatus.disconnect(self.__statusMonitorStatus)
                     self.vcs.vcsShutdown()
+                    self.vcs.deleteLater()
                     self.vcs = None
                     e5App().getObject("PluginManager").deactivateVcsPlugins()
                 # reinit VCS
@@ -2614,16 +2615,16 @@
         # stop the VCS monitor thread
         if self.vcs is not None:
             self.vcs.stopStatusMonitor()
-            try:
-                self.vcs.vcsStatusMonitorData.disconnect(
-                    self.__model.changeVCSStates)
-            except TypeError:
-                pass
-            try:
-                self.vcs.vcsStatusMonitorStatus.disconnect(
-                    self.__statusMonitorStatus)
-            except TypeError:
-                pass
+##            try:
+##                self.vcs.vcsStatusMonitorData.disconnect(
+##                    self.__model.changeVCSStates)
+##            except TypeError:
+##                pass
+##            try:
+##                self.vcs.vcsStatusMonitorStatus.disconnect(
+##                    self.__statusMonitorStatus)
+##            except TypeError:
+##                pass
         
         # now save the tasks
         if not noSave:
@@ -2634,6 +2635,7 @@
         # now shutdown the vcs interface
         if self.vcs:
             self.vcs.vcsShutdown()
+            self.vcs.deleteLater()
             self.vcs = None
             e5App().getObject("PluginManager").deactivateVcsPlugins()
         
--- a/VCS/StatusMonitorThread.py	Mon Jan 07 15:34:36 2013 +0100
+++ b/VCS/StatusMonitorThread.py	Mon Jan 07 16:34:02 2013 +0100
@@ -81,11 +81,8 @@
                     "timeout", self.trUtf8("Timed out waiting for lock"))
             
             if self.autoUpdate and self.shouldUpdate:
-                try:
-                    self.vcs.vcsUpdate(self.projectDir, True)
-                    continue    # check again
-                except TypeError:
-                    pass    # compatibility for older VCS plugins
+                self.vcs.vcsUpdate(self.projectDir, True)
+                continue    # check again
                 self.shouldUpdate = False
             
             # wait until interval has expired checking for a stop condition

eric ide

mercurial