From b9da827e7305beb4fd06e7f20042d5eae009f5bc Mon Sep 17 00:00:00 2001 From: Michel Ludwig Date: Fri, 9 Sep 2011 21:59:59 +0100 Subject: [PATCH] When 'closeUrl()' is complete, also clear the currently set URL. This allows applications to detect whether a document is loaded simply by checking whether 'url()' returns an empty URL or not. --- part.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/part.cpp b/part.cpp index f0d706895..7d56efd1b 100644 --- a/part.cpp +++ b/part.cpp @@ -1161,7 +1161,10 @@ bool Part::closeUrl() #ifdef OKULAR_KEEP_FILE_OPEN m_keeper->close(); #endif - return KParts::ReadOnlyPart::closeUrl(); + bool r = KParts::ReadOnlyPart::closeUrl(); + setUrl(KUrl()); + + return r; }