Fix resolving placeholders in urls (#3281)

* Replace placeholders in URLs copied from popup menu on the entry preview widget.
* Replace placeholders in URLs opened by double-clicking URL field in the entry table.
This commit is contained in:
Aigale 2019-06-20 03:48:35 +03:00 committed by Jonathan White
parent e40f10657d
commit c5a93ca215
2 changed files with 2 additions and 2 deletions

View File

@ -696,7 +696,7 @@ void DatabaseWidget::openUrlForEntry(Entry* entry)
}
}
} else {
QUrl url = QUrl::fromUserInput(entry->url());
QUrl url = QUrl::fromUserInput(entry->resolveMultiplePlaceholders(entry->url()));
if (!url.isEmpty()) {
QDesktopServices::openUrl(url);
}

View File

@ -202,7 +202,7 @@ void EntryPreviewWidget::updateEntryGeneralTab()
const QString url = m_currentEntry->url();
if (!url.isEmpty()) {
// URL is well formed and can be opened in a browser
m_ui->entryUrlLabel->setUrl(url);
m_ui->entryUrlLabel->setUrl(m_currentEntry->resolveMultiplePlaceholders(url));
m_ui->entryUrlLabel->setCursor(Qt::PointingHandCursor);
m_ui->entryUrlLabel->setOpenExternalLinks(false);
} else {