Make debugging cleaner

Don't try to connect the globe when NOMARBLE is active.

Check exisistance before trying to open an image file.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Robert C. Helling 2015-07-31 22:25:43 +02:00 committed by Dirk Hohndel
parent faa1c28100
commit 260ea879e5
2 changed files with 3 additions and 1 deletions

View file

@ -841,7 +841,7 @@ QByteArray hashFile(const QString filename)
{
QCryptographicHash hash(QCryptographicHash::Sha1);
QFile imagefile(filename);
if (imagefile.open(QIODevice::ReadOnly)) {
if (imagefile.exists() && imagefile.open(QIODevice::ReadOnly)) {
hash.addData(&imagefile);
add_hash(filename, hash.result());
return hash.result();