From 03b0026e202527348c01f4a90e41b917af24d1dd Mon Sep 17 00:00:00 2001 From: Kurt Hindenburg Date: Tue, 29 May 2018 20:49:39 -0400 Subject: [PATCH] Remove default edge to getCharacterPosition() To prevent confusion, remove default edge=true which forces callers to specify all parameter. --- src/TerminalDisplay.cpp | 4 ++-- src/TerminalDisplay.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/TerminalDisplay.cpp b/src/TerminalDisplay.cpp index d20574ad..d457c643 100644 --- a/src/TerminalDisplay.cpp +++ b/src/TerminalDisplay.cpp @@ -2469,7 +2469,7 @@ void TerminalDisplay::extendSelection(const QPoint& position) int charColumn = 0; int charLine = 0; - getCharacterPosition(pos, charLine, charColumn); + getCharacterPosition(pos, charLine, charColumn, true); QPoint here = QPoint(charColumn, charLine); QPoint ohere; @@ -3090,7 +3090,7 @@ void TerminalDisplay::mouseTripleClickEvent(QMouseEvent* ev) int charLine; int charColumn; - getCharacterPosition(ev->pos(), charLine, charColumn); + getCharacterPosition(ev->pos(), charLine, charColumn, true); selectLine(QPoint(charColumn, charLine), _tripleClickMode == Enum::SelectWholeLine); } diff --git a/src/TerminalDisplay.h b/src/TerminalDisplay.h index 6f1da299..22477ffd 100644 --- a/src/TerminalDisplay.h +++ b/src/TerminalDisplay.h @@ -862,7 +862,7 @@ private: // maps a point on the widget to the position ( ie. line and column ) // of the character at that point. When the edge is true, it maps to // a character which left edge is closest to the point. - void getCharacterPosition(const QPoint &widgetPoint, int &line, int &column, bool edge = true) const; + void getCharacterPosition(const QPoint &widgetPoint, int &line, int &column, bool edge) const; // the area where the preedit string for input methods will be draw QRect preeditRect() const;