Continued porting signal/slot usage to the new API.

Tue, 10 Aug 2010 14:17:54 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 10 Aug 2010 14:17:54 +0200
changeset 482
4650a72c307a
parent 481
ad71812ba395
child 483
ca7d8599a575

Continued porting signal/slot usage to the new API.

Debugger/DebugServer.py file | annotate | diff | comparison | revisions
Debugger/DebugUI.py file | annotate | diff | comparison | revisions
Debugger/DebugViewer.py file | annotate | diff | comparison | revisions
Debugger/DebuggerInterfacePython.py file | annotate | diff | comparison | revisions
Debugger/DebuggerInterfacePython3.py file | annotate | diff | comparison | revisions
Debugger/DebuggerInterfaceRuby.py file | annotate | diff | comparison | revisions
Debugger/EditWatchpointDialog.py file | annotate | diff | comparison | revisions
Debugger/ExceptionLogger.py file | annotate | diff | comparison | revisions
Debugger/VariablesViewer.py file | annotate | diff | comparison | revisions
E5Gui/E5ModelMenu.py file | annotate | diff | comparison | revisions
E5Gui/E5ModelToolBar.py file | annotate | diff | comparison | revisions
E5Gui/E5SideBar.py file | annotate | diff | comparison | revisions
E5Gui/E5TabWidget.py file | annotate | diff | comparison | revisions
E5Gui/E5ToolBarDialog.py file | annotate | diff | comparison | revisions
E5Network/E5NetworkMonitor.py file | annotate | diff | comparison | revisions
Helpviewer/HelpIndexWidget.py file | annotate | diff | comparison | revisions
Helpviewer/SearchWidget.py file | annotate | diff | comparison | revisions
QScintilla/SearchReplaceWidget.py file | annotate | diff | comparison | revisions
QScintilla/Shell.py file | annotate | diff | comparison | revisions
UI/UserInterface.py file | annotate | diff | comparison | revisions
ViewManager/ViewManager.py file | annotate | diff | comparison | revisions
--- a/Debugger/DebugServer.py	Tue Aug 10 13:15:03 2010 +0200
+++ b/Debugger/DebugServer.py	Tue Aug 10 14:17:54 2010 +0200
@@ -116,7 +116,7 @@
     utStartTest = pyqtSignal(str, str)
     utStopTest = pyqtSignal()
     utTestFailed = pyqtSignal(str, str)
-    utTestFailed = pyqtSignal(str, str)
+    utTestErrored = pyqtSignal(str, str)
     utFinished = pyqtSignal()
     passiveDebugStarted = pyqtSignal(str, bool)
     
--- a/Debugger/DebugUI.py	Tue Aug 10 13:15:03 2010 +0200
+++ b/Debugger/DebugUI.py	Tue Aug 10 14:17:54 2010 +0200
@@ -41,6 +41,11 @@
         exception and acknowledged by the user
     """
     clientStack = pyqtSignal(list)
+    resetUI = pyqtSignal()
+    exceptionInterrupt = pyqtSignal()
+    compileForms = pyqtSignal()
+    compileResources = pyqtSignal()
+    debuggingStarted = pyqtSignal(str)
     
     def __init__(self, ui, vm, debugServer, debugViewer, project):
         """
@@ -565,8 +570,7 @@
         dmenu.addAction(self.excIgnoreFilterAct)
         
         self.breakpointsMenu.aboutToShow.connect(self.__showBreakpointsMenu)
-        self.connect(self.breakpointsMenu, SIGNAL('triggered(QAction *)'),
-            self.__breakpointSelected)
+        self.breakpointsMenu.triggered.connect(self.__breakpointSelected)
         dmenu.aboutToShow.connect(self.__showDebugMenu)
         
         return smenu, dmenu
@@ -916,7 +920,7 @@
             else:
                 self.restartAct.setEnabled(False)
             self.stopAct.setEnabled(False)
-        self.emit(SIGNAL('resetUI'))
+        self.resetUI.emit()
         
     def __clientLine(self, fn, line, forStack):
         """
@@ -1035,7 +1039,7 @@
                             .format(exceptionType, 
                                     Utilities.html_encode(exceptionMessage)))
             if res == QMessageBox.Yes:
-                self.emit(SIGNAL('exceptionInterrupt'))
+                self.exceptionInterrupt.emit()
                 stack = []
                 for fn, ln in stackTrace:
                     stack.append((fn, ln, ''))
@@ -1312,9 +1316,9 @@
         is wanted.
         """
         if Preferences.getProject("AutoCompileForms"):
-            self.emit(SIGNAL('compileForms'))
+            self.compileForms.emit()
         if Preferences.getProject("AutoCompileResources"):
-            self.emit(SIGNAL('compileResources'))
+            self.compileResources.emit()
         QApplication.processEvents()
         
     def __coverageScript(self):
@@ -1748,7 +1752,7 @@
                     forkChild = forkIntoChild)
                 
                 # Signal that we have started a debugging session
-                self.emit(SIGNAL('debuggingStarted'), fn)
+                self.debuggingStarted.emit(fn)
                 
                 self.stopAct.setEnabled(True)
         
@@ -1799,7 +1803,7 @@
                     forkChild = self.forkIntoChild)
                 
                 # Signal that we have started a debugging session
-                self.emit(SIGNAL('debuggingStarted'), fn)
+                self.debuggingStarted.emit(fn)
             
             elif self.lastStartAction in [3, 4]:
                 # Ask the client to run the new program.
@@ -1845,7 +1849,7 @@
         self.setExceptionReporting(exc)
         
         # Signal that we have started a debugging session
-        self.emit(SIGNAL('debuggingStarted'), fn)
+        self.debuggingStarted.emit(fn)
         
     def __continue(self):
         """
--- a/Debugger/DebugViewer.py	Tue Aug 10 13:15:03 2010 +0200
+++ b/Debugger/DebugViewer.py	Tue Aug 10 14:17:54 2010 +0200
@@ -128,8 +128,7 @@
         self.__tabWidget.setTabToolTip(index, self.globalsViewer.windowTitle())
         
         self.setGlobalsFilterButton.clicked[()].connect(self.__setGlobalsFilter)
-        self.connect(self.globalsFilterEdit, SIGNAL('returnPressed()'),
-                     self.__setGlobalsFilter)
+        self.globalsFilterEdit.returnPressed.connect(self.__setGlobalsFilter)
         
         # add the local variables viewer
         self.lvWidget = QWidget()
@@ -176,11 +175,9 @@
         self.__tabWidget.setTabToolTip(index, self.localsViewer.windowTitle())
         
         self.sourceButton.clicked[()].connect(self.__showSource)
-        self.connect(self.stackComboBox, SIGNAL('activated(int)'), 
-                     self.__frameSelected)
+        self.stackComboBox.activated[int].connect(self.__frameSelected)
         self.setLocalsFilterButton.clicked[()].connect(self.__setLocalsFilter)
-        self.connect(self.localsFilterEdit, SIGNAL('returnPressed()'),
-                     self.__setLocalsFilter)
+        self.localsFilterEdit.returnPressed.connect(self.__setLocalsFilter)
         
         # add the breakpoint viewer
         self.breakpointViewer = BreakPointViewer()
@@ -221,9 +218,7 @@
         
         self.__doThreadListUpdate = True
         
-        self.connect(self.__threadList, 
-                     SIGNAL('currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)'), 
-                     self.__threadSelected)
+        self.__threadList.currentItemChanged.connect(self.__threadSelected)
         
         self.__mainLayout.setStretchFactor(self.__tabWidget, 5)
         self.__mainLayout.setStretchFactor(self.__threadList, 1)
--- a/Debugger/DebuggerInterfacePython.py	Tue Aug 10 13:15:03 2010 +0200
+++ b/Debugger/DebuggerInterfacePython.py	Tue Aug 10 14:17:54 2010 +0200
@@ -383,8 +383,7 @@
             return
         
         # do not want any slots called during shutdown
-        self.disconnect(self.qsock, SIGNAL('disconnected()'), 
-            self.debugServer.startClient)
+        self.qsock.disconnected.disconnect(self.debugServer.startClient)
         self.qsock.readyRead[()].disconnect(self.__parseClientLine)
         
         # close down socket, and shut down client as well.
@@ -945,4 +944,4 @@
         if self.qsock is not None:
             self.qsock.write(cmd.encode('utf8'))
         else:
-            self.queue.append(cmd)
\ No newline at end of file
+            self.queue.append(cmd)
--- a/Debugger/DebuggerInterfacePython3.py	Tue Aug 10 13:15:03 2010 +0200
+++ b/Debugger/DebuggerInterfacePython3.py	Tue Aug 10 14:17:54 2010 +0200
@@ -382,8 +382,7 @@
             return
         
         # do not want any slots called during shutdown
-        self.disconnect(self.qsock, SIGNAL('disconnected()'), 
-            self.debugServer.startClient)
+        self.qsock.disconnected.disconnect(self.debugServer.startClient)
         self.qsock.readyRead[()].disconnect(self.__parseClientLine)
         
         # close down socket, and shut down client as well.
@@ -944,4 +943,4 @@
         if self.qsock is not None:
             self.qsock.write(cmd.encode('utf8', 'backslashreplace'))
         else:
-            self.queue.append(cmd)
\ No newline at end of file
+            self.queue.append(cmd)
--- a/Debugger/DebuggerInterfaceRuby.py	Tue Aug 10 13:15:03 2010 +0200
+++ b/Debugger/DebuggerInterfaceRuby.py	Tue Aug 10 14:17:54 2010 +0200
@@ -359,8 +359,7 @@
             return
         
         # do not want any slots called during shutdown
-        self.disconnect(self.qsock, SIGNAL('disconnected()'), 
-            self.debugServer.startClient)
+        self.qsock.disconnected.disconnect(self.debugServer.startClient)
         self.qsock.readyRead[()].disconnect(self.__parseClientLine)
         
         # close down socket, and shut down client as well.
@@ -835,4 +834,4 @@
         if self.qsock is not None:
             self.qsock.write(cmd.encode('utf8'))
         else:
-            self.queue.append(cmd)
\ No newline at end of file
+            self.queue.append(cmd)
--- a/Debugger/EditWatchpointDialog.py	Tue Aug 10 13:15:03 2010 +0200
+++ b/Debugger/EditWatchpointDialog.py	Tue Aug 10 14:17:54 2010 +0200
@@ -36,10 +36,8 @@
         self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False)
         
         # connect our widgets
-        self.connect(self.conditionEdit, SIGNAL("textChanged(const QString &)"),
-            self.__textChanged)
-        self.connect(self.specialEdit, SIGNAL("textChanged(const QString &)"),
-            self.__textChanged)
+        self.conditionEdit.textChanged.connect(self.__textChanged)
+        self.specialEdit.textChanged.connect(self.__textChanged)
         
         cond, temp, enabled, count, special = properties
         
--- a/Debugger/ExceptionLogger.py	Tue Aug 10 13:15:03 2010 +0200
+++ b/Debugger/ExceptionLogger.py	Tue Aug 10 14:17:54 2010 +0200
@@ -42,8 +42,7 @@
 
         self.setContextMenuPolicy(Qt.CustomContextMenu)
         self.customContextMenuRequested.connect(self.__showContextMenu)
-        self.connect(self,SIGNAL('itemDoubleClicked(QTreeWidgetItem *, int)'),
-                     self.__itemDoubleClicked)
+        self.itemDoubleClicked.connect(self.__itemDoubleClicked)
 
         self.setWhatsThis(self.trUtf8(
             """<b>Exceptions Logger</b>"""
--- a/Debugger/VariablesViewer.py	Tue Aug 10 13:15:03 2010 +0200
+++ b/Debugger/VariablesViewer.py	Tue Aug 10 14:17:54 2010 +0200
@@ -310,10 +310,8 @@
         self.setContextMenuPolicy(Qt.CustomContextMenu)
         self.customContextMenuRequested.connect(self.__showContextMenu)
         
-        self.connect(self, SIGNAL("itemExpanded(QTreeWidgetItem *)"), 
-            self.__expandItemSignal)
-        self.connect(self, SIGNAL("itemCollapsed(QTreeWidgetItem *)"), 
-            self.collapseItem)
+        self.itemExpanded.connect(self.__expandItemSignal)
+        self.itemCollapsed.connect(self.collapseItem)
         
         self.resortEnabled = True
         
--- a/E5Gui/E5ModelMenu.py	Tue Aug 10 13:15:03 2010 +0200
+++ b/E5Gui/E5ModelMenu.py	Tue Aug 10 14:17:54 2010 +0200
@@ -16,8 +16,10 @@
     """
     Class implementing a menu populated from a QAbstractItemModel.
     
-    @signal activated(const QModelIndex&) emitted when an action has been triggered
+    @signal activated(QModelIndex) emitted when an action has been triggered
     """
+    activated = pyqtSignal(QModelIndex)
+    
     def __init__(self, parent = None):
         """
         Constructor
@@ -43,7 +45,7 @@
         self.__dropIndex = None
         
         self.aboutToShow.connect(self.__aboutToShow)
-        self.connect(self, SIGNAL("triggered(QAction*)"), self.__actionTriggered)
+        self.triggered.connect(self.__actionTriggered)
     
     def prePopulated(self):
         """
@@ -192,8 +194,7 @@
             title = parent.data()
             modelMenu = self.createBaseMenu()
             # triggered goes all the way up the menu structure
-            self.disconnect(modelMenu, SIGNAL("triggered(QAction*)"), 
-                            modelMenu.__actionTriggered)
+            modelMenu.triggered.disconnect(modelMenu.__actionTriggered)
             modelMenu.setTitle(title)
             
             icon = parent.data(Qt.DecorationRole)
@@ -268,7 +269,7 @@
         """
         idx = self.index(action)
         if idx.isValid():
-            self.emit(SIGNAL("activated(const QModelIndex&)"), idx)
+            self.activated[QModelIndex].emit(idx)
     
     def index(self, action):
         """
--- a/E5Gui/E5ModelToolBar.py	Tue Aug 10 13:15:03 2010 +0200
+++ b/E5Gui/E5ModelToolBar.py	Tue Aug 10 14:17:54 2010 +0200
@@ -15,7 +15,11 @@
 class E5ModelToolBar(QToolBar):
     """
     Class implementing a tool bar populated from a QAbstractItemModel.
+    
+    @signal activated(QModelIndex) emitted when an action has been triggered
     """
+    activated = pyqtSignal(QModelIndex)
+    
     def __init__(self, title = None, parent = None):
         """
         Constructor
@@ -50,34 +54,18 @@
         @param model reference to the model (QAbstractItemModel)
         """
         if self.__model is not None:
-            self.disconnect(self.__model, 
-                            SIGNAL("modelReset()"), 
-                            self._build)
-            self.disconnect(self.__model, 
-                            SIGNAL("rowsInserted(const QModelIndex&, int, int)"), 
-                            self._build)
-            self.disconnect(self.__model, 
-                            SIGNAL("rowsRemoved(const QModelIndex&, int, int)"), 
-                            self._build)
-            self.disconnect(self.__model, 
-                            SIGNAL("dataChanged(const QModelIndex&, const QModelIndex&)"),
-                            self._build)
+            self.__model.modelReset[()].disconnect(self._build)
+            self.__model.rowsInserted[QModelIndex, int, int].disconnect(self._build)
+            self.__model.rowsRemoved[QModelIndex, int, int].disconnect(self._build)
+            self.__model.dataChanged[QModelIndex, QModelIndex].disconnect(self._build)
         
         self.__model = model
         
         if self.__model is not None:
-            self.connect(self.__model, 
-                         SIGNAL("modelReset()"), 
-                         self._build)
-            self.connect(self.__model, 
-                         SIGNAL("rowsInserted(const QModelIndex&, int, int)"), 
-                         self._build)
-            self.connect(self.__model, 
-                         SIGNAL("rowsRemoved(const QModelIndex&, int, int)"), 
-                         self._build)
-            self.connect(self.__model, 
-                         SIGNAL("dataChanged(const QModelIndex&, const QModelIndex&)"), 
-                         self._build)
+            self.__model.modelReset[()].connect(self._build)
+            self.__model.rowsInserted[QModelIndex, int, int].connect(self._build)
+            self.__model.rowsRemoved[QModelIndex, int, int].connect(self._build)
+            self.__model.dataChanged[QModelIndex, QModelIndex].connect(self._build)
     
     def model(self):
         """
@@ -176,7 +164,7 @@
             act = obj.defaultAction()
             idx = self.index(act)
             if idx.isValid():
-                self.emit(SIGNAL("activated(const QModelIndex&)"), idx)
+                self.activated[QModelIndex].emit(idx)
         elif evt.type() == QEvent.MouseButtonPress:
             if evt.buttons() & Qt.LeftButton:
                 self.__dragStartPosition = self.mapFromGlobal(evt.globalPos())
@@ -286,4 +274,4 @@
         Public method to reset the saved internal state.
         """
         self._mouseButton = Qt.NoButton
-        self._keyboardModifiers = Qt.KeyboardModifiers(Qt.NoModifier)
\ No newline at end of file
+        self._keyboardModifiers = Qt.KeyboardModifiers(Qt.NoModifier)
--- a/E5Gui/E5SideBar.py	Tue Aug 10 13:15:03 2010 +0200
+++ b/E5Gui/E5SideBar.py	Tue Aug 10 14:17:54 2010 +0200
@@ -7,8 +7,7 @@
 Module implementing a sidebar class.
 """
 
-from PyQt4.QtCore import SIGNAL,  SLOT, QEvent, QSize, Qt, QByteArray, \
-                         QDataStream, QIODevice
+from PyQt4.QtCore import QEvent, QSize, Qt, QByteArray, QDataStream, QIODevice
 from PyQt4.QtGui import QTabBar, QWidget, QStackedWidget, QBoxLayout, QToolButton
 
 from E5Gui.E5Application import e5App
@@ -76,12 +75,9 @@
             orientation = E5SideBar.North
         self.setOrientation(orientation)
         
-        self.connect(self.__tabBar, SIGNAL("currentChanged(int)"), 
-                     self.__stackedWidget, SLOT("setCurrentIndex(int)"))
-        self.connect(e5App(), SIGNAL("focusChanged(QWidget*, QWidget*)"), 
-                     self.__appFocusChanged)
-        self.connect(self.__autoHideButton, SIGNAL("toggled(bool)"), 
-                     self.__autoHideToggled)
+        self.__tabBar.currentChanged[int].connect(self.__stackedWidget.setCurrentIndex)
+        e5App().focusChanged[QWidget, QWidget].connect(self.__appFocusChanged)
+        self.__autoHideButton.toggled[bool].connect(self.__autoHideToggled)
     
     def setSplitter(self, splitter):
         """
--- a/E5Gui/E5TabWidget.py	Tue Aug 10 13:15:03 2010 +0200
+++ b/E5Gui/E5TabWidget.py	Tue Aug 10 14:17:54 2010 +0200
@@ -8,7 +8,7 @@
 """
 
 from PyQt4.QtGui import QTabWidget, QTabBar, QApplication, QDrag, QStyle, QLabel, QMovie
-from PyQt4.QtCore import Qt, SIGNAL, QPoint, QMimeData, QByteArray, pyqtSignal
+from PyQt4.QtCore import Qt, QPoint, QMimeData, QByteArray, pyqtSignal
 
 class E5WheelTabBar(QTabBar):
     """
@@ -46,6 +46,8 @@
     @signal tabMoveRequested(int, int) emitted to signal a tab move request giving
         the old and new index position
     """
+    tabMoveRequested = pyqtSignal(int, int)
+    
     def __init__(self, parent = None):
         """
         Constructor
@@ -110,7 +112,7 @@
         fromIndex = self.tabAt(self.__dragStartPos)
         toIndex = self.tabAt(event.pos())
         if fromIndex != toIndex:
-            self.emit(SIGNAL("tabMoveRequested(int, int)"), fromIndex, toIndex)
+            self.tabMoveRequested.emit(fromIndex, toIndex)
             event.acceptProposedAction()
         E5WheelTabBar.dropEvent(self, event)
 
@@ -138,8 +140,7 @@
         if dnd:
             if not hasattr(self, 'setMovable'):
                 self.__tabBar = E5DnDTabBar(self)
-                self.connect(self.__tabBar, SIGNAL("tabMoveRequested(int, int)"), 
-                             self.moveTab)
+                self.__tabBar.tabMoveRequested.connect(self.moveTab)
                 self.setTabBar(self.__tabBar)
             else:
                 self.__tabBar = E5WheelTabBar(self)
@@ -151,7 +152,7 @@
         
         self.__lastCurrentIndex = -1
         self.__currentIndex = -1
-        self.connect(self, SIGNAL("currentChanged(int)"), self.__currentChanged)
+        self.currentChanged.connect(self.__currentChanged)
     
     def __currentChanged(self, index):
         """
