Commit 13d14942 authored by Pino Toscano's avatar Pino Toscano

first step of a KPDF -> okular conversion: copy the data file for the document...

first step of a KPDF -> okular conversion: copy the data file for the document to be opened to the new place

svn path=/trunk/KDE/kdegraphics/okular/; revision=656648
parent 2e024d6d
......@@ -28,6 +28,7 @@ Bugs and wishes to close when moving okular to kdegraphics:
In progress [working on]:
-> core: forms support (mainly for pdf) (BR91809)
-> bookmarks: improved interface, with easy handling of the bookmarks of all the documents (BR99787,BR136113)
-> KPDF -> okular conversion of datafiles {document data(in progress), kwallet passwords(missing)}
-> inverse search (BR113191)
find with an usability expert the "best" way to activate such a link
provide a configuration widget to choose the editor and configure a custom one
......
......@@ -745,9 +745,19 @@ bool Document::openDocument( const QString & docFile, const KUrl& url, const KMi
d->m_url = url;
d->m_docFileName = docFile;
QString fn = docFile.contains('/') ? docFile.section('/', -1, -1) : docFile;
fn = "kpdf/" + QString::number(fileReadTest.size()) + '.' + fn + ".xml";
fn = QString::number(fileReadTest.size()) + '.' + fn + ".xml";
fileReadTest.close();
d->m_xmlFileName = KStandardDirs::locateLocal( "data", fn );
QString newokular = "okular/docdata/" + fn;
QString newokularfile = KStandardDirs::locateLocal( "data", newokular );
QString oldkpdf = "kpdf/" + fn;
QString oldkpdffile = KStandardDirs::locateLocal( "data", oldkpdf );
if ( QFile::exists( oldkpdffile ) && !QFile::exists( newokularfile ) )
{
// ### copy or move?
if ( !QFile::copy( oldkpdffile, newokularfile ) )
return false;
}
d->m_xmlFileName = newokularfile;
}
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