mirror of
https://github.com/QuasarApp/QuasarAppLib.git
synced 2025-04-27 10:14:38 +00:00
31 lines
627 B
C++
31 lines
627 B
C++
/*
|
|
* Copyright (C) 2018-2022 QuasarApp.
|
|
* Distributed under the lgplv3 software license, see the accompanying
|
|
* Everyone is permitted to copy and distribute verbatim copies
|
|
* of this license document, but changing it is not allowed.
|
|
*/
|
|
|
|
#include "doctortest.h"
|
|
#include "ipill.h"
|
|
|
|
namespace QuasarAppUtils {
|
|
|
|
DoctorTest::DoctorTest() {
|
|
}
|
|
|
|
bool DoctorTest::test(const QSharedPointer<iPill> &pill,
|
|
bool appIsBroken) const {
|
|
|
|
if (pill->diagnostic() != appIsBroken) {
|
|
return false;
|
|
}
|
|
|
|
if (appIsBroken && !pill->fix()) {
|
|
return false;
|
|
}
|
|
|
|
return pill->diagnostic();
|
|
}
|
|
|
|
}
|