TerminalDisplay: Replace tuple by QPair.

wilder
Edwin Pujols 5 years ago committed by Tomaz Canabrava
parent fa4bd94d84
commit 93b6362655
  1. 4
      src/terminalDisplay/TerminalDisplay.cpp
  2. 5
      src/terminalDisplay/TerminalDisplay.h

@ -1678,7 +1678,7 @@ void TerminalDisplay::mouseReleaseEvent(QMouseEvent* ev)
}
}
std::tuple<int, int> TerminalDisplay::getCharacterPosition(const QPoint& widgetPoint, bool edge) const
QPair<int, int> TerminalDisplay::getCharacterPosition(const QPoint& widgetPoint, bool edge) const
{
// the column value returned can be equal to _usedColumns (when edge == true),
// which is the position just after the last character displayed in a line.
@ -1690,7 +1690,7 @@ std::tuple<int, int> TerminalDisplay::getCharacterPosition(const QPoint& widgetP
int column = qBound(0, (widgetPoint.x() + xOffset - contentsRect().left() - _contentRect.left()) / _fontWidth, columnMax);
int line = qBound(0, (widgetPoint.y() - contentsRect().top() - _contentRect.top()) / _fontHeight, _usedLines - 1);
return std::make_tuple(line, column);
return qMakePair(line, column);
}
void TerminalDisplay::setExpandedMode(bool expand)

@ -8,9 +8,6 @@
#ifndef TERMINALDISPLAY_H
#define TERMINALDISPLAY_H
// Standard
#include <tuple>
// Qt
#include <QColor>
#include <QPointer>
@ -310,7 +307,7 @@ public:
// 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.
std::tuple<int, int> getCharacterPosition(const QPoint &widgetPoint, bool edge) const;
QPair<int, int> getCharacterPosition(const QPoint &widgetPoint, bool edge) const;
// toggle the header bar Minimize/Maximize button.
void setExpandedMode(bool expand);

Loading…
Cancel
Save