From acab77c691437da1b042d38534d03ccc4ab2ef2f Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Sat, 15 Nov 2008 00:34:03 +0000 Subject: [PATCH] add a loadDocumentInfo() variant that takes the file name to read stuff from, and make the non-parameters one calling the new one svn path=/trunk/KDE/kdegraphics/okular/; revision=884461 --- core/document.cpp | 7 ++++++- core/document_p.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/core/document.cpp b/core/document.cpp index d2b4495b1..c6ba68e23 100644 --- a/core/document.cpp +++ b/core/document.cpp @@ -301,7 +301,12 @@ void DocumentPrivate::loadDocumentInfo() if ( m_xmlFileName.isEmpty() ) return; - QFile infoFile( m_xmlFileName ); + loadDocumentInfo( m_xmlFileName ); +} + +void DocumentPrivate::loadDocumentInfo( const QString &fileName ) +{ + QFile infoFile( fileName ); if ( !infoFile.exists() || !infoFile.open( QIODevice::ReadOnly ) ) return; diff --git a/core/document_p.h b/core/document_p.h index 6c930db18..5673dc6ac 100644 --- a/core/document_p.h +++ b/core/document_p.h @@ -95,6 +95,7 @@ class DocumentPrivate qulonglong getTotalMemory(); qulonglong getFreeMemory(); void loadDocumentInfo(); + void loadDocumentInfo( const QString &fileName ); void loadViewsInfo( View *view, const QDomElement &e ); void saveViewsInfo( View *view, QDomElement &e ) const; QString giveAbsolutePath( const QString & fileName ) const;