summaryrefslogtreecommitdiffstats
path: root/src/corelib/mimetypes/qmimeglobpattern_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/mimetypes/qmimeglobpattern_p.h')
-rw-r--r--src/corelib/mimetypes/qmimeglobpattern_p.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/corelib/mimetypes/qmimeglobpattern_p.h b/src/corelib/mimetypes/qmimeglobpattern_p.h
index 0088931b5c..7b4ecd2f6a 100644
--- a/src/corelib/mimetypes/qmimeglobpattern_p.h
+++ b/src/corelib/mimetypes/qmimeglobpattern_p.h
@@ -88,7 +88,14 @@ public:
m_pattern = m_pattern.toLower();
}
}
- ~QMimeGlobPattern() {}
+
+ void swap(QMimeGlobPattern &other) Q_DECL_NOTHROW
+ {
+ qSwap(m_pattern, other.m_pattern);
+ qSwap(m_mimeType, other.m_mimeType);
+ qSwap(m_weight, other.m_weight);
+ qSwap(m_caseSensitivity, other.m_caseSensitivity);
+ }
bool matchFileName(const QString &filename) const;
@@ -103,6 +110,7 @@ private:
int m_weight;
Qt::CaseSensitivity m_caseSensitivity;
};
+Q_DECLARE_SHARED(QMimeGlobPattern)
class QMimeGlobPatternList : public QList<QMimeGlobPattern>
{