Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAetf <aetf@unlimited-code.works>2021-09-19 02:55:37 +0300
committerJonathan White <support@dmapps.us>2021-10-17 05:50:04 +0300
commita31c5ba006198f2fdadfd6c4f587cfed602c81c6 (patch)
treebf652ca38ba5d1cf0e28e3e4422eaa6732d36170 /src/gui
parentb6716bdfe5b0430a62973cf2702198a233f27c02 (diff)
FdoSecrets: Implement unlock before search
Fixes #6942 and fixes #4443 - Return number of deleted entries - Fix minor memory leak - FdoSecrets: make all prompt truly async per spec and update tests * the waited signal may already be emitted before calling spy.wait(), causing the test to fail. This commit checks the count before waiting. * check unlock result after waiting for signal - FdoSecrets: implement unlockBeforeSearch option - FdoSecrets: make search always work regardless of entry group searching settings, fixes #6942 - FdoSecrets: cleanup gracefully even if some test failed - FdoSecrets: make it safe to call prompts concurrently - FdoSecrets: make sure in unit test we click on the correct dialog Note on the unit tests: objects are not deleted (due to deleteLater event not handled). So there may be multiple AccessControlDialog. But only one of it is visible and is the correctly one to click on. Before this change, a random one may be clicked on, causing the completed signal never be sent.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/GuiTools.cpp5
-rw-r--r--src/gui/GuiTools.h2
-rw-r--r--src/gui/entry/EditEntryWidget.cpp16
3 files changed, 12 insertions, 11 deletions
diff --git a/src/gui/GuiTools.cpp b/src/gui/GuiTools.cpp
index 7aeeeb7b0..30963b374 100644
--- a/src/gui/GuiTools.cpp
+++ b/src/gui/GuiTools.cpp
@@ -66,10 +66,10 @@ namespace GuiTools
}
}
- void deleteEntriesResolveReferences(QWidget* parent, const QList<Entry*>& entries, bool permanent)
+ size_t deleteEntriesResolveReferences(QWidget* parent, const QList<Entry*>& entries, bool permanent)
{
if (!parent || entries.isEmpty()) {
- return;
+ return 0;
}
QList<Entry*> selectedEntries;
@@ -116,5 +116,6 @@ namespace GuiTools
entry->database()->recycleEntry(entry);
}
}
+ return selectedEntries.size();
}
} // namespace GuiTools
diff --git a/src/gui/GuiTools.h b/src/gui/GuiTools.h
index 14a54ab75..814537382 100644
--- a/src/gui/GuiTools.h
+++ b/src/gui/GuiTools.h
@@ -26,6 +26,6 @@ class Entry;
namespace GuiTools
{
bool confirmDeleteEntries(QWidget* parent, const QList<Entry*>& entries, bool permanent);
- void deleteEntriesResolveReferences(QWidget* parent, const QList<Entry*>& entries, bool permanent);
+ size_t deleteEntriesResolveReferences(QWidget* parent, const QList<Entry*>& entries, bool permanent);
} // namespace GuiTools
#endif // KEEPASSXC_GUITOOLS_H
diff --git a/src/gui/entry/EditEntryWidget.cpp b/src/gui/entry/EditEntryWidget.cpp
index e736efaad..f9527966b 100644
--- a/src/gui/entry/EditEntryWidget.cpp
+++ b/src/gui/entry/EditEntryWidget.cpp
@@ -69,20 +69,20 @@ EditEntryWidget::EditEntryWidget(QWidget* parent)
, m_browserUi(new Ui::EditEntryWidgetBrowser())
, m_attachments(new EntryAttachments())
, m_customData(new CustomData())
- , m_mainWidget(new QScrollArea())
- , m_advancedWidget(new QWidget())
- , m_iconsWidget(new EditWidgetIcons())
- , m_autoTypeWidget(new QWidget())
+ , m_mainWidget(new QScrollArea(this))
+ , m_advancedWidget(new QWidget(this))
+ , m_iconsWidget(new EditWidgetIcons(this))
+ , m_autoTypeWidget(new QWidget(this))
#ifdef WITH_XC_SSHAGENT
- , m_sshAgentWidget(new QWidget())
+ , m_sshAgentWidget(new QWidget(this))
#endif
#ifdef WITH_XC_BROWSER
, m_browserSettingsChanged(false)
- , m_browserWidget(new QWidget())
+ , m_browserWidget(new QWidget(this))
, m_additionalURLsDataModel(new EntryURLModel(this))
#endif
- , m_editWidgetProperties(new EditWidgetProperties())
- , m_historyWidget(new QWidget())
+ , m_editWidgetProperties(new EditWidgetProperties(this))
+ , m_historyWidget(new QWidget(this))
, m_entryAttributes(new EntryAttributes(this))
, m_attributesModel(new EntryAttributesModel(m_advancedWidget))
, m_historyModel(new EntryHistoryModel(this))