diff options
author | David Faure <faure@kde.org> | 2012-02-23 18:56:12 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-24 16:21:37 +0100 |
commit | 5ae1caed435139cea5881609dae51026f54ad1fe (patch) | |
tree | cde5b6983376c6a304205ae6f24b02fc0649f84b /src/corelib/mimetypes | |
parent | 92f37f00f91fbfc3164ab514d521f0975dc6c5d8 (diff) |
qmimetypeparser: more optimized definition of string constants
Change-Id: I0cbc0fef63814ab037bea66ab35b3aa8b6ec800c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'src/corelib/mimetypes')
-rw-r--r-- | src/corelib/mimetypes/qmimetypeparser.cpp | 42 | ||||
-rw-r--r-- | src/corelib/mimetypes/qmimetypeparser_p.h | 24 |
2 files changed, 21 insertions, 45 deletions
diff --git a/src/corelib/mimetypes/qmimetypeparser.cpp b/src/corelib/mimetypes/qmimetypeparser.cpp index 23f57367e3..4a2ec0a0b2 100644 --- a/src/corelib/mimetypes/qmimetypeparser.cpp +++ b/src/corelib/mimetypes/qmimetypeparser.cpp @@ -58,29 +58,29 @@ QT_BEGIN_NAMESPACE // XML tags in MIME files -const char *const mimeInfoTagC = "mime-info"; -const char *const mimeTypeTagC = "mime-type"; -const char *const mimeTypeAttributeC = "type"; -const char *const subClassTagC = "sub-class-of"; -const char *const commentTagC = "comment"; -const char *const genericIconTagC = "generic-icon"; -const char *const iconTagC = "icon"; -const char *const nameAttributeC = "name"; -const char *const globTagC = "glob"; -const char *const aliasTagC = "alias"; -const char *const patternAttributeC = "pattern"; -const char *const weightAttributeC = "weight"; -const char *const caseSensitiveAttributeC = "case-sensitive"; -const char *const localeAttributeC = "xml:lang"; +static const char mimeInfoTagC[] = "mime-info"; +static const char mimeTypeTagC[] = "mime-type"; +static const char mimeTypeAttributeC[] = "type"; +static const char subClassTagC[] = "sub-class-of"; +static const char commentTagC[] = "comment"; +static const char genericIconTagC[] = "generic-icon"; +static const char iconTagC[] = "icon"; +static const char nameAttributeC[] = "name"; +static const char globTagC[] = "glob"; +static const char aliasTagC[] = "alias"; +static const char patternAttributeC[] = "pattern"; +static const char weightAttributeC[] = "weight"; +static const char caseSensitiveAttributeC[] = "case-sensitive"; +static const char localeAttributeC[] = "xml:lang"; -const char *const magicTagC = "magic"; -const char *const priorityAttributeC = "priority"; +static const char magicTagC[] = "magic"; +static const char priorityAttributeC[] = "priority"; -const char *const matchTagC = "match"; -const char *const matchValueAttributeC = "value"; -const char *const matchTypeAttributeC = "type"; -const char *const matchOffsetAttributeC = "offset"; -const char *const matchMaskAttributeC = "mask"; +static const char matchTagC[] = "match"; +static const char matchValueAttributeC[] = "value"; +static const char matchTypeAttributeC[] = "type"; +static const char matchOffsetAttributeC[] = "offset"; +static const char matchMaskAttributeC[] = "mask"; /*! \class QMimeTypeParser diff --git a/src/corelib/mimetypes/qmimetypeparser_p.h b/src/corelib/mimetypes/qmimetypeparser_p.h index 455c07063c..af01e1641a 100644 --- a/src/corelib/mimetypes/qmimetypeparser_p.h +++ b/src/corelib/mimetypes/qmimetypeparser_p.h @@ -50,30 +50,6 @@ QT_BEGIN_NAMESPACE class QIODevice; -// XML tags in MIME files -extern const char *const mimeInfoTagC; -extern const char *const mimeTypeTagC; -extern const char *const mimeTypeAttributeC; -extern const char *const subClassTagC; -extern const char *const commentTagC; -extern const char *const genericIconTagC; -extern const char *const nameAttributeC; -extern const char *const globTagC; -extern const char *const aliasTagC; -extern const char *const patternAttributeC; -extern const char *const weightAttributeC; -extern const char *const caseSensitiveAttributeC; -extern const char *const localeAttributeC; - -extern const char *const magicTagC; -extern const char *const priorityAttributeC; - -extern const char *const matchTagC; -extern const char *const matchValueAttributeC; -extern const char *const matchTypeAttributeC; -extern const char *const matchOffsetAttributeC; -extern const char *const matchMaskAttributeC; - class QMimeTypeParserBase { Q_DISABLE_COPY(QMimeTypeParserBase) |