Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 7c831e18 authored by Martin Tobias Holmedahl Sandsmark's avatar Martin Tobias Holmedahl Sandsmark Committed by Kurt Hindenburg

Some trivial cleanup of the TerminalDisplay::hotSpotRegion() function

Summary: The unrelated part of the _contentRect patch.

Reviewers: hindenburg, #konsole

Reviewed By: hindenburg, #konsole

Subscribers: hindenburg, konsole-devel, #konsole

Tags: #konsole

Differential Revision: https://phabricator.kde.org/D18858
parent ed6d8b70
......@@ -1324,31 +1324,28 @@ void TerminalDisplay::scrollImage(int lines , const QRect& screenWindowRegion)
QRegion TerminalDisplay::hotSpotRegion() const
{
QRegion region;
foreach(Filter::HotSpot * hotSpot , _filterChain->hotSpots()) {
for (const Filter::HotSpot *hotSpot : _filterChain->hotSpots()) {
QRect r;
r.setLeft(hotSpot->startColumn());
r.setTop(hotSpot->startLine());
if (hotSpot->startLine() == hotSpot->endLine()) {
r.setLeft(hotSpot->startColumn());
r.setTop(hotSpot->startLine());
r.setRight(hotSpot->endColumn());
r.setBottom(hotSpot->endLine());
region |= imageToWidget(r);
} else {
r.setLeft(hotSpot->startColumn());
r.setTop(hotSpot->startLine());
r.setRight(_columns);
r.setBottom(hotSpot->startLine());
region |= imageToWidget(r);
for (int line = hotSpot->startLine() + 1 ; line < hotSpot->endLine() ; line++) {
r.setLeft(0);
r.setTop(line);
r.setRight(_columns);
r.setBottom(line);
r.setLeft(0);
for (int line = hotSpot->startLine() + 1 ; line < hotSpot->endLine(); line++) {
r.moveTop(line);
region |= imageToWidget(r);
}
r.setLeft(0);
r.setTop(hotSpot->endLine());
r.moveTop(hotSpot->endLine());
r.setRight(hotSpot->endColumn());
r.setBottom(hotSpot->endLine());
region |= imageToWidget(r);
}
}
......
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