citra-emu
/
citra
Archived
1
0
Fork 0

enum class

This commit is contained in:
BreadFish64 2018-01-20 09:56:02 -06:00
parent 169b076913
commit fc1bdc3c62
2 changed files with 5 additions and 5 deletions

View File

@ -24,6 +24,8 @@ CompatDB::CompatDB(QWidget* parent)
CompatDB::~CompatDB() = default; CompatDB::~CompatDB() = default;
enum class CompatDBPage { Intro = 0, Selection = 1, Final = 2 };
void CompatDB::Submit() { void CompatDB::Submit() {
QButtonGroup* compatibility = new QButtonGroup(this); QButtonGroup* compatibility = new QButtonGroup(this);
compatibility->addButton(ui->radioButton_Perfect, 0); compatibility->addButton(ui->radioButton_Perfect, 0);
@ -32,13 +34,13 @@ void CompatDB::Submit() {
compatibility->addButton(ui->radioButton_Bad, 3); compatibility->addButton(ui->radioButton_Bad, 3);
compatibility->addButton(ui->radioButton_IntroMenu, 4); compatibility->addButton(ui->radioButton_IntroMenu, 4);
compatibility->addButton(ui->radioButton_WontBoot, 5); compatibility->addButton(ui->radioButton_WontBoot, 5);
switch (currentId()) { switch ((static_cast<CompatDBPage>(currentId()))) {
case CompatDBPage::SelectionPage: case CompatDBPage::Selection:
if (compatibility->checkedId() == -1) { if (compatibility->checkedId() == -1) {
button(NextButton)->setEnabled(false); button(NextButton)->setEnabled(false);
} }
break; break;
case CompatDBPage::FinalPage: case CompatDBPage::Final:
LOG_DEBUG(Frontend, "Compatibility Rating: %d", compatibility->checkedId()); LOG_DEBUG(Frontend, "Compatibility Rating: %d", compatibility->checkedId());
Core::Telemetry().AddField(Telemetry::FieldType::UserFeedback, "Compatibility", Core::Telemetry().AddField(Telemetry::FieldType::UserFeedback, "Compatibility",
compatibility->checkedId()); compatibility->checkedId());

View File

@ -25,5 +25,3 @@ private slots:
void Submit(); void Submit();
void EnableNext(); void EnableNext();
}; };
enum CompatDBPage { IntroPage = 0, SelectionPage = 1, FinalPage = 2 };