Skip to content
Browse files

Merge remote-tracking branch 'origin/windows' into windows

  • Loading branch information...
2 parents 0ecda5b + 4731195 commit 97a02ed4bca3ef92ffdb337ee636a7c1dbc11f4c @giselher committed Apr 16, 2012
View
15 src/controllers/debugcontroller.py
@@ -32,6 +32,9 @@
class DebugController(QObject):
def __init__(self, distributedObjects):
QObject.__init__(self)
+
+ self.isRecording = False
+
self.settings = QSettings("fh-hagenberg", "SysCDbg")
self.ptyhandler = TtyHandler()
@@ -71,11 +74,17 @@ def openExecutable(self, filename):
def run(self):
self.connector.setTty(self.ptyhandler.ptyname)
self.connector.run()
- # FIXME: Add check or option in settings menu
- self.connector.record()
self.lastCmdWasStep = False
self.signalProxy.emitRunClicked()
+ def toggle_record(self):
+ if not self.isRecording:
+ self.connector.record_start()
+ self.isRecording = True
+ else:
+ self.connector.record_stop()
+ self.isRecording = False
+
def next_(self):
self.connector.next_()
self.lastCmdWasStep = True
@@ -139,8 +148,6 @@ def handleStoppedRecord(self, rec):
signal_name = r.src
if r.dest == 'signal-meaning':
signal_meaning = r.src
- if r.dest == 'frame':
- frame = r.src
if r.dest == "bkptno":
bkptno = int(r.src)
View
14 src/views/editorview.py
@@ -23,7 +23,6 @@
# For further information see <http://syscdbg.hagenberg.servus.at/>.
from PyQt4 import QtCore, QtGui
-from PyQt4.QtCore import QObject, SIGNAL
from PyQt4.QtGui import QWidget, QMessageBox
from openedfileview import OpenedFileView
import os
@@ -49,7 +48,7 @@ def __init__(self, distributedObjects, _=None):
QtCore.QMetaObject.connectSlotsByName(self)
self.distributedObjects = distributedObjects
- QObject.connect(self.tabWidget, SIGNAL('tabCloseRequested(int)'), self.hideTab)
+ self.tabWidget.tabCloseRequested.connect(self.hideTab)
self.openedFiles = {}
def hideTab(self, idx):
@@ -58,7 +57,10 @@ def hideTab(self, idx):
ret = QMessageBox.Discard
if self.__getFileModified(idx):
- msgBox = QMessageBox(QMessageBox.Question, "Save Resources", "'" + self.tabWidget.tabText(idx)[:-1] + "' has been modified. Save changes?", QMessageBox.Cancel | QMessageBox.Save | QMessageBox.Discard, self)
+ msgBox = QMessageBox(QMessageBox.Question, "Save Resources", "'" +
+ self.tabWidget.tabText(idx)[:-1] +
+ "' has been modified. Save changes?", QMessageBox.Cancel |
+ QMessageBox.Save | QMessageBox.Discard, self)
ret = msgBox.exec_()
if ret == QMessageBox.Save:
self.getCurrentOpenedFile().saveFile()
@@ -112,9 +114,11 @@ def setFileModified(self, filename, modified):
""" Adds a '*' to name of modified file in the editors tab widget. """
if filename in self.openedFiles:
if (modified):
- self.tabWidget.setTabText(self.tabWidget.indexOf(self.openedFiles[filename].tab), os.path.basename(filename) + '*')
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.openedFiles[filename].tab),
+ os.path.basename(filename) + '*')
else:
- self.tabWidget.setTabText(self.tabWidget.indexOf(self.openedFiles[filename].tab), os.path.basename(filename))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.openedFiles[filename].tab),
+ os.path.basename(filename))
def __getFileModified(self, idx):
""" Method returns true if filename in tabwidget ends with '*'. """
View
7 src/views/filelistview.py
@@ -28,7 +28,7 @@
from PyQt4 import QtCore, QtGui
from PyQt4.QtGui import QWidget
-from PyQt4.QtCore import QObject, SIGNAL
+from PyQt4.QtCore import SIGNAL
class FileListView(QWidget):
@@ -51,8 +51,9 @@ def __init__(self, filelist_controller, parent=None):
self.gridLayout.addWidget(self.treeView, 0, 0, 1, 1)
QtCore.QMetaObject.connectSlotsByName(self)
- QObject.connect(self.treeView, SIGNAL('activated(QModelIndex)'), filelist_controller.fileInFileListViewActivated)
- QObject.connect(self.treeView, SIGNAL('expanded(QModelIndex)'), self.resizeColumn)
+ self.treeView.activated.connect(
+ filelist_controller.fileInFileListViewActivated)
+ self.treeView.expanded.connect(self.resizeColumn)
def resizeColumn(self, index):
""" Resize the first column to contents when expanded.
View
11 src/views/gdbioview.py
@@ -24,7 +24,7 @@
from PyQt4 import QtCore, QtGui
from PyQt4.QtGui import QWidget, QTextCursor
-from PyQt4.QtCore import QObject, SIGNAL, Qt
+from PyQt4.QtCore import SIGNAL, Qt
from stylesheets import STYLESHEET
from helpers.tools import unBackslashify
from helpers.gdboutput import GdbOutput
@@ -58,9 +58,11 @@ def __init__(self, debug_controller, parent=None):
QtCore.QMetaObject.connectSlotsByName(self)
self.debugController = debug_controller
- QObject.connect(self.gdbInputEdit.lineEdit(), SIGNAL('returnPressed()'), self.gdbSendButton.click)
- QObject.connect(self.gdbSendButton, SIGNAL('clicked()'), self.executeCliCommand)
- QObject.connect(self.debugController.connector.reader, SIGNAL('consoleRecordReceived(PyQt_PyObject)'), self.handleConsoleRecord, Qt.QueuedConnection)
+ self.gdbInputEdit.lineEdit().returnPressed.connect(self.gdbSendButton.click)
+ self.gdbSendButton.clicked.connect(self.executeCliCommand)
+ self.connect(self.debugController.connector.reader,
+ SIGNAL('consoleRecordReceived(PyQt_PyObject)'),
+ self.handleConsoleRecord, Qt.QueuedConnection)
def executeCliCommand(self):
cmd = str(self.gdbInputEdit.lineEdit().text())
@@ -81,3 +83,4 @@ def handleConsoleRecord(self, rec):
s = unBackslashify(rec.string)
self.gdbIoEdit.insertPlainText(s)
self.gdbIoEdit.moveCursor(QTextCursor.End)
+
View
6 src/views/inferiorioview.py
@@ -23,16 +23,18 @@
# For further information see <http://syscdbg.hagenberg.servus.at/>.
from PyQt4.QtGui import QTextEdit, QTextCursor
-from PyQt4.QtCore import SIGNAL, QObject
+from PyQt4.QtCore import SIGNAL
class InferiorIoView(QTextEdit):
def __init__(self, debug_controller, parent=None):
QTextEdit.__init__(self, parent)
- QObject.connect(debug_controller.ptyhandler, SIGNAL('dataAvailable(QString)'), self.outputInferiorData)
+ self.connect(debug_controller.ptyhandler,
+ SIGNAL('dataAvailable(QString)'), self.outputInferiorData)
def outputInferiorData(self, data):
self.moveCursor(QTextCursor.End)
self.insertPlainText(data)
self.moveCursor(QTextCursor.End)
+
View
11 src/views/logview.py
@@ -25,7 +25,7 @@
import logging
from PyQt4.QtGui import QTableView, QLabel, QTextEdit, QWidget, QGridLayout, QProgressBar
from PyQt4.QtGui import QApplication, QStyle, QFrame, QPalette, QBrush, QPushButton, QPixmap, QIcon
-from PyQt4.QtCore import Qt, SIGNAL, pyqtSlot, QTimer, QObject
+from PyQt4.QtCore import Qt, pyqtSlot, QTimer
from models.logmodel import LogModel, FilteredLogModel
@@ -38,7 +38,7 @@ def __init__(self, target_widget, filter_slider):
self.filter_model.setSourceModel(self.model)
target_widget.setModel(self.filter_model)
self.target_widget = target_widget
- QObject.connect(filter_slider, SIGNAL("valueChanged(int)"), self.setFilter)
+ filter_slider.valueChanged.connect(self.setFilter)
def emit(self, record):
self.model.insertMessage(record)
@@ -77,10 +77,10 @@ def __init__(self, parent):
self.time_bar.setTextVisible(False)
self.pauseButton = QPushButton(QIcon(QPixmap(":/icons/images/pause.png")), "")
self.pauseButton.setFixedSize(32, 32)
- self.connect(self.pauseButton, SIGNAL('clicked()'), self.stopTimer)
+ self.pauseButton.clicked.connect(self.stopTimer)
self.stopButton = QPushButton(QIcon(QPixmap(":/icons/images/stop.png")), "")
self.stopButton.setFixedSize(32, 32)
- self.connect(self.stopButton, SIGNAL('clicked()'), self.closeWidget)
+ self.stopButton.clicked.connect(self.closeWidget)
self.layout = QGridLayout(self)
self.layout.addWidget(self.time_bar, 0, 0, 2, 1)
self.layout.addWidget(self.icon_label, 0, 1, 2, 1)
@@ -90,7 +90,7 @@ def __init__(self, parent):
self.layout.setColumnStretch(2, 1)
self.setAutoFillBackground(True)
self.timer = QTimer()
- self.connect(self.timer, SIGNAL("timeout()"), self.decrementTime)
+ self.timer.timeout.connect(self.decrementTime)
def stopTimer(self):
self.timer.stop()
@@ -154,3 +154,4 @@ def emit(self, record):
class LogView(QTableView):
def __init__(self, parent=None):
QTableView.__init__(self, parent)
+
View
57 src/views/mainwindow.py
@@ -22,9 +22,8 @@
#
# For further information see <http://syscdbg.hagenberg.servus.at/>.
-from PyQt4.QtGui import QMainWindow, QFileDialog, QLabel, QDockWidget, QPixmap,\
- QAction, QIcon
-from PyQt4.QtCore import SIGNAL, QObject, Qt
+from PyQt4.QtGui import QMainWindow, QFileDialog, QLabel, QDockWidget, QPixmap
+from PyQt4.QtCore import SIGNAL, Qt
from ui_mainwindow import Ui_MainWindow
from helpers.distributedobjects import DistributedObjects
from helpers.recentfilehandler import OpenRecentFileAction, RecentFileHandler
@@ -33,7 +32,7 @@
from helpers.actions import Actions
class MainWindow(QMainWindow):
-
+
def __init__(self, parent=None):
""" init UI """
QMainWindow.__init__(self, parent)
@@ -53,19 +52,30 @@ def __init__(self, parent=None):
nrRecentFiles = 5
self.initRecentFileHandler(nrRecentFiles)
- QObject.connect(self.debugController, SIGNAL('executableOpened'), self.showExecutableName)
+ self.connect(self.debugController, SIGNAL('executableOpened'),
+ self.showExecutableName)
# signal proxy
- QObject.connect(self.signalproxy, SIGNAL('inferiorIsRunning(PyQt_PyObject)'), self.targetStartedRunning, Qt.QueuedConnection)
- QObject.connect(self.signalproxy, SIGNAL('inferiorStoppedNormally(PyQt_PyObject)'), self.targetStopped, Qt.QueuedConnection)
- QObject.connect(self.signalproxy, SIGNAL('inferiorReceivedSignal(PyQt_PyObject)'), self.targetStopped, Qt.QueuedConnection)
- QObject.connect(self.signalproxy, SIGNAL('inferiorHasExited(PyQt_PyObject)'), self.targetExited, Qt.QueuedConnection)
-
- QObject.connect(self.signalproxy, SIGNAL('addDockWidget(PyQt_PyObject, QDockWidget, PyQt_PyObject)'), self.addPluginDockWidget)
- QObject.connect(self.signalproxy, SIGNAL('removeDockWidget(QDockWidget)'), self.removeDockWidget)
- QObject.connect(self.pluginloader, SIGNAL('insertPluginAction(PyQt_PyObject)'), self.addPluginAction)
- QObject.connect(self.ui.actionSavePlugins, SIGNAL('activated()'), self.showSavePluginsDialog)
- QObject.connect(self.ui.actionLoadPlugins, SIGNAL('activated()'), self.showLoadPluginsDialog)
+ self.connect(self.signalproxy, SIGNAL('inferiorIsRunning(PyQt_PyObject)'),
+ self.targetStartedRunning, Qt.QueuedConnection)
+ self.connect(self.signalproxy, SIGNAL('inferiorStoppedNormally(PyQt_PyObject)'),
+ self.targetStopped, Qt.QueuedConnection)
+ self.connect(self.signalproxy, SIGNAL('inferiorReceivedSignal(PyQt_PyObject)'),
+ self.targetStopped, Qt.QueuedConnection)
+ self.connect(self.signalproxy, SIGNAL('inferiorHasExited(PyQt_PyObject)'),
+ self.targetExited, Qt.QueuedConnection)
+
+ self.connect(self.signalproxy,
+ SIGNAL('addDockWidget(PyQt_PyObject, QDockWidget, PyQt_PyObject)'),
+ self.addPluginDockWidget)
+
+ self.connect(self.signalproxy, SIGNAL('removeDockWidget(QDockWidget)'),
+ self.removeDockWidget)
+ self.connect(self.pluginloader, SIGNAL('insertPluginAction(PyQt_PyObject)'),
+ self.addPluginAction)
+
+ self.ui.actionSavePlugins.triggered.connect(self.showSavePluginsDialog)
+ self.ui.actionLoadPlugins.triggered.connect(self.showLoadPluginsDialog)
# Add editor to main window.
self.ui.gridLayout.addWidget(self.distributedObjects.editorController.editor_view, 0, 0, 1, 1)
@@ -151,21 +161,22 @@ def __connectActions(self):
# file menu
Actions.Open.triggered.connect(self.showOpenExecutableDialog)
Actions.Exit.triggered.connect(self.close)
- Actions.SaveFile.triggered.connect(self.signalproxy.emitSaveCurrentFile)
+ Actions.SaveFile.triggered.connect(self.signalproxy.emitSaveCurrentFile)
# debug menu
Actions.Run.triggered.connect(self.debugController.run)
Actions.Next.triggered.connect(self.debugController.next_)
- Actions.Record.triggered.connect(self.debugController.toggle_record)
Actions.Step.triggered.connect(self.debugController.step)
+ Actions.Record.triggered.connect(self.debugController.toggle_record)
Actions.ReverseNext.triggered.connect(self.debugController.reverse_next)
Actions.ReverseStep.triggered.connect(self.debugController.reverse_step)
Actions.Continue.triggered.connect(self.debugController.cont)
Actions.Interrupt.triggered.connect(self.debugController.interrupt)
Actions.Finish.triggered.connect(self.debugController.finish)
Actions.RunToCursor.triggered.connect(self.debugController.inferiorUntil)
- QObject.connect(self.ui.actionRestoreSession, SIGNAL('activated()'), \
+
+ self.ui.actionRestoreSession.triggered.connect(
self.distributedObjects.sessionManager.showRestoreSessionDialog)
- QObject.connect(self.ui.actionSaveSession, SIGNAL('activated()'), \
+ self.ui.actionSaveSession.triggered.connect(
self.distributedObjects.sessionManager.showSaveSessionDialog)
def addPluginDockWidget(self, area, widget, addToggleViewAction):
@@ -211,7 +222,7 @@ def createInitialWindowPlacement(self):
def initRecentFileHandler(self, nrRecentFiles):
"""
- Create menu entries for recently used files and connect them to the
+ Create menu entries for recently used files and connect them to the
RecentFileHandler
"""
# create menu entries and connect the actions to the debug controller
@@ -220,17 +231,17 @@ def initRecentFileHandler(self, nrRecentFiles):
recentFileActions[i] = OpenRecentFileAction(self)
recentFileActions[i].setVisible(False)
self.ui.menuRecentlyUsedFiles.addAction(recentFileActions[i])
- QObject.connect(recentFileActions[i], SIGNAL('executableOpened'), \
+ self.connect(recentFileActions[i], SIGNAL('executableOpened'), \
self.distributedObjects.debugController.openExecutable)
self.RecentFileHandler = RecentFileHandler(recentFileActions, \
nrRecentFiles, self.distributedObjects)
- QObject.connect(self.debugController, SIGNAL('executableOpened'), \
+ self.connect(self.debugController, SIGNAL('executableOpened'), \
self.RecentFileHandler.addToRecentFiles)
def restoreInitialWindowPlacement(self):
"""
- Restores the window placement created by
+ Restores the window placement created by
createInitialWindowPlacement().
"""
self.restoreGeometry(self.settings.value(\
View
53 src/views/openedfileview.py
@@ -28,12 +28,13 @@
from PyQt4.QtGui import QPixmap, QIcon, QToolTip, QFont, QColor
from PyQt4.QtCore import SIGNAL, QObject, Qt
from math import log, ceil
-from helpers.actions import ActionEx, Actions
+from helpers.actions import Actions, ActionEx
import logging
class OpenedFileView(QObject):
- MARGIN_NUMBERS, MARGIN_MARKER_BP, MARGIN_MARKER_TP, MARGIN_MARKER_EXEC, MARGIN_MARKER_EXEC_SIGNAL, MARGIN_MARKER_STACK = range(6)
+ MARGIN_NUMBERS, MARGIN_MARKER_BP, MARGIN_MARKER_TP, MARGIN_MARKER_EXEC, \
+ MARGIN_MARKER_EXEC_SIGNAL, MARGIN_MARKER_STACK = range(6)
def __init__(self, distributedObjects, filename):
QObject.__init__(self)
@@ -83,7 +84,9 @@ def __init__(self, distributedObjects, filename):
self.edit.setMarginWidth(self.MARGIN_MARKER_TP, 10)
self.edit.setMarginMarkerMask(self.MARGIN_MARKER_TP, 1 << self.MARGIN_MARKER_TP)
self.edit.setMarginWidth(self.MARGIN_MARKER_EXEC, 10)
- self.edit.setMarginMarkerMask(self.MARGIN_MARKER_EXEC, 1 << self.MARGIN_MARKER_EXEC | 1 << self.MARGIN_MARKER_EXEC_SIGNAL)
+ self.edit.setMarginMarkerMask(self.MARGIN_MARKER_EXEC,
+ 1 << self.MARGIN_MARKER_EXEC |
+ 1 << self.MARGIN_MARKER_EXEC_SIGNAL)
self.edit.setMarginWidth(self.MARGIN_MARKER_STACK, 0)
self.edit.setMarkerBackgroundColor(QColor(Qt.yellow), self.MARGIN_MARKER_STACK)
self.edit.setMarginMarkerMask(self.MARGIN_MARKER_STACK, 1 << self.MARGIN_MARKER_STACK)
@@ -101,33 +104,41 @@ def __init__(self, distributedObjects, filename):
self.file_.close()
self.changed = False
- QObject.connect(self.edit, SIGNAL("modificationChanged(bool)"), self.__setFileModified)
+ self.connect(self.edit, SIGNAL("modificationChanged(bool)"), self.__setFileModified)
self.setMarginWidthByLineNumbers()
self.edit.SendScintilla(Qsci.QsciScintilla.SCI_SETMOUSEDWELLTIME, 500)
# override scintillas context menu with our own
self.edit.SendScintilla(Qsci.QsciScintilla.SCI_USEPOPUP, 0)
self.edit.setContextMenuPolicy(Qt.CustomContextMenu)
- QObject.connect(self.edit, SIGNAL('customContextMenuRequested(QPoint)'), self.showContextMenu)
+ self.connect(self.edit, SIGNAL('customContextMenuRequested(QPoint)'), self.showContextMenu)
- QObject.connect(self.edit, SIGNAL("marginClicked(int,int,Qt::KeyboardModifiers)"), self.marginClicked)
- QObject.connect(self.edit, SIGNAL("SCN_DOUBLECLICK(int, int, int)"), self.editDoubleClicked)
- QObject.connect(self.edit, SIGNAL("SCN_DWELLSTART(int, int, int)"), self.dwellStart)
- QObject.connect(self.edit, SIGNAL("SCN_DWELLEND(int, int, int)"), self.dwellEnd)
+ self.connect(self.edit, SIGNAL("marginClicked(int,int,Qt::KeyboardModifiers)"), self.marginClicked)
+ self.connect(self.edit, SIGNAL("SCN_DOUBLECLICK(int, int, int)"), self.editDoubleClicked)
+ self.connect(self.edit, SIGNAL("SCN_DWELLSTART(int, int, int)"), self.dwellStart)
+ self.connect(self.edit, SIGNAL("SCN_DWELLEND(int, int, int)"), self.dwellEnd)
# initially, read all breakpoints and tracepoints from the model
self.getBreakpointsFromModel()
self.getTracepointsFromModel()
- self.connect(self.breakpointController.model(), SIGNAL('rowsInserted(QModelIndex, int, int)'), self.getBreakpointsFromModel)
- self.connect(self.breakpointController.model(), SIGNAL('rowsRemoved(QModelIndex, int, int)'), self.getBreakpointsFromModel)
- self.connect(self.tracepointController.model(), SIGNAL('rowsInserted(QModelIndex, int, int)'), self.getTracepointsFromModel)
- self.connect(self.tracepointController.model(), SIGNAL('rowsRemoved(QModelIndex, int, int)'), self.getTracepointsFromModel)
-
- self.connect(self.distributedObjects.actions.actions[Actions.AddWatch], SIGNAL('triggered()'), self.addWatch)
- self.connect(self.distributedObjects.actions.actions[Actions.ToggleTrace], SIGNAL('triggered()'), self.toggleTracepoint)
- self.connect(self.distributedObjects.actions.actions[Actions.AddVarToDataGraph], SIGNAL('triggered()'), self.AddVarToDataGraph)
+ self.connect(self.breakpointController.model(),
+ SIGNAL('rowsInserted(QModelIndex, int, int)'),
+ self.getBreakpointsFromModel)
+ self.connect(self.breakpointController.model(),
+ SIGNAL('rowsRemoved(QModelIndex, int, int)'),
+ self.getBreakpointsFromModel)
+ self.connect(self.tracepointController.model(),
+ SIGNAL('rowsInserted(QModelIndex, int, int)'),
+ self.getTracepointsFromModel)
+ self.connect(self.tracepointController.model(),
+ SIGNAL('rowsRemoved(QModelIndex, int, int)'),
+ self.getTracepointsFromModel)
+
+ Actions.AddWatch.triggered.connect(self.addWatch)
+ Actions.ToggleTrace.triggered.connect(self.toggleTracepoint)
+ Actions.AddVarToDataGraph.triggered.connect(self.AddVarToDataGraph)
def saveFile(self):
''' Save source file '''
@@ -175,17 +186,17 @@ def showContextMenu(self, point):
for tp in listOfTracepoints:
# dynamic actions, not in actiony.py Action class
self.action = ActionEx(self.expToWatch, self)
- QObject.connect(self.action, SIGNAL("triggered(PyQt_PyObject)"), tp.addVar)
+ self.action.triggered.connect(tp.addVar)
self.action.setText(str(tp.name))
self.action.setIcon(QIcon(QPixmap(":/icons/images/insert.png")))
self.action.setIconVisibleInMenu(True)
self.subPopupMenu.addAction(self.action)
self.popupMenu = QtGui.QMenu(self.edit)
# add watch and toggle breakpoint to menu
- self.popupMenu.addAction(self.distributedObjects.actions.actions[Actions.AddWatch])
- self.popupMenu.addAction(self.distributedObjects.actions.actions[Actions.ToggleTrace])
- self.popupMenu.addAction(self.distributedObjects.actions.actions[Actions.AddVarToDataGraph])
+ self.popupMenu.addAction(Actions.AddWatch)
+ self.popupMenu.addAction(Actions.ToggleTrace)
+ self.popupMenu.addAction(Actions.AddVarToDataGraph)
# add separator and self.subPopupMenu
self.popupMenu.addSeparator()
self.popupMenu.addMenu(self.subPopupMenu)
View
6 src/views/pyioview.py
@@ -24,8 +24,6 @@
from PyQt4 import QtCore, QtGui
from PyQt4.QtGui import QWidget, QTextCursor
-from PyQt4.QtCore import QObject, SIGNAL
-
class PyIoView(QWidget):
def __init__(self, debug_controller, parent=None):
@@ -55,8 +53,8 @@ def __init__(self, debug_controller, parent=None):
self.debugController = debug_controller
- QObject.connect(self.pyInputEdit.lineEdit(), SIGNAL('returnPressed()'), self.pySendButton.click)
- QObject.connect(self.pySendButton, SIGNAL('clicked()'), self.executePythonCode)
+ self.pyInputEdit.lineEdit().returnPressed.connect(self.pySendButton.click)
+ self.pySendButton.clicked.connect(self.executePythonCode)
def executePythonCode(self):
cmd = str(self.pyInputEdit.lineEdit().text())
View
4 src/views/stackview.py
@@ -24,8 +24,6 @@
from PyQt4 import QtCore, QtGui
from PyQt4.QtGui import QWidget
-from PyQt4.QtCore import QObject, SIGNAL
-
class StackView(QWidget):
def __init__(self, stack_controller, parent=None):
@@ -52,4 +50,4 @@ def __init__(self, stack_controller, parent=None):
QtCore.QMetaObject.connectSlotsByName(self)
- QObject.connect(self.stackView, SIGNAL('activated(QModelIndex)'), stack_controller.stackInStackViewActivated)
+ self.stackView.activated.connect(stack_controller.stackInStackViewActivated)
View
5 src/views/watchview.py
@@ -24,7 +24,7 @@
from PyQt4 import QtGui
from PyQt4.QtGui import QTreeView, QMenu
-from PyQt4.QtCore import SIGNAL, QObject, Qt
+from PyQt4.QtCore import Qt
from variables import filters
from controllers.treeitemcontroller import TreeStdVarWrapper
@@ -35,7 +35,7 @@ def __init__(self, controller, parent=None):
self.setAlternatingRowColors(True)
self.setVerticalScrollMode(QtGui.QAbstractItemView.ScrollPerPixel)
self.controller = controller
- QObject.connect(self, SIGNAL('expanded(QModelIndex)'), self.resizeColumn)
+ self.expanded.connect(self.resizeColumn)
def resizeColumn(self, _):
"""Resize the first column to contents when expanded."""
@@ -62,3 +62,4 @@ def contextMenuEvent(self, event):
menu = QMenu()
filters.add_actions_for_all_filters(menu.addMenu("Set Filter for %s..." % wrapper.getExp()), wrapper)
menu.exec_(event.globalPos())
+

0 comments on commit 97a02ed

Please sign in to comment.
Something went wrong with that request. Please try again.