Code cleanups
This commit is contained in:
@@ -453,21 +453,16 @@ 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);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DatabaseWidget::createGroup()
|
void DatabaseWidget::createGroup()
|
||||||
|
|||||||
Reference in New Issue
Block a user