mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-29 13:23:02 -08:00
Improve file dialog filter for adding custom icons.
This commit is contained in:
1 parent
5a08e4619c
commit
ce0007acd2
3 files changed
+24
-1
No files matched your search
@@ -422,8 +422,11 @@ void EditEntryWidget::removeCurrentAttachment()
|
||||
void EditEntryWidget::addCustomIcon()
|
||||
{
|
||||
if (m_metadata) {
|
||||
QString filter = QString("%1 (%2);;%3 (*.*)").arg(tr("Images"),
|
||||
Tools::imageReaderFilter(), tr("All files"));
|
||||
|
||||
QString filename = QFileDialog::getOpenFileName(
|
||||
this, tr("Select Image"), "", tr("Image Files (*.png *.jpg *.bmp)"));
|
||||
this, tr("Select Image"), "", filter);
|
||||
if (!filename.isEmpty()) {
|
||||
QImage image(filename);
|
||||
if (!image.isNull()) {
|
||||
|
||||
Reference in new issue
Block a user