diff options
author | Ritt Konstantin <ritt.ks@gmail.com> | 2010-03-10 11:30:08 (GMT) |
---|---|---|
committer | Benjamin Poulain <benjamin.poulain@nokia.com> | 2010-03-10 11:30:08 (GMT) |
commit | 17ab2405fab50497c1f79c8e513fcfdf31979974 (patch) | |
tree | d9d71817f6daba39a4074aa10eea460cf6bf4c4f /src | |
parent | 5746fb12c6e7353483cf130b83fb2ab88f0217a2 (diff) | |
download | Qt-17ab2405fab50497c1f79c8e513fcfdf31979974.zip Qt-17ab2405fab50497c1f79c8e513fcfdf31979974.tar.gz Qt-17ab2405fab50497c1f79c8e513fcfdf31979974.tar.bz2 |
Add isValid() method to QZipReader::FileInfo.
Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/text/qzip.cpp | 7 | ||||
-rw-r--r-- | src/gui/text/qzipreader_p.h | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/text/qzip.cpp b/src/gui/text/qzip.cpp index fab6891..5aa0a94 100644 --- a/src/gui/text/qzip.cpp +++ b/src/gui/text/qzip.cpp @@ -343,7 +343,7 @@ struct FileHeader }; QZipReader::FileInfo::FileInfo() - : isDir(false), isFile(true), isSymLink(false), crc32(0), size(0) + : isDir(false), isFile(false), isSymLink(false), crc32(0), size(0) { } @@ -368,6 +368,11 @@ QZipReader::FileInfo& QZipReader::FileInfo::operator=(const FileInfo &other) return *this; } +bool QZipReader::FileInfo::isValid() const +{ + return isDir || isFile || isSymLink; +} + class QZipPrivate { public: diff --git a/src/gui/text/qzipreader_p.h b/src/gui/text/qzipreader_p.h index d838957..4961e1c 100644 --- a/src/gui/text/qzipreader_p.h +++ b/src/gui/text/qzipreader_p.h @@ -81,6 +81,7 @@ public: FileInfo(const FileInfo &other); ~FileInfo(); FileInfo &operator=(const FileInfo &other); + bool isValid() const; QString filePath; uint isDir : 1; uint isFile : 1; |