mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Remove the lastError from DeviceThreads
There is no reason for the DeviceThreads to keep a copy of the last error around, so this removes that code. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f7be6daacc
commit
4124052b38
3 changed files with 13 additions and 22 deletions
|
@ -547,7 +547,7 @@ void ConfigureDiveComputer::setError(QString err)
|
|||
void ConfigureDiveComputer::readThreadFinished()
|
||||
{
|
||||
setState(DONE);
|
||||
if (readThread->lastError.isEmpty()) {
|
||||
if (lastError.isEmpty()) {
|
||||
//No error
|
||||
emit message(tr("Dive computer details read successfully"));
|
||||
}
|
||||
|
@ -556,7 +556,7 @@ void ConfigureDiveComputer::readThreadFinished()
|
|||
void ConfigureDiveComputer::writeThreadFinished()
|
||||
{
|
||||
setState(DONE);
|
||||
if (writeThread->lastError.isEmpty()) {
|
||||
if (lastError.isEmpty()) {
|
||||
//No error
|
||||
emit message(tr("Setting successfully written to device"));
|
||||
}
|
||||
|
@ -565,7 +565,7 @@ void ConfigureDiveComputer::writeThreadFinished()
|
|||
void ConfigureDiveComputer::firmwareThreadFinished()
|
||||
{
|
||||
setState(DONE);
|
||||
if (firmwareThread->lastError.isEmpty()) {
|
||||
if (lastError.isEmpty()) {
|
||||
//No error
|
||||
emit message(tr("Device firmware successfully updated"));
|
||||
}
|
||||
|
@ -574,7 +574,7 @@ void ConfigureDiveComputer::firmwareThreadFinished()
|
|||
void ConfigureDiveComputer::resetThreadFinished()
|
||||
{
|
||||
setState(DONE);
|
||||
if (resetThread->lastError.isEmpty()) {
|
||||
if (lastError.isEmpty()) {
|
||||
//No error
|
||||
emit message(tr("Device settings successfully reset"));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue