mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
add a bit of additional logging to image paste
This commit is contained in:
parent
23e4408fa8
commit
bdf1147a80
2 changed files with 6 additions and 0 deletions
|
@ -279,6 +279,7 @@ FilteredTextEdit::canInsertFromMimeData(const QMimeData *source) const
|
||||||
void
|
void
|
||||||
FilteredTextEdit::insertFromMimeData(const QMimeData *source)
|
FilteredTextEdit::insertFromMimeData(const QMimeData *source)
|
||||||
{
|
{
|
||||||
|
qInfo() << "Got mime formats: \n" << source->formats();
|
||||||
const auto formats = source->formats().filter("/");
|
const auto formats = source->formats().filter("/");
|
||||||
const auto image = formats.filter("image/", Qt::CaseInsensitive);
|
const auto image = formats.filter("image/", Qt::CaseInsensitive);
|
||||||
const auto audio = formats.filter("audio/", Qt::CaseInsensitive);
|
const auto audio = formats.filter("audio/", Qt::CaseInsensitive);
|
||||||
|
|
|
@ -136,6 +136,11 @@ PreviewUploadOverlay::setLabels(const QString &type, const QString &mime, uint64
|
||||||
void
|
void
|
||||||
PreviewUploadOverlay::setPreview(const QImage &src, const QString &mime)
|
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 &split = mime.split('/');
|
||||||
auto const &type = split[1];
|
auto const &type = split[1];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue