diff options
author | saturneric <[email protected]> | 2024-10-26 13:43:14 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-10-26 13:43:14 +0000 |
commit | 24c28eb752aa611dd1670f3fa7ab6b358b052f1b (patch) | |
tree | 6a4f9af003fa4a86b7d7e29a965e37a231951092 /src/ui/widgets/KeyTable.cpp | |
parent | fix: thread concurrent crash issue (diff) | |
download | GpgFrontend-24c28eb752aa611dd1670f3fa7ab6b358b052f1b.tar.gz GpgFrontend-24c28eb752aa611dd1670f3fa7ab6b358b052f1b.zip |
fix: test basic operations of multi key db and solve issues
Diffstat (limited to 'src/ui/widgets/KeyTable.cpp')
-rw-r--r-- | src/ui/widgets/KeyTable.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/widgets/KeyTable.cpp b/src/ui/widgets/KeyTable.cpp index b2b1e755..bda294a4 100644 --- a/src/ui/widgets/KeyTable.cpp +++ b/src/ui/widgets/KeyTable.cpp @@ -77,13 +77,13 @@ KeyTable::KeyTable(QWidget* parent, QSharedPointer<GpgKeyTableModel> model, }); connect(this, &QTableView::doubleClicked, this, [this](const QModelIndex& index) { - auto key = - GpgKeyGetter::GetInstance().GetKey(GetKeyIdByRow(index.row())); + auto key = GpgKeyGetter::GetInstance(model_->GetGpgContextChannel()) + .GetKey(GetKeyIdByRow(index.row())); if (!key.IsGood()) { QMessageBox::critical(this, tr("Error"), tr("Key Not Found.")); return; } - new KeyDetailsDialog(key, this); + new KeyDetailsDialog(model_->GetGpgContextChannel(), key, this); }); } @@ -93,7 +93,7 @@ void KeyTable::SetFilterKeyword(const QString& keyword) { void KeyTable::RefreshModel(QSharedPointer<GpgKeyTableModel> model) { model_ = std::move(model); - proxy_model_.setSourceModel(model_.get()); + proxy_model_.ResetGpgKeyTableModel(model_); } auto KeyTable::IsRowChecked(int row) const -> bool { |