mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
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'
This commit is contained in:
parent
abcbcecac1
commit
8aa4a60d12
1 changed files with 2 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue