Fix Wayland image upload crash if confirmation dialog is enabled (#5314)

This commit is contained in:
pajlada
2024-04-12 23:48:08 +02:00
committed by GitHub
parent 1ca77a1e84
commit f4e950ea0b
4 changed files with 111 additions and 65 deletions
+9 -1
View File
@@ -25,8 +25,16 @@ struct RawImageData {
class ImageUploader final : public Singleton
{
public:
/**
* Tries to get the image(s) from the given QMimeData
*
* If no images were found, the second value in the pair will contain an error message
*/
std::pair<std::queue<RawImageData>, QString> getImages(
const QMimeData *source) const;
void save() override;
void upload(const QMimeData *source, ChannelPtr channel,
void upload(std::queue<RawImageData> images, ChannelPtr channel,
QPointer<ResizingTextEdit> outputTextEdit);
private: