Commit 02dde103 authored by Pino Toscano's avatar Pino Toscano

for now, don't create xml storage files for non-local urls, as the local name will always change

svn path=/trunk/KDE/kdegraphics/okular/; revision=755447
parent 6848a3ec
...@@ -486,7 +486,7 @@ ConfigInterface* DocumentPrivate::generatorConfig( GeneratorInfo& info ) ...@@ -486,7 +486,7 @@ ConfigInterface* DocumentPrivate::generatorConfig( GeneratorInfo& info )
void DocumentPrivate::saveDocumentInfo() const void DocumentPrivate::saveDocumentInfo() const
{ {
if ( m_docFileName.isEmpty() ) if ( m_xmlFileName.isEmpty() )
return; return;
QFile infoFile( m_xmlFileName ); QFile infoFile( m_xmlFileName );
...@@ -1089,6 +1089,8 @@ bool Document::openDocument( const QString & docFile, const KUrl& url, const KMi ...@@ -1089,6 +1089,8 @@ bool Document::openDocument( const QString & docFile, const KUrl& url, const KMi
// determine the related "xml document-info" filename // determine the related "xml document-info" filename
d->m_url = url; d->m_url = url;
d->m_docFileName = docFile; d->m_docFileName = docFile;
if ( url.isLocalFile() )
{
QString fn = docFile.contains('/') ? docFile.section('/', -1, -1) : docFile; QString fn = docFile.contains('/') ? docFile.section('/', -1, -1) : docFile;
document_size = fileReadTest.size(); document_size = fileReadTest.size();
fn = QString::number( document_size ) + '.' + fn + ".xml"; fn = QString::number( document_size ) + '.' + fn + ".xml";
...@@ -1107,6 +1109,7 @@ bool Document::openDocument( const QString & docFile, const KUrl& url, const KMi ...@@ -1107,6 +1109,7 @@ bool Document::openDocument( const QString & docFile, const KUrl& url, const KMi
} }
} }
d->m_xmlFileName = newokularfile; d->m_xmlFileName = newokularfile;
}
} }
else else
{ {
......
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