From ea6e67060020191d0337c2f002710f0cd7988f1b Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 8 Aug 2021 00:07:02 +0200 Subject: [PATCH] Show only tags which are actually present on disk in the file info view The file info view is supposed to represent the state of the file as it is currently on disk and should not show any tags which have been added as part of the automatic tag management. --- CMakeLists.txt | 2 +- gui/fileinfomodel.cpp | 2 +- misc/htmlinfo.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e60fa46..d7e0a2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -199,7 +199,7 @@ if (WIDGETS_GUI OR QUICK_GUI) endif () # find tagparser -find_package(tagparser${CONFIGURATION_PACKAGE_SUFFIX} 10.0.0 REQUIRED) +find_package(tagparser${CONFIGURATION_PACKAGE_SUFFIX} 10.1.0 REQUIRED) use_tag_parser() # enable experimental JSON export diff --git a/gui/fileinfomodel.cpp b/gui/fileinfomodel.cpp index 2c1423c..38da81e 100644 --- a/gui/fileinfomodel.cpp +++ b/gui/fileinfomodel.cpp @@ -342,7 +342,7 @@ void FileInfoModel::updateCache() // tags { - const auto tags = m_file->tags(); + const auto tags = m_file->parsedTags(); if (!tags.empty()) { auto *tagsItem = defaultItem(tr("Tags")); setItem(++currentRow, tagsItem); diff --git a/misc/htmlinfo.cpp b/misc/htmlinfo.cpp index bba5dd2..dbbd560 100644 --- a/misc/htmlinfo.cpp +++ b/misc/htmlinfo.cpp @@ -970,7 +970,7 @@ public: } // tags - auto tags = m_file.tags(); + const auto tags = m_file.parsedTags(); if (!tags.empty()) { startTableSection(); const QString moreId(QStringLiteral("tagsMore")); @@ -983,7 +983,7 @@ public: m_writer.writeEndElement(); startExtendedTableSection(moreId); - for (const Tag *tag : tags) { + for (const Tag *const tag : tags) { RowMaker rowMaker(m_writer); rowMaker.startSubTab(qstr(tag->typeName())); if (!tag->version().empty()) {