--- a/E5Gui/E5ToolBarDialog.py	Tue Aug 10 13:15:03 2010 +0200
+++ b/E5Gui/E5ToolBarDialog.py	Tue Aug 10 14:17:54 2010 +0200
@@ -109,7 +109,7 @@
                     QColor(Qt.darkGreen), Qt.ForegroundRole)
         self.toolbarComboBox.model().sort(0)
         
-        self.connect(self.toolbarComboBox, SIGNAL("currentIndexChanged(int)"), 
+        self.toolbarComboBox.currentIndexChanged[int].connect(
             self.__toolbarComboBox_currentIndexChanged)
         self.toolbarComboBox.setCurrentIndex(0)
     
--- a/E5Network/E5NetworkMonitor.py	Tue Aug 10 13:15:03 2010 +0200
+++ b/E5Network/E5NetworkMonitor.py	Tue Aug 10 14:17:54 2010 +0200
@@ -95,8 +95,7 @@
         
         self.__proxyModel = QSortFilterProxyModel(self)
         self.__proxyModel.setFilterKeyColumn(-1)
-        self.connect(self.searchEdit, SIGNAL("textChanged(QString)"), 
-                     self.__proxyModel.setFilterFixedString)
+        self.searchEdit.textChanged.connect(self.__proxyModel.setFilterFixedString)
         
         self.removeButton.clicked[()].connect(self.requestsList.removeSelected)
         self.removeAllButton.clicked[()].connect(self.requestsList.removeAll)
@@ -104,9 +103,8 @@
         self.__model = E5RequestModel(networkAccessManager, self)
         self.__proxyModel.setSourceModel(self.__model)
         self.requestsList.setModel(self.__proxyModel)
-        self.connect(self.requestsList.selectionModel(), 
-                     SIGNAL("currentChanged(const QModelIndex&, const QModelIndex&)"), 
-                     self.__currentChanged)
+        self.requestsList.selectionModel().currentChanged[QModelIndex, QModelIndex]\
+            .connect(self.__currentChanged)
         
         fm = self.fontMetrics()
         em = fm.width("m")
@@ -228,9 +226,9 @@
         }
         
         self.requests = []
