Hard code copy action for default attributes.
This commit is contained in:
@@ -288,6 +288,21 @@ void DatabaseWidget::deleteEntries()
|
||||
}
|
||||
}
|
||||
|
||||
void DatabaseWidget::copyTitle()
|
||||
{
|
||||
Entry* currentEntry = m_entryView->currentEntry();
|
||||
if (!currentEntry) {
|
||||
Q_ASSERT(false);
|
||||
return;
|
||||
}
|
||||
|
||||
clipboard()->setText(currentEntry->title());
|
||||
|
||||
if (config()->get("MinimizeOnCopy").toBool()) {
|
||||
window()->showMinimized();
|
||||
}
|
||||
}
|
||||
|
||||
void DatabaseWidget::copyUsername()
|
||||
{
|
||||
Entry* currentEntry = m_entryView->currentEntry();
|
||||
@@ -318,6 +333,36 @@ void DatabaseWidget::copyPassword()
|
||||
}
|
||||
}
|
||||
|
||||
void DatabaseWidget::copyURL()
|
||||
{
|
||||
Entry* currentEntry = m_entryView->currentEntry();
|
||||
if (!currentEntry) {
|
||||
Q_ASSERT(false);
|
||||
return;
|
||||
}
|
||||
|
||||
clipboard()->setText(currentEntry->url());
|
||||
|
||||
if (config()->get("MinimizeOnCopy").toBool()) {
|
||||
window()->showMinimized();
|
||||
}
|
||||
}
|
||||
|
||||
void DatabaseWidget::copyNotes()
|
||||
{
|
||||
Entry* currentEntry = m_entryView->currentEntry();
|
||||
if (!currentEntry) {
|
||||
Q_ASSERT(false);
|
||||
return;
|
||||
}
|
||||
|
||||
clipboard()->setText(currentEntry->notes());
|
||||
|
||||
if (config()->get("MinimizeOnCopy").toBool()) {
|
||||
window()->showMinimized();
|
||||
}
|
||||
}
|
||||
|
||||
void DatabaseWidget::copyAttribute(QAction* action)
|
||||
{
|
||||
Entry* currentEntry = m_entryView->currentEntry();
|
||||
|
||||
Reference in New Issue
Block a user