Skip to content

Commit

Permalink
Fixed #40 - New QSO, display of existing data from previous QSO
Browse files Browse the repository at this point in the history
  • Loading branch information
foldynl committed Apr 12, 2022
1 parent 407f60c commit 9ea477c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ui/NewContactWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,12 @@ void NewContactWidget::queryDatabase(QString callsign)

QSqlQuery query;

if ( !query.prepare("SELECT name, qth, gridsquare "
if ( !query.prepare("SELECT name_intl, "
" qth_intl, "
" gridsquare, "
" notes_intl, "
" email, "
" web "
"FROM contacts "
"WHERE callsign = :callsign "
"ORDER BY start_time DESC LIMIT 1") )
Expand All @@ -422,6 +427,10 @@ void NewContactWidget::queryDatabase(QString callsign)
ui->nameEdit->setText(query.value(0).toString());
ui->qthEdit->setText(query.value(1).toString());
ui->gridEdit->setText(query.value(2).toString());
ui->noteEdit->insertPlainText(query.value(3).toString());
ui->emailEdit->setText(query.value(4).toString());
ui->urlEdit->setText(query.value(5).toString());

emit filterCallsign(callsign);
}
else
Expand Down

0 comments on commit 9ea477c

Please sign in to comment.