Add missing QPainter::end calls

This commit is contained in:
Megamouse 2024-07-23 22:37:33 +02:00
parent 5737ed3bce
commit 14dea78ddc
7 changed files with 7 additions and 1 deletions

View File

@ -2,7 +2,6 @@
#include <memory>
#include <QPainter>
#include <QJsonObject>
class downloader;

View File

@ -3,6 +3,7 @@
#include "localized.h"
#include <QDir>
#include <QPainter>
#include <cmath>
#include <unordered_set>

View File

@ -1018,6 +1018,7 @@ void gs_frame::take_screenshot(std::vector<u8> data, u32 sshot_width, u32 sshot_
QImage screenshot_img(rows[0], img.width(), img.height(), QImage::Format_RGBA8888);
QPainter painter(&screenshot_img);
painter.drawImage(manager.overlay_offset_x, manager.overlay_offset_y, overlay_img);
painter.end();
std::memcpy(rows[0], screenshot_img.constBits(), screenshot_img.sizeInBytes());

View File

@ -111,6 +111,7 @@ void pad_led_settings_dialog::redraw_color_sample() const
painter.setPen(QPen(Qt::black, 1));
painter.fillPath(path, led_color);
painter.drawPath(path);
painter.end();
// Update the color sample widget
ui->w_color_sample->setPixmap(color_sample.scaled(w * dpr, h * dpr, Qt::KeepAspectRatio, Qt::TransformationMode::SmoothTransformation));

View File

@ -863,6 +863,8 @@ void pad_settings_dialog::RepaintPreviewLabel(QLabel* l, int deadzone, int anti_
painter.drawEllipse(QRectF(ingame_x - 0.5, ingame_y - 0.5, 1.0, 1.0));
}
painter.end();
l->setPixmap(pixmap);
}

View File

@ -37,6 +37,7 @@ namespace gui
painter.setPen(Qt::NoPen);
painter.setBrush(color);
painter.drawEllipse(0, 0, width(), height());
painter.end();
}
};

View File

@ -4,6 +4,7 @@
#include <QApplication>
#include <QStyledItemDelegate>
#include <QTextDocument>
#include <QPainter>
class richtext_item_delegate : public QStyledItemDelegate
{