Skip to content

Commit

Permalink
HIBP: Display a message in the table if everything is clean
Browse files Browse the repository at this point in the history
  • Loading branch information
wolframroesler committed Mar 14, 2020
1 parent b46760f commit 1257cbf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/gui/reports/ReportsWidgetHibp.cpp
Expand Up @@ -125,6 +125,12 @@ void ReportsWidgetHibp::makeHibpTable() {
row[0]->setForeground(QBrush(QColor("red")));
}

// If we're done and everything is good, display a motivational message
if (m_pwQueue.isEmpty() && m_pwPwned.isEmpty() && m_error.isEmpty()) {
m_referencesModel->clear();
m_referencesModel->setHorizontalHeaderLabels(QStringList() << tr("Congratulations, no exposed passwords!"));
}

m_ui->hibpTableView->resizeRowsToContents();
}

Expand Down Expand Up @@ -173,6 +179,7 @@ void ReportsWidgetHibp::checkNext()
if (m_pwQueue.empty()) {
m_downloader.reset();
m_ui->progressBar->hide();
makeHibpTable();
return;
}

Expand Down

0 comments on commit 1257cbf

Please sign in to comment.