Skip to content

Commit

Permalink
Open links and urls in AppImage
Browse files Browse the repository at this point in the history
* Fixes #8721
  • Loading branch information
droidmonkey committed Apr 29, 2024
1 parent 04fac24 commit 4f12f57
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gui/DatabaseWidget.cpp
Expand Up @@ -971,7 +971,11 @@ void DatabaseWidget::openUrlForEntry(Entry* entry)
} else {
QUrl url = QUrl::fromUserInput(entry->resolveMultiplePlaceholders(entry->url()));
if (!url.isEmpty()) {
#ifdef KEEPASSXC_DIST_APPIMAGE
QProcess::execute("xdg-open", {url.toString(QUrl::FullyEncoded)});
#else
QDesktopServices::openUrl(url);
#endif

if (config()->get(Config::MinimizeOnOpenUrl).toBool()) {
getMainWindow()->minimizeOrHide();
Expand Down
4 changes: 4 additions & 0 deletions src/gui/MainWindow.cpp
Expand Up @@ -1205,7 +1205,11 @@ void MainWindow::showUpdateCheckDialog()

void MainWindow::customOpenUrl(QString url)
{
#ifdef KEEPASSXC_DIST_APPIMAGE
QProcess::execute("xdg-open", {url});
#else
QDesktopServices::openUrl(QUrl(url));
#endif
}

void MainWindow::openDonateUrl()
Expand Down

0 comments on commit 4f12f57

Please sign in to comment.