From 8b8f8532c3a562af825496f8865ee2acfbd1037e Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Sat, 29 Nov 2014 21:29:45 +0100 Subject: [PATCH 1/2] Fix 'getSelectionEnd' --- lib/qtermwidget.cpp | 4 ++-- lib/qtermwidget.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/qtermwidget.cpp b/lib/qtermwidget.cpp index dd8b867..1b4f4a1 100644 --- a/lib/qtermwidget.cpp +++ b/lib/qtermwidget.cpp @@ -582,9 +582,9 @@ void QTermWidget::getSelectionStart(int& row, int& column) m_impl->m_terminalDisplay->screenWindow()->screen()->getSelectionStart(column, row); } -void QTermWidget::setSelectionEnd(int& row, int& column) +void QTermWidget::getSelectionEnd(int& row, int& column) { - m_impl->m_terminalDisplay->screenWindow()->screen()->setSelectionEnd(column, row); + m_impl->m_terminalDisplay->screenWindow()->screen()->getSelectionEnd(column, row); } QString QTermWidget::selectedText(bool preserveLineBreaks) diff --git a/lib/qtermwidget.h b/lib/qtermwidget.h index 9c550ee..de1da2f 100644 --- a/lib/qtermwidget.h +++ b/lib/qtermwidget.h @@ -137,7 +137,7 @@ public: void setSelectionStart(int row, int column); void setSelectionEnd(int row, int column); void getSelectionStart(int& row, int& column); - void setSelectionEnd(int& row, int& column); + void getSelectionEnd(int& row, int& column); /** * Returns the currently selected text. From 1f771945382dc63b4033b059623cadf312372955 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Sat, 29 Nov 2014 21:54:29 +0100 Subject: [PATCH 2/2] Allow stopping test.py with ctrl-C --- pyqt4/test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyqt4/test.py b/pyqt4/test.py index 1045f8c..5c20eef 100755 --- a/pyqt4/test.py +++ b/pyqt4/test.py @@ -19,10 +19,12 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -import sys +import sys, signal from PyQt4 import Qt import QTermWidget +signal.signal(signal.SIGINT, signal.SIG_DFL) + a = Qt.QApplication(sys.argv) w = QTermWidget.QTermWidget()