-        self.connect(networkAccessManager, 
-                     SIGNAL("requestCreated(QNetworkAccessManager::Operation, const QNetworkRequest&, QNetworkReply*)"), 
-                     self.__requestCreated)
+        networkAccessManager\
+            .requestCreated[QNetworkAccessManager.Operation, QNetworkRequest, QNetworkReply]\
+            .connect(self.__requestCreated)
     
     def __requestCreated(self, operation, request, reply):
         """
@@ -374,4 +372,4 @@
         self.beginRemoveRows(parent, row, lastRow)
         del self.requests[row:lastRow + 1]
         self.endRemoveRows()
-        return True
\ No newline at end of file
+        return True
--- a/Helpviewer/HelpIndexWidget.py	Tue Aug 10 13:15:03 2010 +0200
+++ b/Helpviewer/HelpIndexWidget.py	Tue Aug 10 14:17:54 2010 +0200
@@ -56,8 +56,7 @@
                      self.__enableSearchEdit)
         self.connect(self.__index, SIGNAL("activated(const QModelIndex&)"), 
                      self.__activated)
-        self.connect(self.__searchEdit, SIGNAL("returnPressed()"), 
-                     self.__index, SLOT("activateCurrentItem()"))
+        self.__searchEdit.returnPressed.connect(self.__index.activateCurrentItem)
         self.__layout.addWidget(self.__index)
         
         self.__index.viewport().installEventFilter(self)
--- a/Helpviewer/SearchWidget.py	Tue Aug 10 13:15:03 2010 +0200
+++ b/Helpviewer/SearchWidget.py	Tue Aug 10 14:17:54 2010 +0200
@@ -45,8 +45,7 @@
         self.havefound = False
         self.__findBackwards = False
         
-        self.connect(self.findtextCombo.lineEdit(), SIGNAL("returnPressed()"), 
-                     self.__findByReturnPressed)
+        self.findtextCombo.lineEdit().returnPressed.connect(self.__findByReturnPressed)
         self.connect(self.findtextCombo.lineEdit(), SIGNAL("textEdited(const QString&)"),
                      self.__searchTextEdited)
         
--- a/QScintilla/SearchReplaceWidget.py	Tue Aug 10 13:15:03 2010 +0200
+++ b/QScintilla/SearchReplaceWidget.py	Tue Aug 10 14:17:54 2010 +0200
@@ -107,11 +107,10 @@
             self.ui.replaceButton.setIcon(UI.PixmapCache.getIcon("editReplace.png"))
             self.ui.replaceAllButton.setIcon(UI.PixmapCache.getIcon("editReplaceAll.png"))
         
-        self.connect(self.ui.findtextCombo.lineEdit(), SIGNAL("returnPressed()"), 
-                     self.__findByReturnPressed)
+        self.ui.findtextCombo.lineEdit().returnPressed.connect(self.__findByReturnPressed)
         if replace:
-            self.connect(self.ui.replacetextCombo.lineEdit(), SIGNAL("returnPressed()"), 
-                         self.on_replaceButton_clicked)
+            self.ui.replacetextCombo.lineEdit().returnPressed.connect(
+                self.on_replaceButton_clicked)
         
         self.findNextAct = E5Action(self.trUtf8('Find Next'),
                 self.trUtf8('Find Next'),
@@ -624,4 +623,4 @@
             if aw:
                 aw.setFocus(Qt.ActiveWindowFocusReason)
             event.accept()
-            self.close()
\ No newline at end of file
+            self.close()
--- a/QScintilla/Shell.py	Tue Aug 10 13:15:03 2010 +0200
+++ b/QScintilla/Shell.py	Tue Aug 10 14:17:54 2010 +0200
@@ -383,7 +383,7 @@
         
         @param ui reference to the debugger UI object (DebugUI)
         """
-        self.connect(ui, SIGNAL('exceptionInterrupt'), self.__writePrompt)
+        ui.exceptionInterrupt.connect(self.__writePrompt)
         
     def __initialise(self):
         """
--- a/UI/UserInterface.py	Tue Aug 10 13:15:03 2010 +0200
+++ b/UI/UserInterface.py	Tue Aug 10 14:17:54 2010 +0200
@@ -394,26 +394,19 @@
         self.connect(self.multiProject, SIGNAL("multiProjectOpened"), 
                      self.__activateMultiProjectBrowser)
         
-        self.connect(self.debuggerUI, SIGNAL('resetUI'),
-                     self.viewmanager.handleResetUI)
-        self.connect(self.debuggerUI, SIGNAL('resetUI'),
-                     self.debugViewer.handleResetUI)
-        self.connect(self.debuggerUI, SIGNAL('resetUI'),
-                     self.__setEditProfile)
-        self.connect(self.debuggerUI, SIGNAL('debuggingStarted'),
-                     self.browser.handleProgramChange)
-        self.connect(self.debuggerUI, SIGNAL('debuggingStarted'),
-                     self.debugViewer.exceptionLogger.debuggingStarted)
-        self.connect(self.debuggerUI, SIGNAL('debuggingStarted'),
-                     self.debugViewer.handleDebuggingStarted)
-        self.connect(self.debuggerUI, SIGNAL('debuggingStarted'),
-                     self.__programChange)
-        self.connect(self.debuggerUI, SIGNAL('debuggingStarted'),
-                     self.__debuggingStarted)
-        self.connect(self.debuggerUI, SIGNAL('compileForms'),
-                     self.projectBrowser.pfBrowser.compileChangedForms)
-        self.connect(self.debuggerUI, SIGNAL('compileResources'),
-                     self.projectBrowser.prBrowser.compileChangedResources)
+        self.debuggerUI.resetUI.connect(self.viewmanager.handleResetUI)
+        self.debuggerUI.resetUI.connect(self.debugViewer.handleResetUI)
+        self.debuggerUI.resetUI.connect(self.__setEditProfile)
+        self.debuggerUI.debuggingStarted.connect(self.browser.handleProgramChange)
+        self.debuggerUI.debuggingStarted.connect(
+            self.debugViewer.exceptionLogger.debuggingStarted)
+        self.debuggerUI.debuggingStarted.connect(self.debugViewer.handleDebuggingStarted)
+        self.debuggerUI.debuggingStarted.connect(self.__programChange)
+        self.debuggerUI.debuggingStarted.connect(self.__debuggingStarted)
+        self.debuggerUI.compileForms.connect(
+            self.projectBrowser.pfBrowser.compileChangedForms)
+        self.debuggerUI.compileResources.connect(
+            self.projectBrowser.prBrowser.compileChangedResources)
         
         debugServer.passiveDebugStarted.connect(
             self.debugViewer.exceptionLogger.debuggingStarted)
--- a/ViewManager/ViewManager.py	Tue Aug 10 13:15:03 2010 +0200
+++ b/ViewManager/ViewManager.py	Tue Aug 10 14:17:54 2010 +0200
@@ -47,6 +47,9 @@
     @signal returnPressed() emitted after a newline command was activated
     @signal gotFocus() emitted when the focus is changed to this widget
     """
