mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Properly report back if showDirectory() doesn't succeed
This commit is contained in:
parent
ff14d0bd00
commit
d44929ff81
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user