From fcc31759f8c09e24f001c17549e95d65fc1a484c Mon Sep 17 00:00:00 2001 From: saturneric Date: Sun, 1 Dec 2024 22:14:06 +0100 Subject: [PATCH] fix: gnupg info not loading --- src/m_email/CMakeLists.txt | 2 +- src/m_gpg_info/GnuPGInfo.ui | 106 +++++++++++++++----- src/m_gpg_info/GnuPGInfoGatheringModule.cpp | 2 +- src/m_gpg_info/GnupgTab.cpp | 16 +-- src/m_paper_key/CMakeLists.txt | 2 +- 5 files changed, 94 insertions(+), 34 deletions(-) diff --git a/src/m_email/CMakeLists.txt b/src/m_email/CMakeLists.txt index b50eb5a..4ca0620 100644 --- a/src/m_email/CMakeLists.txt +++ b/src/m_email/CMakeLists.txt @@ -23,7 +23,7 @@ # # SPDX-License-Identifier: GPL-3.0-or-later -# com.bktus.gpgfrontend.module.integrated.gnupg_info_gathering +# com.bktus.gpgfrontend.module.integrated.email set(INTEGRATED_MODULE_SOURCE "") aux_source_directory(. INTEGRATED_MODULE_SOURCE) diff --git a/src/m_gpg_info/GnuPGInfo.ui b/src/m_gpg_info/GnuPGInfo.ui index 63e746a..9feff80 100644 --- a/src/m_gpg_info/GnuPGInfo.ui +++ b/src/m_gpg_info/GnuPGInfo.ui @@ -14,6 +14,18 @@ GnuPG Info + + 0 + + + 0 + + + 0 + + + 0 + @@ -43,10 +55,10 @@ - :/icons/gnupg.png + :/icons/gnupg.png - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter 10 @@ -59,7 +71,7 @@ Version - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter 5 @@ -75,49 +87,60 @@ - Qt::Horizontal + Qt::Orientation::Horizontal + + QTabWidget::TabPosition::South + - QTabWidget::Rounded + QTabWidget::TabShape::Triangular 0 - + + Qt::TextElideMode::ElideMiddle + + + true + + false + + true + Components + + 0 + + + 0 + + + 0 + + + 0 + - QAbstractScrollArea::AdjustToContents + QAbstractScrollArea::SizeAdjustPolicy::AdjustIgnored 16 - QAbstractItemView::NoEditTriggers - - - - - - - 0 - - - -1 - - - false + QAbstractItemView::EditTrigger::NoEditTriggers @@ -128,13 +151,25 @@ Directories + + 0 + + + 0 + + + 0 + + + 0 + - QAbstractScrollArea::AdjustToContents + QAbstractScrollArea::SizeAdjustPolicy::AdjustIgnored - QAbstractItemView::NoEditTriggers + QAbstractItemView::EditTrigger::NoEditTriggers @@ -145,6 +180,18 @@ Options + + 0 + + + 0 + + + 0 + + + 0 + @@ -154,6 +201,19 @@ + + + + 0 + + + -1 + + + false + + + diff --git a/src/m_gpg_info/GnuPGInfoGatheringModule.cpp b/src/m_gpg_info/GnuPGInfoGatheringModule.cpp index 2caaa94..c022e42 100644 --- a/src/m_gpg_info/GnuPGInfoGatheringModule.cpp +++ b/src/m_gpg_info/GnuPGInfoGatheringModule.cpp @@ -47,7 +47,7 @@ #include "GpgInfo.h" GF_MODULE_API_DEFINE("com.bktus.gpgfrontend.module.gnupg_info_gathering", - "GatherGnupgInfo", "1.0.1", + "GatherGnupgInfo", "1.1.0", "Try gathering gnupg information.", "Saturneric") DEFINE_TRANSLATIONS_STRUCTURE(ModuleGnuPGInfoGathering); diff --git a/src/m_gpg_info/GnupgTab.cpp b/src/m_gpg_info/GnupgTab.cpp index 6548316..7c64cdf 100644 --- a/src/m_gpg_info/GnupgTab.cpp +++ b/src/m_gpg_info/GnupgTab.cpp @@ -108,14 +108,14 @@ GnupgTab::GnupgTab(QWidget* parent) ui_->optionDetailsTable->setFocusPolicy(Qt::NoFocus); ui_->optionDetailsTable->setAlternatingRowColors(true); - auto future = (QThreadPool::globalInstance(), [=]() { - if (GFModuleRetrieveRTValueOrDefaultBool( - DUP("ui"), DUP("env.state.gnupg_info_gathering"), 0) == 1) { - process_software_info(); - } else { - gather_gnupg_info(); - } - }); + if (GFModuleRetrieveRTValueOrDefaultBool( + DUP("ui"), DUP("env.state.gnupg_info_gathering"), 0) == 1) { + process_software_info(); + + } else { + auto future = QtConcurrent::run(QThreadPool::globalInstance(), + [=]() { gather_gnupg_info(); }); + } } void GnupgTab::process_software_info() { diff --git a/src/m_paper_key/CMakeLists.txt b/src/m_paper_key/CMakeLists.txt index de2be24..f7d0c03 100644 --- a/src/m_paper_key/CMakeLists.txt +++ b/src/m_paper_key/CMakeLists.txt @@ -23,7 +23,7 @@ # # SPDX-License-Identifier: GPL-3.0-or-later -# com.bktus.gpgfrontend.module.integrated.gnupg_info_gathering +# com.bktus.gpgfrontend.module.integrated.paper_key set(INTEGRATED_MODULE_SOURCE "") aux_source_directory(. INTEGRATED_MODULE_SOURCE)