mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
attributes: unbreak copy-to-clipboard on KDE
The 'text' property of the QAction gets mangled by KDE when it adds its own accelerator shortcuts. But the data property is ours. Use that for keying instead. Signed-off-by: Steven Noonan <steven@uplinklabs.net>
This commit is contained in:
parent
4c9dcf5c98
commit
386b78b896
@ -598,7 +598,7 @@ void DatabaseWidget::copyAttribute(QAction* action)
|
||||
return;
|
||||
}
|
||||
|
||||
setClipboardTextAndMinimize(currentEntry->resolveMultiplePlaceholders(currentEntry->attributes()->value(action->text())));
|
||||
setClipboardTextAndMinimize(currentEntry->resolveMultiplePlaceholders(currentEntry->attributes()->value(action->data().toString())));
|
||||
}
|
||||
|
||||
void DatabaseWidget::setClipboardTextAndMinimize(const QString& text)
|
||||
|
@ -499,6 +499,7 @@ void MainWindow::updateCopyAttributesMenu()
|
||||
const QStringList customEntryAttributes = dbWidget->customEntryAttributes();
|
||||
for (const QString& key : customEntryAttributes) {
|
||||
QAction* action = m_ui->menuEntryCopyAttribute->addAction(key);
|
||||
action->setData(QVariant(key));
|
||||
m_copyAdditionalAttributeActions->addAction(action);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user