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 <memory>
#include <QPainter>
#include <QJsonObject> #include <QJsonObject>
class downloader; class downloader;

View file

@ -3,6 +3,7 @@
#include "localized.h" #include "localized.h"
#include <QDir> #include <QDir>
#include <QPainter>
#include <cmath> #include <cmath>
#include <unordered_set> #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); QImage screenshot_img(rows[0], img.width(), img.height(), QImage::Format_RGBA8888);
QPainter painter(&screenshot_img); QPainter painter(&screenshot_img);
painter.drawImage(manager.overlay_offset_x, manager.overlay_offset_y, overlay_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()); 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.setPen(QPen(Qt::black, 1));
painter.fillPath(path, led_color); painter.fillPath(path, led_color);
painter.drawPath(path); painter.drawPath(path);
painter.end();
// Update the color sample widget // Update the color sample widget
ui->w_color_sample->setPixmap(color_sample.scaled(w * dpr, h * dpr, Qt::KeepAspectRatio, Qt::TransformationMode::SmoothTransformation)); 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.drawEllipse(QRectF(ingame_x - 0.5, ingame_y - 0.5, 1.0, 1.0));
} }
painter.end();
l->setPixmap(pixmap); l->setPixmap(pixmap);
} }

View file

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

View file

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