diff --git a/src/plugins/coreplugin/mimedatabase.cpp b/src/plugins/coreplugin/mimedatabase.cpp index 06a235d83b8ff6e803646cd5bbe742ea0ea627c4..8f451f93d5fb3b824a66ec85a5b0d97d7d1c10d6 100644 --- a/src/plugins/coreplugin/mimedatabase.cpp +++ b/src/plugins/coreplugin/mimedatabase.cpp @@ -323,7 +323,7 @@ void MagicRuleMatcher::setPriority(int p) } // GlobPattern -MimeGlobPattern::MimeGlobPattern(const QRegExp ®Exp, int weight) : +MimeGlobPattern::MimeGlobPattern(const QRegExp ®Exp, unsigned weight) : m_regExp(regExp), m_weight(weight) { } @@ -337,7 +337,7 @@ const QRegExp &MimeGlobPattern::regExp() const return m_regExp; } -int MimeGlobPattern::weight() const +unsigned MimeGlobPattern::weight() const { return m_weight; } @@ -390,7 +390,7 @@ void MimeTypeData::debug(QTextStream &str, int indent) const if (!globPatterns.empty()) { str << indentS << "Glob: "; foreach (const MimeGlobPattern &gp, globPatterns) - str << gp.regExp().pattern() << ' (' << gp.weight() << ') '; + str << gp.regExp().pattern() << '(' << gp.weight() << ')'; str << '\n'; if (!suffixes.empty()) { str << indentS << "Suffixes: " << suffixes.join(comma) diff --git a/src/plugins/coreplugin/mimedatabase.h b/src/plugins/coreplugin/mimedatabase.h index a82a777169c08e166b3ff69272b63e2e11e1584f..4d5a9052a10a5fcd743d623a4443f7fdbdc934e7 100644 --- a/src/plugins/coreplugin/mimedatabase.h +++ b/src/plugins/coreplugin/mimedatabase.h @@ -139,18 +139,18 @@ private: class CORE_EXPORT MimeGlobPattern { public: - static const int MaxWeight = 100; - static const int MinWeight = 1; + static const unsigned MaxWeight = 100; + static const unsigned MinWeight = 1; - explicit MimeGlobPattern(const QRegExp ®Exp, int weight = MaxWeight); + explicit MimeGlobPattern(const QRegExp ®Exp, unsigned weight = MaxWeight); ~MimeGlobPattern(); const QRegExp ®Exp() const; - int weight() const; + unsigned weight() const; private: - const QRegExp m_regExp; - const int m_weight; + QRegExp m_regExp; + int m_weight; }; /* Mime type data used in Qt Creator. Contains most information from