diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2018-01-07 18:59:44 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2018-01-07 18:59:44 +0000 |
| commit | 7179591a4063fe8492f37fa363fbaa4ef6e62ba1 (patch) | |
| tree | 9a5e930419005dc16740abd1534755e650256c41 /src | |
| parent | 8eff3fc08bac320592b3db63911f5519fcb45801 (diff) | |
| download | qmmp-7179591a4063fe8492f37fa363fbaa4ef6e62ba1.tar.gz qmmp-7179591a4063fe8492f37fa363fbaa4ef6e62ba1.tar.bz2 qmmp-7179591a4063fe8492f37fa363fbaa4ef6e62ba1.zip | |
improved FileInfo class
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@7822 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
| -rw-r--r-- | src/qmmp/fileinfo.cpp | 10 | ||||
| -rw-r--r-- | src/qmmp/fileinfo.h | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/qmmp/fileinfo.cpp b/src/qmmp/fileinfo.cpp index bad4d9747..c813d003e 100644 --- a/src/qmmp/fileinfo.cpp +++ b/src/qmmp/fileinfo.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2016 by Ilya Kotov * + * Copyright (C) 2008-2018 by Ilya Kotov * * forkotov02@ya.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -42,14 +42,14 @@ FileInfo &FileInfo::operator=(const FileInfo &info) return *this; } -bool FileInfo::operator==(const FileInfo &info) +bool FileInfo::operator==(const FileInfo &info) const { return metaData () == info.metaData () && length () == info.length () && path() == info.path(); } -bool FileInfo::operator!=(const FileInfo &info) +bool FileInfo::operator!=(const FileInfo &info) const { return !operator==(info); } @@ -59,12 +59,12 @@ qint64 FileInfo::length () const return m_length; } -const QString FileInfo::metaData (Qmmp::MetaData key) const +const QString FileInfo::metaData(Qmmp::MetaData key) const { return m_metaData[key]; } -const QMap<Qmmp::MetaData, QString> FileInfo::metaData () const +const QMap<Qmmp::MetaData, QString> &FileInfo::metaData() const { return m_metaData; } diff --git a/src/qmmp/fileinfo.h b/src/qmmp/fileinfo.h index 97a6ff535..2b13170ed 100644 --- a/src/qmmp/fileinfo.h +++ b/src/qmmp/fileinfo.h @@ -51,11 +51,11 @@ public: /*! * Returns \b true if this FileInfo object refers to \b info; otherwise returns \b false. */ - bool operator==(const FileInfo &info); + bool operator==(const FileInfo &info) const; /*! * Returns \b false if this FileInfo object refers to \b info; otherwise returns \b true. */ - bool operator!=(const FileInfo &info); + bool operator!=(const FileInfo &info) const; /*! * Returnds file duration in seconds. */ @@ -63,11 +63,11 @@ public: /*! * Returns the metdata string associated with the given \b key. */ - const QString metaData (Qmmp::MetaData key) const; + const QString metaData(Qmmp::MetaData key) const; /*! * Returns all meta data in map. */ - const QMap<Qmmp::MetaData, QString> metaData () const; + const QMap<Qmmp::MetaData, QString> &metaData() const; /*! * Returns \b true if stream/file has no metadata, otherwise returns \b false */ @@ -98,7 +98,7 @@ public: void setPath(const QString &path); private: - QMap <Qmmp::MetaData, QString> m_metaData; + QMap<Qmmp::MetaData, QString> m_metaData; qint64 m_length; QString m_path; }; |
