From dd3e8716b276f9f1646338f8801ca9a2f688fc46 Mon Sep 17 00:00:00 2001 From: Mike Skec Date: Sat, 9 Jan 2021 14:27:44 +1100 Subject: status bar: New file cache indicator Mime label was also simplified so that only type/subtype are shown. --- src/mimeparser.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/mimeparser.cpp') diff --git a/src/mimeparser.cpp b/src/mimeparser.cpp index e76f372..3a43acf 100644 --- a/src/mimeparser.cpp +++ b/src/mimeparser.cpp @@ -20,18 +20,23 @@ QString MimeType::parameter(const QString ¶m_name, QString const & default_v return val; } -QString MimeType::toString() const +QString MimeType::toString(bool full) const { if(isValid()) { QString result = type; if(not subtype.isEmpty()) result += "/" + subtype; - for(auto const & key : parameters.keys()) { - result += "; "; - result += key; - result += "="; - result += parameters[key]; + + if (full) + { + for(auto const & key : parameters.keys()) { + result += "; "; + result += key; + result += "="; + result += parameters[key]; + } } + return result; } else { return QString { }; -- cgit v1.2.3