remotes/origin/KDE/4.10
Albert Astals Cid 13 years ago
parent 942628db47
commit a6d53df7ac
  1. 30
      core/document.cpp

@ -1815,23 +1815,23 @@ bool Document::openDocument( const QString & docFile, const KUrl& url, const KMi
d->m_docFileName = docFile;
if ( url.isLocalFile() && !d->m_archiveData )
{
QString fn = url.fileName();
document_size = fileReadTest.size();
fn = QString::number( document_size ) + '.' + fn + ".xml";
QString newokular = "okular/docdata/" + fn;
QString newokularfile = KStandardDirs::locateLocal( "data", newokular );
if ( !QFile::exists( newokularfile ) )
{
QString oldkpdf = "kpdf/" + fn;
QString oldkpdffile = KStandardDirs::locateLocal( "data", oldkpdf );
if ( QFile::exists( oldkpdffile ) )
QString fn = url.fileName();
document_size = fileReadTest.size();
fn = QString::number( document_size ) + '.' + fn + ".xml";
QString newokular = "okular/docdata/" + fn;
QString newokularfile = KStandardDirs::locateLocal( "data", newokular );
if ( !QFile::exists( newokularfile ) )
{
// ### copy or move?
if ( !QFile::copy( oldkpdffile, newokularfile ) )
return false;
QString oldkpdf = "kpdf/" + fn;
QString oldkpdffile = KStandardDirs::locateLocal( "data", oldkpdf );
if ( QFile::exists( oldkpdffile ) )
{
// ### copy or move?
if ( !QFile::copy( oldkpdffile, newokularfile ) )
return false;
}
}
}
d->m_xmlFileName = newokularfile;
d->m_xmlFileName = newokularfile;
}
}
else

Loading…
Cancel
Save