Skip to content

Commit

Permalink
Fix Qt 5.7 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
calc84maniac authored and adriweb committed Sep 5, 2024
1 parent 33b9656 commit 60862c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions gui/qt/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1935,7 +1935,7 @@ QStringList MainWindow::varDialog(QFileDialog::AcceptMode mode, const QString &n
}

void MainWindow::varPressed(const QModelIndex &index) {
QModelIndex nameIndex = index.siblingAtColumn(VarTableModel::VAR_NAME_COL);
QModelIndex nameIndex = index.sibling(index.row(), VarTableModel::VAR_NAME_COL);
if (!nameIndex.isValid()) {
return;
}
Expand Down Expand Up @@ -2525,7 +2525,8 @@ void MainWindow::varLaunch(const calc_var_t *prgm) {
}

void MainWindow::contextVars(const QPoint& posa) {
QModelIndex nameIndex = ui->emuVarView->indexAt(posa).siblingAtColumn(VarTableModel::VAR_NAME_COL);
QModelIndex nameIndex = ui->emuVarView->indexAt(posa);
nameIndex = nameIndex.sibling(nameIndex.row(), VarTableModel::VAR_NAME_COL);
if (!nameIndex.isValid()) {
return;
}
Expand Down
4 changes: 2 additions & 2 deletions gui/qt/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -672,8 +672,8 @@ void MainWindow::checkUpdate(bool forceInfoBox) {
if (parseError.error != QJsonParseError::NoError || json.isNull()) {
goto updateCheckErr;
}
const auto tag_name = json[QStringLiteral("tag_name")].toString();
const auto name = json[QStringLiteral("name")].toString();
const auto tag_name = json.object().value(QStringLiteral("tag_name")).toString();
const auto name = json.object().value(QStringLiteral("name")).toString();
if (QStringLiteral(CEMU_VERSION).compare(tag_name) == 0) {
if (forceInfoBox) {
QMessageBox::information(this, tr("No update available"), tr("You already have the latest CEmu version") + QStringLiteral(" (" CEMU_VERSION ")"));
Expand Down

0 comments on commit 60862c8

Please sign in to comment.