From d44929ff813fcdc9c44e49491376cace21630234 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Thu, 27 Aug 2020 11:58:37 +0200 Subject: [PATCH] Properly report back if showDirectory() doesn't succeed --- src/frontends/qt/qt_helpers.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/frontends/qt/qt_helpers.cpp b/src/frontends/qt/qt_helpers.cpp index 20f58034c7..87b6593a71 100644 --- a/src/frontends/qt/qt_helpers.cpp +++ b/src/frontends/qt/qt_helpers.cpp @@ -290,12 +290,16 @@ void showDirectory(FileName const & directory) QUrl qurl(QUrl::fromLocalFile(QDir::toNativeSeparators(toqstr(directory.absFileName())))); // Give hints in case of bugs if (!qurl.isValid()) { - LYXERR0("QUrl is invalid!"); + frontend::Alert::error(_("Invalid URL"), + bformat(_("The URL `%1$s' could not be resolved."), + qstring_to_ucs4(qurl.url()))); return; } if (!QDesktopServices::openUrl(qurl)) - LYXERR0("Unable to open QUrl even though dir exists!"); + frontend::Alert::error(_("URL could not be accessed"), + bformat(_("The URL `%1$s' could not be opened although it exists!"), + qstring_to_ucs4(qurl.url()))); } void showTarget(string const & target, string const & pdfv, string const & psv)