1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Code cleanup

This commit is contained in:
Martin Tůma 2017-04-15 13:13:26 +02:00
parent dfb69b2755
commit e26fa92ce6
2 changed files with 7 additions and 0 deletions

View File

@ -90,6 +90,9 @@ bool OZF::readTileTable()
bool OZF::load(const QString &path) bool OZF::load(const QString &path)
{ {
if (_file.isOpen())
_file.close();
_file.setFileName(path); _file.setFileName(path);
if (!_file.open(QIODevice::ReadOnly)) if (!_file.open(QIODevice::ReadOnly))
return false; return false;

View File

@ -50,6 +50,10 @@ bool Tar::load(const QString &path)
quint64 size; quint64 size;
qint64 ret; qint64 ret;
if (_file.isOpen())
_file.close();
_index.clear();
_file.setFileName(path); _file.setFileName(path);
if (!_file.open(QIODevice::ReadOnly)) if (!_file.open(QIODevice::ReadOnly))
return false; return false;