mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-04 08:55:31 -05:00
parent
0aba77ee55
commit
54afbe6a2f
@ -197,6 +197,7 @@ DatabaseWidget::DatabaseWidget(QSharedPointer<Database> db, QWidget* parent)
|
||||
connect(m_previewSplitter, SIGNAL(splitterMoved(int,int)), SIGNAL(splitterSizesChanged()));
|
||||
connect(this, SIGNAL(currentModeChanged(DatabaseWidget::Mode)), m_previewView, SLOT(setDatabaseMode(DatabaseWidget::Mode)));
|
||||
connect(m_previewView, SIGNAL(entryUrlActivated(Entry*)), SLOT(openUrlForEntry(Entry*)));
|
||||
connect(m_previewView, SIGNAL(copyTextRequested(const QString&)), SLOT(setClipboardTextAndMinimize(const QString&)));
|
||||
connect(m_entryView, SIGNAL(viewStateChanged()), SIGNAL(entryViewStateChanged()));
|
||||
connect(m_groupView, SIGNAL(groupSelectionChanged()), SLOT(onGroupChanged()));
|
||||
connect(m_groupView, &GroupView::groupFocused, this, [this] { m_previewView->setGroup(currentGroup()); });
|
||||
|
@ -193,6 +193,7 @@ public slots:
|
||||
void performAutoTypePassword();
|
||||
void performAutoTypePasswordEnter();
|
||||
void performAutoTypeTOTP();
|
||||
void setClipboardTextAndMinimize(const QString& text);
|
||||
void openUrl();
|
||||
void downloadSelectedFavicons();
|
||||
void downloadAllFavicons();
|
||||
@ -267,7 +268,6 @@ private slots:
|
||||
|
||||
private:
|
||||
int addChildWidget(QWidget* w);
|
||||
void setClipboardTextAndMinimize(const QString& text);
|
||||
void processAutoOpen();
|
||||
void openDatabaseFromEntry(const Entry* entry, bool inBackground = true);
|
||||
void performIconDownloads(const QList<Entry*>& entries, bool force = false, bool downloadInBackground = false);
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include "Application.h"
|
||||
#include "core/Config.h"
|
||||
#include "core/Totp.h"
|
||||
#include "gui/Clipboard.h"
|
||||
#include "gui/Font.h"
|
||||
#include "gui/Icons.h"
|
||||
#if defined(WITH_XC_KEESHARE)
|
||||
@ -85,10 +84,10 @@ EntryPreviewWidget::EntryPreviewWidget(QWidget* parent)
|
||||
});
|
||||
connect(&m_totpTimer, SIGNAL(timeout()), SLOT(updateTotpLabel()));
|
||||
|
||||
connect(m_ui->entryAttributesTable, &QTableWidget::itemDoubleClicked, this, [](QTableWidgetItem* item) {
|
||||
connect(m_ui->entryAttributesTable, &QTableWidget::itemDoubleClicked, this, [this](QTableWidgetItem* item) {
|
||||
auto userData = item->data(Qt::UserRole);
|
||||
if (userData.isValid()) {
|
||||
clipboard()->setText(userData.toString());
|
||||
emit copyTextRequested(userData.toString());
|
||||
}
|
||||
});
|
||||
|
||||
@ -119,7 +118,7 @@ bool EntryPreviewWidget::eventFilter(QObject* object, QEvent* event)
|
||||
{
|
||||
if (object == m_ui->entryTotpLabel && event->type() == QEvent::MouseButtonDblClick) {
|
||||
if (m_currentEntry && m_currentEntry->hasTotp()) {
|
||||
clipboard()->setText(m_currentEntry->totp());
|
||||
emit copyTextRequested(m_currentEntry->totp());
|
||||
m_ui->entryTotpLabel->clearFocus();
|
||||
return true;
|
||||
}
|
||||
|
@ -46,6 +46,7 @@ public slots:
|
||||
|
||||
signals:
|
||||
void entryUrlActivated(Entry* entry);
|
||||
void copyTextRequested(const QString& text);
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject* object, QEvent* event) override;
|
||||
|
Loading…
x
Reference in New Issue
Block a user