mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-15 05:32:21 +00:00
QZip improvements (#4768)
Removed unused constructors Replaced raw pointer with a unique_ptr to clearly pass ownership. Fixed a bug where we compared if a signed integer is negative (it never is). Fixed a case where we take the pointer to a pointer we de-reference!
This commit is contained in:
@@ -67,8 +67,8 @@ class ZipReader
|
||||
{
|
||||
public:
|
||||
ZipReader(const QString &fileName, QIODevice::OpenMode mode = QIODevice::ReadOnly );
|
||||
explicit ZipReader(std::unique_ptr<QIODevice> device);
|
||||
|
||||
explicit ZipReader(QIODevice *device);
|
||||
~ZipReader();
|
||||
|
||||
QIODevice* device() const;
|
||||
@@ -114,8 +114,7 @@ public:
|
||||
void close();
|
||||
|
||||
private:
|
||||
ZipReaderPrivate *d;
|
||||
Q_DISABLE_COPY(ZipReader)
|
||||
std::unique_ptr<ZipReaderPrivate> d;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
Reference in New Issue
Block a user