mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-05 23:49:20 +00:00
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
This commit is contained in:
parent
3c1b04da47
commit
4f2c2b2714
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue