Emit the successful message the right way

The successful message was emitted in a some what older way then the
other messages so it was always emitted, even on error.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Anton Lundin 2014-12-07 23:32:08 +01:00 committed by Dirk Hohndel
parent a696da9146
commit ac207ee5ff
4 changed files with 4 additions and 10 deletions

View file

@ -556,7 +556,10 @@ void ConfigureDiveComputer::setError(QString err)
void ConfigureDiveComputer::readThreadFinished()
{
setState(DONE);
emit readFinished();
if (readThread->lastError.isEmpty()) {
//No error
emit message(tr("Dive computer details read successfully"));
}
}
void ConfigureDiveComputer::writeThreadFinished()