Commits

Yuya Nishihara committed 2a801eb Merge

Merge with stable

  • Participants
  • Parent commits 0714d3c, d77dede

Comments (0)

Files changed (2)

File tortoisehg/hgqt/settings.py

         else:
             settings = opts['settings']
             slist = settings.value('settings/'+opts['cpath']).toStringList()
-            self.previous = [s for s in slist if s]
+            self.previous = [unicode(s) for s in slist if s]
         self.setMinimumWidth(ENTRY_WIDTH)
 
     def resetList(self):
         self.resetList()
 
     def value(self):
-        utext = self.currentText()
+        utext = unicode(self.currentText())
         if utext == _unspecstr:
             return None
         if ('nohist' in self.opts or utext in self.defaults + self.previous

File tortoisehg/hgqt/workbench.py

         if w:
             qtlib.openshell(w.repo.root, w.repo.displayname, w.repo.ui)
 
-    @pyqtSlot()
-    def editSettings(self, focus=None):
+    # no @pyqtSlot() to avoid wrong self.sender() at _updateRepoTabTitle
+    # on repositoryChanged signal in 'Restart all TortoiseHg applications'
+    # message box of SettingsDialog.  See #3393.
+    def editSettings(self):
+        self._editSettings(None)
+
+    def _editSettings(self, focus):
         tw = self.repoTabsWidget
         w = tw.currentWidget()
         twrepo = (w and w.repo.root or '')
                             parent=self, root=twrepo)
         sd.exec_()
 
-    @pyqtSlot()
+    # no @pyqtSlot() to avoid segfault or "python: malloc.c: int_free:
+    # Assertion `nextchunk->bk_nextsize->fd_nextsizewrong == nextchunk"
+    # failure at exit, which is probably due to repositoryChanged signal in
+    # 'Restart all TortoiseHg applications' message box of SettingsDialog.
     def _editCustomToolsSettings(self):
-        self.editSettings('tools')
+        self._editSettings('tools')