mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 06:15:26 +00:00
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:
parent
faa1c28100
commit
260ea879e5
2 changed files with 3 additions and 1 deletions
|
@ -463,7 +463,9 @@ void MainTab::updateDiveInfo(bool clear)
|
|||
// I don't like this code here - but globe() wasn't initialized on the constructor.
|
||||
{
|
||||
QListView *completerListview = qobject_cast<QListView*>(ui.location->completer()->popup());
|
||||
#ifndef NO_MARBLE
|
||||
connect(completerListview, SIGNAL(entered(QModelIndex)), GlobeGPS::instance(), SLOT(centerOnIndex(QModelIndex)), Qt::UniqueConnection);
|
||||
#endif
|
||||
}
|
||||
|
||||
EditMode rememberEM = editMode;
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue