diff options
author | Ritt Konstantin <ritt.ks@gmail.com> | 2010-03-10 11:30:07 (GMT) |
---|---|---|
committer | Benjamin Poulain <benjamin.poulain@nokia.com> | 2010-03-10 11:30:07 (GMT) |
commit | 5746fb12c6e7353483cf130b83fb2ab88f0217a2 (patch) | |
tree | ffbc1a520933e74d5944e664fc7e305715d62295 | |
parent | 11859316dbe9a5745a7faf93fbe38a1aec9fbbe8 (diff) | |
download | Qt-5746fb12c6e7353483cf130b83fb2ab88f0217a2.zip Qt-5746fb12c6e7353483cf130b83fb2ab88f0217a2.tar.gz Qt-5746fb12c6e7353483cf130b83fb2ab88f0217a2.tar.bz2 |
Add `QIODevice* device() const` public method to QZip classes.
allows to fetch some extra info from the used device (errorString() for ex.)
Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
-rw-r--r-- | src/gui/text/qzip.cpp | 16 | ||||
-rw-r--r-- | src/gui/text/qzipreader_p.h | 2 | ||||
-rw-r--r-- | src/gui/text/qzipwriter_p.h | 2 |
3 files changed, 20 insertions, 0 deletions
diff --git a/src/gui/text/qzip.cpp b/src/gui/text/qzip.cpp index d30c996..fab6891 100644 --- a/src/gui/text/qzip.cpp +++ b/src/gui/text/qzip.cpp @@ -750,6 +750,14 @@ QZipReader::~QZipReader() } /*! + Returns device used for reading zip archive. +*/ +QIODevice* QZipReader::device() const +{ + return d->device; +} + +/*! Returns true if the user can read the file; otherwise returns false. */ bool QZipReader::isReadable() const @@ -1022,6 +1030,14 @@ QZipWriter::~QZipWriter() } /*! + Returns device used for writing zip archive. +*/ +QIODevice* QZipWriter::device() const +{ + return d->device; +} + +/*! Returns true if the user can write to the archive; otherwise returns false. */ bool QZipWriter::isWritable() const diff --git a/src/gui/text/qzipreader_p.h b/src/gui/text/qzipreader_p.h index 9b73373..d838957 100644 --- a/src/gui/text/qzipreader_p.h +++ b/src/gui/text/qzipreader_p.h @@ -70,6 +70,8 @@ public: explicit QZipReader(QIODevice *device); ~QZipReader(); + QIODevice* device() const; + bool isReadable() const; bool exists() const; diff --git a/src/gui/text/qzipwriter_p.h b/src/gui/text/qzipwriter_p.h index 9322f4a..a50c172 100644 --- a/src/gui/text/qzipwriter_p.h +++ b/src/gui/text/qzipwriter_p.h @@ -69,6 +69,8 @@ public: explicit QZipWriter(QIODevice *device); ~QZipWriter(); + QIODevice* device() const; + bool isWritable() const; bool exists() const; |