Merge pull request #6702 from spycrab/qt_gecko_fixes
Qt/GeckoCode: Fix multiple bugs
This commit is contained in:
commit
732ebd42ee
|
@ -234,12 +234,13 @@ bool CheatCodeEditor::AcceptGecko()
|
||||||
|
|
||||||
QStringList values = line.split(QStringLiteral(" "));
|
QStringList values = line.split(QStringLiteral(" "));
|
||||||
|
|
||||||
bool good = true;
|
bool good = values.size() == 2;
|
||||||
|
|
||||||
u32 addr = 0;
|
u32 addr = 0;
|
||||||
u32 value = 0;
|
u32 value = 0;
|
||||||
|
|
||||||
addr = values[0].toUInt(&good, 16);
|
if (good)
|
||||||
|
addr = values[0].toUInt(&good, 16);
|
||||||
|
|
||||||
if (good)
|
if (good)
|
||||||
value = values[1].toUInt(&good, 16);
|
value = values[1].toUInt(&good, 16);
|
||||||
|
@ -272,7 +273,7 @@ bool CheatCodeEditor::AcceptGecko()
|
||||||
{
|
{
|
||||||
QMessageBox::critical(this, tr("Error"),
|
QMessageBox::critical(this, tr("Error"),
|
||||||
tr("The resulting decrypted AR code doesn't contain any lines."));
|
tr("The resulting decrypted AR code doesn't contain any lines."));
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_gecko_code->name = m_name_edit->text().toStdString();
|
m_gecko_code->name = m_name_edit->text().toStdString();
|
||||||
|
|
|
@ -115,6 +115,7 @@ void GeckoCodeWidget::ConnectWidgets()
|
||||||
connect(m_code_list, &QListWidget::itemChanged, this, &GeckoCodeWidget::OnItemChanged);
|
connect(m_code_list, &QListWidget::itemChanged, this, &GeckoCodeWidget::OnItemChanged);
|
||||||
|
|
||||||
connect(m_add_code, &QPushButton::pressed, this, &GeckoCodeWidget::AddCode);
|
connect(m_add_code, &QPushButton::pressed, this, &GeckoCodeWidget::AddCode);
|
||||||
|
connect(m_remove_code, &QPushButton::pressed, this, &GeckoCodeWidget::RemoveCode);
|
||||||
connect(m_edit_code, &QPushButton::pressed, this, &GeckoCodeWidget::EditCode);
|
connect(m_edit_code, &QPushButton::pressed, this, &GeckoCodeWidget::EditCode);
|
||||||
connect(m_download_codes, &QPushButton::pressed, this, &GeckoCodeWidget::DownloadCodes);
|
connect(m_download_codes, &QPushButton::pressed, this, &GeckoCodeWidget::DownloadCodes);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue