Commit 4f2c2b27 authored by Albert Astals Cid's avatar Albert Astals Cid

Document::openRelativeFile: Double check the url changed when we asked to

If not, open did not succeed and the callers (for example open document
X in page A) would like to know so they don't have to do the "change to
part A" part.

BUGS: 429924
parent 3c1b04da
Pipeline #43122 passed with stage
in 31 minutes and 30 seconds
......@@ -762,14 +762,14 @@ QUrl DocumentPrivate::giveAbsoluteUrl(const QString &fileName) const
bool DocumentPrivate::openRelativeFile(const QString &fileName)
QUrl url = giveAbsoluteUrl(fileName);
if (url.isEmpty())
const QUrl newUrl = giveAbsoluteUrl(fileName);
if (newUrl.isEmpty())
return false;
qCDebug(OkularCoreDebug).nospace() << "openRelativeFile: '" << url << "'";
qCDebug(OkularCoreDebug).nospace() << "openRelativeFile: '" << newUrl << "'";
emit m_parent->openUrl(url);
return true;
emit m_parent->openUrl(newUrl);
return m_url == newUrl;
Generator *DocumentPrivate::loadGeneratorLibrary(const KPluginMetaData &service)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment