mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-27 11:40:07 +00:00
look for the old kpdf stuff only if the "new okular" stuff is not found
svn path=/trunk/KDE/kdegraphics/okular/; revision=710703
This commit is contained in:
parent
18afc2df79
commit
f72692799e
|
@ -1171,14 +1171,17 @@ bool Document::openDocument( const QString & docFile, const KUrl& url, const KMi
|
|||
fileReadTest.close();
|
||||
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 ) && !QFile::exists( newokularfile ) )
|
||||
if ( QFile::exists( oldkpdffile ) )
|
||||
{
|
||||
// ### copy or move?
|
||||
if ( !QFile::copy( oldkpdffile, newokularfile ) )
|
||||
return false;
|
||||
}
|
||||
}
|
||||
d->m_xmlFileName = newokularfile;
|
||||
}
|
||||
else
|
||||
|
|
5
part.cpp
5
part.cpp
|
@ -121,9 +121,10 @@ m_cliPresentation(false), m_generatorGuiClient(0)
|
|||
{
|
||||
// first necessary step: copy the configuration from kpdf, if available
|
||||
QString newokularconffile = KStandardDirs::locateLocal( "config", "okularpartrc" );
|
||||
QString oldkpdfconffile = KStandardDirs::locateLocal( "config", "kpdfpartrc" );
|
||||
if ( !QFile::exists( newokularconffile ) && QFile::exists( oldkpdfconffile ) )
|
||||
if ( !QFile::exists( newokularconffile ) )
|
||||
{
|
||||
QString oldkpdfconffile = KStandardDirs::locateLocal( "config", "kpdfpartrc" );
|
||||
if ( QFile::exists( oldkpdfconffile ) )
|
||||
QFile::copy( oldkpdfconffile, newokularconffile );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue