mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +01:00
Cosmetics
This commit is contained in:
parent
bac55e317b
commit
eee4f31369
@ -180,7 +180,7 @@ bool OZF::readTileTable()
|
||||
bool OZF::open()
|
||||
{
|
||||
if (!_file.open(QIODevice::ReadOnly)) {
|
||||
_error = _file.errorString();
|
||||
_errorString = _file.errorString();
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -188,13 +188,13 @@ bool OZF::open()
|
||||
return true;
|
||||
|
||||
if (!readHeaders()) {
|
||||
_error = "Invalid header";
|
||||
_errorString = "Invalid header";
|
||||
_file.close();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!readTileTable()) {
|
||||
_error = "Invalid tile table";
|
||||
_errorString = "Invalid tile table";
|
||||
_file.close();
|
||||
return false;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ public:
|
||||
|
||||
bool open();
|
||||
void close() {_file.close();}
|
||||
const QString &errorString() const {return _error;}
|
||||
const QString &errorString() const {return _errorString;}
|
||||
|
||||
QString fileName() const {return _file.fileName();}
|
||||
bool isOpen() const {return _file.isOpen();}
|
||||
@ -50,7 +50,7 @@ private:
|
||||
quint8 _key;
|
||||
QList<Zoom> _zooms;
|
||||
QFile _file;
|
||||
QString _error;
|
||||
QString _errorString;
|
||||
};
|
||||
|
||||
#endif // OZF_H
|
||||
|
@ -47,7 +47,7 @@ static quint64 number(const char* data, size_t size, int base = 8)
|
||||
bool Tar::open()
|
||||
{
|
||||
if (!_file.open(QIODevice::ReadOnly)) {
|
||||
_error = _file.errorString();
|
||||
_errorString = _file.errorString();
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ bool Tar::loadTar()
|
||||
if (ret < BLOCKSIZE) {
|
||||
_file.close();
|
||||
_index.clear();
|
||||
_error = "Error reading header block";
|
||||
_errorString = "Error reading header block";
|
||||
return false;
|
||||
}
|
||||
size = number(hdr->size, sizeof(hdr->size));
|
||||
@ -82,7 +82,7 @@ bool Tar::loadTar()
|
||||
if (!_file.seek(_file.pos() + BLOCKCOUNT(size) * BLOCKSIZE)) {
|
||||
_file.close();
|
||||
_index.clear();
|
||||
_error = "Error skipping data blocks";
|
||||
_errorString = "Error skipping data blocks";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ public:
|
||||
|
||||
bool open();
|
||||
void close() {_file.close();}
|
||||
const QString &errorString() const {return _error;}
|
||||
const QString &errorString() const {return _errorString;}
|
||||
|
||||
QStringList files() const {return _index.keys();}
|
||||
QByteArray file(const QString &name);
|
||||
@ -27,7 +27,7 @@ private:
|
||||
|
||||
QFile _file;
|
||||
QMap<QString, quint64> _index;
|
||||
QString _error;
|
||||
QString _errorString;
|
||||
};
|
||||
|
||||
#endif // TAR_H
|
||||
|
Loading…
Reference in New Issue
Block a user