diff options
author | Saturneric <[email protected]> | 2023-02-11 14:10:09 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2023-02-11 14:10:09 +0000 |
commit | 6a75817c85b0d4a97cea82ad2331736cff9913cf (patch) | |
tree | 261b01c4dc55a28241694a5e292d9fc5c77b6319 /src/ui/widgets/KeyList.cpp | |
parent | feat: upgrade qt framework to 6.3 (diff) | |
download | GpgFrontend-6a75817c85b0d4a97cea82ad2331736cff9913cf.tar.gz GpgFrontend-6a75817c85b0d4a97cea82ad2331736cff9913cf.zip |
fix: reduce info level logs
Diffstat (limited to 'src/ui/widgets/KeyList.cpp')
-rw-r--r-- | src/ui/widgets/KeyList.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/ui/widgets/KeyList.cpp b/src/ui/widgets/KeyList.cpp index 246e3d5a..e426ed48 100644 --- a/src/ui/widgets/KeyList.cpp +++ b/src/ui/widgets/KeyList.cpp @@ -100,7 +100,7 @@ void KeyList::AddListGroupTab( const QString& name, KeyListRow::KeyType selectType, KeyListColumn::InfoType infoType, const std::function<bool(const GpgKey&)>& filter) { - SPDLOG_INFO("called: {}", name.toStdString()); + SPDLOG_DEBUG("add tab: {}", name.toStdString()); auto key_list = new QTableWidget(this); if (m_key_list_ == nullptr) { @@ -158,7 +158,7 @@ void KeyList::AddListGroupTab( } void KeyList::SlotRefresh() { - SPDLOG_INFO("called address: {}", static_cast<void*>(this)); + SPDLOG_DEBUG("refresh, address: {}", static_cast<void*>(this)); ui_->refreshKeyListButton->setDisabled(true); ui_->syncButton->setDisabled(true); @@ -317,7 +317,7 @@ void KeyList::dropEvent(QDropEvent* event) { bool confirm_import_keys = true; try { confirm_import_keys = settings.lookup("general.confirm_import_keys"); - SPDLOG_INFO("confirm_import_keys: {}", confirm_import_keys); + SPDLOG_DEBUG("confirm_import_keys: {}", confirm_import_keys); if (confirm_import_keys) checkBox->setCheckState(Qt::Checked); } catch (...) { SPDLOG_ERROR("setting operation error: confirm_import_keys"); @@ -358,7 +358,7 @@ void KeyList::dropEvent(QDropEvent* event) { QFile file; file.setFileName(tmp.toLocalFile()); if (!file.open(QIODevice::ReadOnly)) { - SPDLOG_INFO("couldn't open file: {}", tmp.toString().toStdString()); + SPDLOG_ERROR("couldn't open file: {}", tmp.toString().toStdString()); } QByteArray inBuffer = file.readAll(); this->import_keys(inBuffer); @@ -418,7 +418,7 @@ std::string KeyList::GetSelectedKey() { } void KeyList::slot_refresh_ui() { - SPDLOG_INFO("called: {}", static_cast<void*>(buffered_keys_list_.get())); + SPDLOG_DEBUG("refresh: {}", static_cast<void*>(buffered_keys_list_.get())); if (buffered_keys_list_ != nullptr) { std::lock_guard<std::mutex> guard(buffered_key_list_mutex_); for (auto& key_table : m_key_tables_) { @@ -450,8 +450,8 @@ void KeyList::slot_sync_with_key_server() { CommonUtils::SlotImportKeyFromKeyServer( key_ids, [=](const std::string& key_id, const std::string& status, size_t current_index, size_t all_index) { - SPDLOG_INFO("called: {} {} {} {}", key_id, status, current_index, - all_index); + SPDLOG_DEBUG("import key: {} {} {} {}", key_id, status, current_index, + all_index); auto key = GpgKeyGetter::GetInstance().GetKey(key_id); boost::format status_str = boost::format(_("Sync [%1%/%2%] %3% %4%")) % @@ -502,7 +502,7 @@ KeyIdArgsListPtr& KeyTable::GetChecked() { auto& ret = checked_key_ids_; for (int i = 0; i < buffered_keys_.size(); i++) { auto key_id = buffered_keys_[i].GetId(); - SPDLOG_INFO("i: {} key_id: {}", i, key_id); + SPDLOG_DEBUG("i: {} key_id: {}", i, key_id); if (key_list_->item(i, 0)->checkState() == Qt::Checked && std::find(ret->begin(), ret->end(), key_id) == ret->end()) { ret->push_back(key_id); @@ -512,7 +512,6 @@ KeyIdArgsListPtr& KeyTable::GetChecked() { } void KeyTable::SetChecked(KeyIdArgsListPtr key_ids) { - SPDLOG_INFO("called"); checked_key_ids_ = std::move(key_ids); } @@ -534,14 +533,14 @@ void KeyTable::Refresh(KeyLinkListPtr m_keys) { int row_count = 0; while (it != keys->end()) { - SPDLOG_INFO("filtering key id: {}", it->GetId()); + SPDLOG_DEBUG("filtering key id: {}", it->GetId()); if (filter_ != nullptr) { if (!filter_(*it)) { it = keys->erase(it); continue; } } - SPDLOG_INFO("adding key id: {}", it->GetId()); + SPDLOG_DEBUG("adding key id: {}", it->GetId()); if (select_type_ == KeyListRow::ONLY_SECRET_KEY && !it->IsPrivateKey()) { it = keys->erase(it); continue; @@ -624,8 +623,8 @@ void KeyTable::Refresh(KeyLinkListPtr m_keys) { tmp3->setFont(strike); } - SPDLOG_INFO("key id: {} added into key_list_: {}", it->GetId(), - static_cast<void*>(this)); + SPDLOG_DEBUG("key id: {} added into key_list_: {}", it->GetId(), + static_cast<void*>(this)); // move to buffered keys buffered_keys_.emplace_back(std::move(*it)); |