QMimeGlobPattern: init all members only once
... by initializer list. Change-Id: I39d2f933dac171273f500963eb47ffa9165978de Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
e0e717d06a
commit
ed96363d56
@ -83,11 +83,9 @@ public:
|
||||
static const unsigned MinWeight = 1;
|
||||
|
||||
explicit QMimeGlobPattern(const QString &thePattern, const QString &theMimeType, unsigned theWeight = DefaultWeight, Qt::CaseSensitivity s = Qt::CaseInsensitive) :
|
||||
m_pattern(thePattern), m_mimeType(theMimeType), m_weight(theWeight), m_caseSensitivity(s)
|
||||
m_pattern(s == Qt::CaseInsensitive ? thePattern.toLower() : thePattern),
|
||||
m_mimeType(theMimeType), m_weight(theWeight), m_caseSensitivity(s)
|
||||
{
|
||||
if (s == Qt::CaseInsensitive) {
|
||||
m_pattern = m_pattern.toLower();
|
||||
}
|
||||
}
|
||||
|
||||
void swap(QMimeGlobPattern &other) Q_DECL_NOTHROW
|
||||
|
Loading…
x
Reference in New Issue
Block a user