summary refs log tree commit diff
path: root/src/timeline/InputBar.cpp
diff options
context:
space:
mode:
authorMarcus Hoffmann <bubu@bubu1.eu>2021-12-03 01:28:01 +0100
committerMarcus Hoffmann <bubu@bubu1.eu>2021-12-03 01:37:00 +0100
commit8aa4a60d12801734462ecb22e146501241fa4683 (patch)
treee67743a250b44d5d74e4ba48a1259b47e617abea /src/timeline/InputBar.cpp
parentInputBar: use auto type (diff)
downloadnheko-8aa4a60d12801734462ecb22e146501241fa4683.tar.xz
InputBar: use X.empty() instead of !X.size()
Suggested-by:

Clang-Tidy: The 'empty' method should be used to check for emptiness instead of 'size'
Diffstat (limited to 'src/timeline/InputBar.cpp')
-rw-r--r--src/timeline/InputBar.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp

index 2133deb7..16372f59 100644 --- a/src/timeline/InputBar.cpp +++ b/src/timeline/InputBar.cpp
@@ -657,8 +657,8 @@ InputBar::showPreview(const QMimeData &source, const QString& path, const QStrin previewDialog_->setAttribute(Qt::WA_DeleteOnClose); // Force SVG to _not_ be handled as an image, but as raw data - if (source.hasImage() && (!formats.size() || formats.front() != "image/svg+xml")) { - if (formats.size() && formats.front().startsWith("image/")) { + if (source.hasImage() && (formats.empty() || formats.front() != "image/svg+xml")) { + if (!formats.empty() && formats.front().startsWith("image/")) { // known format, keep as-is previewDialog_->setPreview(qvariant_cast<QImage>(source.imageData()), formats.front()); } else {