Commit be874b1c authored by Ahmad Samir's avatar Ahmad Samir Committed by Tomaz Canabrava
Browse files

Pass TerminalDisplay parent arg when constructing a TerminalPainter object

This way we can use it directly in the code, instead of QObject::sender()
and casting.
parent dc353e8f
This diff is collapsed.
......@@ -38,7 +38,7 @@ class TerminalDisplay;
class TerminalPainter : public QObject
{
public:
explicit TerminalPainter(QObject *parent = nullptr);
explicit TerminalPainter(TerminalDisplay *parentDisplay);
~TerminalPainter() override = default;
public Q_SLOTS:
......@@ -100,6 +100,8 @@ private:
// draws the cursor character
void drawCursor(QPainter &painter, const QRect &rect, const QColor &foregroundColor, const QColor &backgroundColor, QColor &characterColor);
TerminalDisplay *m_parentDisplay = nullptr;
};
}
......
Supports Markdown
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