From 830fcef56171d1b6446afabdec6fbbc3ed2e0fe8 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Thu, 5 Jun 2008 20:22:46 +0000 Subject: [PATCH] handle relative paths in browse actions, second and hopefully better try svn path=/trunk/KDE/kdegraphics/okular/; revision=817344 --- core/document.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/core/document.cpp b/core/document.cpp index 3cf0c9e70..1038a6673 100644 --- a/core/document.cpp +++ b/core/document.cpp @@ -2749,19 +2749,16 @@ void Document::processAction( const Action * action ) return; } + KUrl realUrl = KUrl( url ); + // handle documents with relative path if ( d->m_url.isValid() ) { - KUrl completeUrl = KUrl( d->m_url.upUrl(), url ); - if ( completeUrl.isLocalFile() ) - { - d->openRelativeFile( completeUrl.url() ); - return; - } + realUrl = KUrl( d->m_url.upUrl(), url ); } // Albert: this is not a leak! - new KRun( KUrl( url ), widget() ); + new KRun( realUrl, widget() ); } } break;