Commit 93b63626 authored by Edwin Pujols's avatar Edwin Pujols Committed by Tomaz Canabrava
Browse files

TerminalDisplay: Replace tuple by QPair.

parent fa4bd94d
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment