diff options
author | Wolf-Michael Bolle <wolf-michael.bolle@nokia.com> | 2011-09-19 11:35:22 +0200 |
---|---|---|
committer | Wolf-Michael Bolle <wolf-michael.bolle@nokia.com> | 2011-09-19 11:36:50 +0200 |
commit | caff2617fc831a3a3b6c8ef43a2b7b098df16a03 (patch) | |
tree | a1177e8ba93b6a0df7308105cac85b8e83beb2eb /src/mimetypes | |
parent | fe6ae1932a2510ee748659901c2ed8565225e698 (diff) |
Corrected file extention to filename extension.
Change-Id: Ic3853ace953678878659d86769f696846fffbc84
Reviewed-on: http://codereview.qt-project.org/5125
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
Diffstat (limited to 'src/mimetypes')
-rw-r--r-- | src/mimetypes/qmimetype.cpp | 18 | ||||
-rw-r--r-- | src/mimetypes/qmimetype.h | 4 | ||||
-rw-r--r-- | src/mimetypes/qmimetype_p.h | 8 | ||||
-rw-r--r-- | src/mimetypes/qmimetyperegistry.cpp | 20 | ||||
-rw-r--r-- | src/mimetypes/qmimetyperegistry.h | 6 | ||||
-rw-r--r-- | src/mimetypes/qmimetyperegistry_empty.cpp | 18 |
6 files changed, 37 insertions, 37 deletions
diff --git a/src/mimetypes/qmimetype.cpp b/src/mimetypes/qmimetype.cpp index 6721e60..8cf9572 100644 --- a/src/mimetypes/qmimetype.cpp +++ b/src/mimetypes/qmimetype.cpp @@ -73,18 +73,18 @@ QMimeType::QMimeType() : \fn QMimeType::QMimeType(const QMimeTypeName &theName, const QString &theDisplayName, const QString &theIconUrl, - const QList<QString> &theFileExtentions); + const QList<QString> &theFilenameExtensions); \brief Initializes the attributes with the specified values. \a theName The ID of the action \a theDisplayName The description of the action to be displayed on user interfaces \a theIconUrl The file name of an icon image that represents the action - \a theFileExtentions The file extentions that are known to contain data of the MIME type + \a theFilenameExtensions The filename extensions that are known to contain data of the MIME type */ QMimeType::QMimeType(const QMimeTypeName &theName, const QString &theDisplayName, const QString &theIconUrl, - const QList<QString> &theFileExtentions) : - d_ptr(new QMimeTypePrivate(theName, theDisplayName, theIconUrl, theFileExtentions)) + const QList<QString> &theFilenameExtensions) : + d_ptr(new QMimeTypePrivate(theName, theDisplayName, theIconUrl, theFilenameExtensions)) {} // ------------------------------------------------------------------------------------------------ @@ -155,7 +155,7 @@ bool QMimeType::isValid() const return !d_ptr->m_Name.isEmpty() && !d_ptr->m_DisplayName.isEmpty() && !d_ptr->m_IconUrl.isEmpty() && - !d_ptr->m_FileExtentions.isEmpty(); + !d_ptr->m_FilenameExtensions.isEmpty(); } // ------------------------------------------------------------------------------------------------ @@ -200,10 +200,10 @@ const QString &QMimeType::iconUrl() const // ------------------------------------------------------------------------------------------------ /*! - \fn QList<QString> QMimeType::fileExtentions() const; - \brief Returns the file extentions that are known to contain data of the MIME type. + \fn QList<QString> QMimeType::filenameExtensions() const; + \brief Returns the filename extensions that are known to contain data of the MIME type. */ -const QList<QString> &QMimeType::fileExtentions() const +const QList<QString> &QMimeType::filenameExtensions() const { - return d_ptr->m_FileExtentions; + return d_ptr->m_FilenameExtensions; } diff --git a/src/mimetypes/qmimetype.h b/src/mimetypes/qmimetype.h index 8c2a4e9..d2797e7 100644 --- a/src/mimetypes/qmimetype.h +++ b/src/mimetypes/qmimetype.h @@ -65,7 +65,7 @@ public: QMimeType(const QMimeTypeName &theName, const QString &theDisplayName, const QString &theIconUrl, - const QList<QString> &theFileExtentions); + const QList<QString> &theFilenameExtensions); QMimeType(const QMimeType &other); QMimeType &operator=(const QMimeType &other); ~QMimeType(); @@ -82,7 +82,7 @@ public: const QMimeTypeName &name() const; const QString &displayName() const; const QString &iconUrl() const; - const QList<QString> &fileExtentions() const; + const QList<QString> &filenameExtensions() const; private: QScopedPointer<QMimeTypePrivate> d_ptr; diff --git a/src/mimetypes/qmimetype_p.h b/src/mimetypes/qmimetype_p.h index a0008de..71274ec 100644 --- a/src/mimetypes/qmimetype_p.h +++ b/src/mimetypes/qmimetype_p.h @@ -52,11 +52,11 @@ struct QMimeTypePrivate QMimeTypePrivate(const QMimeTypeName &theName, const QString &theDisplayName, const QString &theIconUrl, - const QList<QString> &theFileExtentions) : + const QList<QString> &theFilenameExtensions) : m_Name(theName), m_DisplayName(theDisplayName), m_IconUrl(theIconUrl), - m_FileExtentions(theFileExtentions) + m_FilenameExtensions(theFilenameExtensions) {} bool operator==(const QMimeTypePrivate &other) const @@ -64,13 +64,13 @@ struct QMimeTypePrivate return m_Name == other.m_Name && m_DisplayName == other.m_DisplayName && m_IconUrl == other.m_IconUrl && - m_FileExtentions == other.m_FileExtentions; + m_FilenameExtensions == other.m_FilenameExtensions; } QMimeTypeName m_Name; QString m_DisplayName; QString m_IconUrl; - QList<QString> m_FileExtentions; + QList<QString> m_FilenameExtensions; }; #endif diff --git a/src/mimetypes/qmimetyperegistry.cpp b/src/mimetypes/qmimetyperegistry.cpp index 882a86c..1cbdc29 100644 --- a/src/mimetypes/qmimetyperegistry.cpp +++ b/src/mimetypes/qmimetyperegistry.cpp @@ -277,7 +277,7 @@ /*! \class QMimeTypeRegistry - \brief QMimeTypeRegistry is the data store that manages mime types, service actions and file extentions. + \brief QMimeTypeRegistry is the data store that manages mime types, service actions and filename extensions. */ // ------------------------------------------------------------------------------------------------ @@ -339,21 +339,21 @@ // ------------------------------------------------------------------------------------------------ /*! - \fn QList<QString> QMimeTypeRegistry::fileExtentions() const; - \brief Returns a list of file extentions of all registered MIME types. + \fn QList<QString> QMimeTypeRegistry::filenameExtensions() const; + \brief Returns a list of filename extensions of all registered MIME types. */ // ------------------------------------------------------------------------------------------------ /*! - \fn QString QMimeTypeRegistry::extractFileExtention ( + \fn QString QMimeTypeRegistry::extractFilenameExtension ( const QString &fileName ) const; - \brief Extracts the file extention from the specified file name. + \brief Extracts the filename extension from the specified file name. - \a fileName A file name of which we need to determine the extention. + \a fileName A file name of which we need to determine the extension. - Will only extract as deep into the file name as there are file extentions known currently. + Will only extract as deep into the file name as there are filename extensions known currently. E.g. "a.b.c.tar.gz" will result in ".tar.gz". Returns an empty string if no knwn file extentipn coulb be extracted from the file name. @@ -363,11 +363,11 @@ /*! \fn QList<QMimeTypeName> QMimeTypeRegistry::findMimeTypes ( - const QString &fileExtention + const QString &filenameExtension ) const; - \brief Determines which MIME types use the specified file extention. + \brief Determines which MIME types use the specified filename extension. - \a fileExtention The file extention for which we need to perform the search. + \a filenameExtension The filename extension for which we need to perform the search. */ // ------------------------------------------------------------------------------------------------ diff --git a/src/mimetypes/qmimetyperegistry.h b/src/mimetypes/qmimetyperegistry.h index 8291ab5..186f061 100644 --- a/src/mimetypes/qmimetyperegistry.h +++ b/src/mimetypes/qmimetyperegistry.h @@ -72,14 +72,14 @@ public: // -------------------------------------------------------------------------------------------- - QList<QString> fileExtentions() const; + QList<QString> filenameExtensions() const; - QString extractFileExtention ( + QString extractFilenameExtension ( const QString &fileName ) const; QList<QMimeTypeName> findMimeTypes ( - const QString &fileExtention + const QString &filenameExtension ) const; // -------------------------------------------------------------------------------------------- diff --git a/src/mimetypes/qmimetyperegistry_empty.cpp b/src/mimetypes/qmimetyperegistry_empty.cpp index 85b0438..1afa317 100644 --- a/src/mimetypes/qmimetyperegistry_empty.cpp +++ b/src/mimetypes/qmimetyperegistry_empty.cpp @@ -83,7 +83,7 @@ QMimeType QMimeTypeRegistry::findMimeType ( // ------------------------------------------------------------------------------------------------ -QList<QString> QMimeTypeRegistry::fileExtentions() const +QList<QString> QMimeTypeRegistry::filenameExtensions() const { typedef QList<QString> Result; @@ -92,18 +92,18 @@ QList<QString> QMimeTypeRegistry::fileExtentions() const // ------------------------------------------------------------------------------------------------ -QString QMimeTypeRegistry::extractFileExtention ( +QString QMimeTypeRegistry::extractFilenameExtension ( const QString &fileName ) const { QString result; - const QList<QString> theFileExtentions (fileExtentions()); + const QList<QString> theFilenameExtensions (filenameExtensions()); - foreach (const QString &fileExtention, theFileExtentions) { - if (fileExtention.length() > result.length() && - fileName.right(fileExtention.length()) == fileExtention) { - result = fileExtention; + foreach (const QString &filenameExtension, theFilenameExtensions) { + if (filenameExtension.length() > result.length() && + fileName.right(filenameExtension.length()) == filenameExtension) { + result = filenameExtension; } } @@ -113,12 +113,12 @@ QString QMimeTypeRegistry::extractFileExtention ( // ------------------------------------------------------------------------------------------------ QList<QMimeTypeName> QMimeTypeRegistry::findMimeTypes ( - const QString &searchFileExtention + const QString &searchFilenameExtension ) const { typedef QList<QMimeTypeName> Result; - Q_UNUSED(searchFileExtention) + Q_UNUSED(searchFilenameExtension) return Result(); } |