+    escPressed = pyqtSignal()
+    gotFocus = pyqtSignal()
+    
     def editorCommand(self, cmd):
         """
         Public method to perform an editor command.
@@ -61,9 +64,9 @@
                     cb.insertItem(0, self.text())
                 else:
                     cb.addItem(self.text())
-            self.emit(SIGNAL("returnPressed()"))
+            self.returnPressed.emit()
         elif cmd == QsciScintilla.SCI_CANCEL:
-            self.emit(SIGNAL("escPressed()"))
+            self.escPressed.emit()
     
     def keyPressEvent(self, evt):
         """
@@ -72,7 +75,7 @@
         @param evt key event (QKeyPressEvent)
         """
         if evt.key() == Qt.Key_Escape:
-            self.emit(SIGNAL("escPressed()"))
+            self.escPressed.emit()
         else:
             QLineEdit.keyPressEvent(self, evt)  # pass it on
     
@@ -82,7 +85,7 @@
         
         @param evt focus event (QFocusEvent)
         """
-        self.emit(SIGNAL("gotFocus()"))
+        self.gotFocus.emit()
         QLineEdit.focusInEvent(self, evt)   # pass it on
 
 class ViewManager(QObject):
@@ -2182,14 +2185,10 @@
                 """ The quicksearch can be ended by pressing the Return key"""
                 """ while the quicksearch entry has the the input focus.</p>"""
         ))
-        self.connect(self.quickFindtextCombo._editor, SIGNAL('returnPressed()'),
-            self.__quickSearchEnter)
-        self.connect(self.quickFindtextCombo._editor, 
-            SIGNAL('textChanged(const QString&)'), self.__quickSearchText)
-        self.connect(self.quickFindtextCombo._editor, SIGNAL('escPressed()'),
-            self.__quickSearchEscape)
-        self.connect(self.quickFindtextCombo._editor, SIGNAL('gotFocus()'), 
-            self.__quickSearchFocusIn)
+        self.quickFindtextCombo._editor.returnPressed.connect(self.__quickSearchEnter)
+        self.quickFindtextCombo._editor.textChanged.connect(self.__quickSearchText)
+        self.quickFindtextCombo._editor.escPressed.connect(self.__quickSearchEscape)
+        self.quickFindtextCombo._editor.gotFocus.connect(self.__quickSearchFocusIn)
         self.quickFindtextAction = QWidgetAction(self)
         self.quickFindtextAction.setDefaultWidget(self.quickFindtextCombo)
         self.quickFindtextAction.setObjectName("vm_quickfindtext_action")

eric ide

mercurial