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

View File

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