From bdf1147a807a8d72eccfcf37c95604331653e0f7 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Mon, 18 May 2020 14:02:54 +0200 Subject: [PATCH] add a bit of additional logging to image paste --- src/TextInputWidget.cpp | 1 + src/dialogs/PreviewUploadOverlay.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/TextInputWidget.cpp b/src/TextInputWidget.cpp index d2359910..3e3915bb 100644 --- a/src/TextInputWidget.cpp +++ b/src/TextInputWidget.cpp @@ -279,6 +279,7 @@ FilteredTextEdit::canInsertFromMimeData(const QMimeData *source) const void FilteredTextEdit::insertFromMimeData(const QMimeData *source) { + qInfo() << "Got mime formats: \n" << source->formats(); const auto formats = source->formats().filter("/"); const auto image = formats.filter("image/", Qt::CaseInsensitive); const auto audio = formats.filter("audio/", Qt::CaseInsensitive); diff --git a/src/dialogs/PreviewUploadOverlay.cpp b/src/dialogs/PreviewUploadOverlay.cpp index 42558d67..20959b0a 100644 --- a/src/dialogs/PreviewUploadOverlay.cpp +++ b/src/dialogs/PreviewUploadOverlay.cpp @@ -136,6 +136,11 @@ PreviewUploadOverlay::setLabels(const QString &type, const QString &mime, uint64 void PreviewUploadOverlay::setPreview(const QImage &src, const QString &mime) { + nhlog::ui()->info("Pasting image with size: {}x{}, format: {}", + src.height(), + src.width(), + mime.toStdString()); + auto const &split = mime.split('/'); auto const &type = split[1];