aboutsummaryrefslogtreecommitdiff
path: root/src/mimeparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mimeparser.cpp')
-rw-r--r--src/mimeparser.cpp17
1 files changed, 11 insertions, 6 deletions
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 &param_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 { };