11#include "metadatafilter.h"
14#include <KConfigGroup>
18MetadataFilter::MetadataFilter(
QObject *parent)
21 initMetaInformationSettings();
24MetadataFilter::~MetadataFilter() =
default;
26void MetadataFilter::initMetaInformationSettings()
28 const int currentVersion = 13;
32 if (config.group(QStringLiteral(
"Misc")).readEntry(
"version", 0) < currentVersion) {
37 config.deleteGroup(QStringLiteral(
"Show"));
40 static const char *
const disabledProperties[] = {
56 "kfileitem#permissions",
57 "replayGainAlbumPeak",
58 "replayGainAlbumGain",
59 "replayGainTrackPeak",
60 "replayGainTrackGain",
67 "photoPixelXDimension",
68 "photoPixelYDimension",
73 for (
const auto property : disabledProperties) {
78 config.
group(QStringLiteral(
"Misc")).
writeEntry(
"version", currentVersion);
82QVariantMap MetadataFilter::filter(
const QVariantMap &data)
87 QVariantMap finalData(data);
93 QVariantMap::iterator it = finalData.begin();
94 while (it != finalData.end()) {
95 const QString uriString = it.key();
96 if (!settings.
readEntry(uriString,
true)) {
97 it = finalData.erase(it);
KConfigGroup group(const QString &group)
void writeEntry(const char *key, const char *value, WriteConfigFlags pFlags=Normal)
QString readEntry(const char *key, const char *aDefault=nullptr) const
QVariant property(const char *name) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:54:55 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.