mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-26 08:15:32 -04:00
Code cleanups
This commit is contained in:
parent
d26cff520f
commit
0458dad6dc
1 changed files with 4 additions and 9 deletions
|
@ -453,20 +453,15 @@ void DatabaseWidget::openUrl()
|
||||||
|
|
||||||
void DatabaseWidget::openUrlForEntry(Entry* entry)
|
void DatabaseWidget::openUrlForEntry(Entry* entry)
|
||||||
{
|
{
|
||||||
QString UrlString = entry->url();
|
QString UrlString = entry->resolvePlaceholders(entry->url());
|
||||||
if (UrlString.isEmpty())
|
if (UrlString.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
UrlString.replace("{TITLE}", entry->title(), Qt::CaseInsensitive);
|
|
||||||
UrlString.replace("{USERNAME}", entry->username(), Qt::CaseInsensitive);
|
|
||||||
UrlString.replace("{PASSWORD}", entry->password(), Qt::CaseInsensitive);
|
|
||||||
|
|
||||||
if (UrlString.startsWith("cmd://") && UrlString.length()>6){
|
if (UrlString.startsWith("cmd://") && UrlString.length()>6){
|
||||||
QProcess::startDetached(UrlString.right(UrlString.length()-6));
|
QProcess::startDetached(UrlString.mid(6));
|
||||||
return;
|
} else {
|
||||||
}
|
|
||||||
|
|
||||||
QDesktopServices::openUrl(UrlString);
|
QDesktopServices::openUrl(UrlString);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue