summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-06-24 10:09:16 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-07-19 10:35:26 +0000
commit78bba7b0029f9c626f0c686339dec9a9bf9466c6 (patch)
tree4fc03e86a39b7b03383a0f1651c78a599445abe6 /src/gui
parent74a658599f84a2548186c616405e39d1430e4f6c (diff)
Clean up QZipReader::FileInfo
- don't define special member functions if the compiler-generated ones are just fine (inhibits move semantics) - implement all remaining methods inline - unexport - remove unused (and, to add insult to injury, never init'ed) d-pointer. This is private API. No need for a d-pointer, much less an unused one. Change-Id: I6979cb5103a361c0313c252d3bf7073a3c47addd Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/text/qzip.cpp32
-rw-r--r--src/gui/text/qzipreader_p.h14
2 files changed, 7 insertions, 39 deletions
diff --git a/src/gui/text/qzip.cpp b/src/gui/text/qzip.cpp
index 40088d573a..00a1aa397c 100644
--- a/src/gui/text/qzip.cpp
+++ b/src/gui/text/qzip.cpp
@@ -411,38 +411,6 @@ struct FileHeader
};
Q_DECLARE_TYPEINFO(FileHeader, Q_MOVABLE_TYPE);
-QZipReader::FileInfo::FileInfo()
- : isDir(false), isFile(false), isSymLink(false), crc(0), size(0)
-{
-}
-
-QZipReader::FileInfo::~FileInfo()
-{
-}
-
-QZipReader::FileInfo::FileInfo(const FileInfo &other)
-{
- operator=(other);
-}
-
-QZipReader::FileInfo& QZipReader::FileInfo::operator=(const FileInfo &other)
-{
- filePath = other.filePath;
- isDir = other.isDir;
- isFile = other.isFile;
- isSymLink = other.isSymLink;
- permissions = other.permissions;
- crc = other.crc;
- size = other.size;
- lastModified = other.lastModified;
- 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 7a18dc7340..e4026285b2 100644
--- a/src/gui/text/qzipreader_p.h
+++ b/src/gui/text/qzipreader_p.h
@@ -70,13 +70,14 @@ public:
bool isReadable() const;
bool exists() const;
- struct Q_GUI_EXPORT FileInfo
+ struct FileInfo
{
- FileInfo();
- FileInfo(const FileInfo &other);
- ~FileInfo();
- FileInfo &operator=(const FileInfo &other);
- bool isValid() const;
+ FileInfo() Q_DECL_NOTHROW
+ : isDir(false), isFile(false), isSymLink(false), crc(0), size(0)
+ {}
+
+ bool isValid() const Q_DECL_NOTHROW { return isDir || isFile || isSymLink; }
+
QString filePath;
uint isDir : 1;
uint isFile : 1;
@@ -85,7 +86,6 @@ public:
uint crc;
qint64 size;
QDateTime lastModified;
- void *d;
};
QList<FileInfo> fileInfoList() const;