BDecisionProvider: Make YesNoDecisionNeeded() non-abstract.
- A subset of jobs that require a BContext don't in fact make use of the decision provider. As such, make the default implementation usable for those cases so one doesn't need to always create a dummy derived class.
This commit is contained in:
parent
a7a7aaaf3d
commit
672795a37e
@ -25,7 +25,7 @@ struct BDecisionProvider {
|
|||||||
virtual bool YesNoDecisionNeeded(const BString& description,
|
virtual bool YesNoDecisionNeeded(const BString& description,
|
||||||
const BString& question,
|
const BString& question,
|
||||||
const BString& yes, const BString& no,
|
const BString& yes, const BString& no,
|
||||||
const BString& defaultChoice) = 0;
|
const BString& defaultChoice);
|
||||||
// virtual bool ActionsAcceptanceDecisionNeeded(
|
// virtual bool ActionsAcceptanceDecisionNeeded(
|
||||||
// const BString& description,
|
// const BString& description,
|
||||||
// const BString& question) = 0;
|
// const BString& question) = 0;
|
||||||
|
@ -29,6 +29,15 @@ BDecisionProvider::~BDecisionProvider()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
BDecisionProvider::YesNoDecisionNeeded(const BString& description,
|
||||||
|
const BString& question, const BString& yes, const BString& no,
|
||||||
|
const BString& defaultChoice)
|
||||||
|
{
|
||||||
|
return defaultChoice == yes;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
BContext::BContext(BDecisionProvider& decisionProvider,
|
BContext::BContext(BDecisionProvider& decisionProvider,
|
||||||
BJobStateListener& jobStateListener)
|
BJobStateListener& jobStateListener)
|
||||||
:
|
:
|
||||||
|
Loading…
Reference in New Issue
Block a user