Commit 93491b4f authored by Albert Astals Cid's avatar Albert Astals Cid

Merge remote-tracking branch 'origin/Applications/14.12'

parents 24006bb9 10a18990
......@@ -909,6 +909,7 @@ Document::OpenResult DocumentPrivate::openDocumentInternal( const KService::Ptr&
QString propName = offer->name();
QHash< QString, GeneratorInfo >::const_iterator genIt = m_loadedGenerators.constFind( propName );
QString catalogName;
m_walletGenerator = 0;
if ( genIt != m_loadedGenerators.constEnd() )
{
m_generator = genIt.value().generator;
......@@ -978,6 +979,8 @@ Document::OpenResult DocumentPrivate::openDocumentInternal( const KService::Ptr&
m_generator->d_func()->m_document = 0;
QObject::disconnect( m_generator, 0, m_parent, 0 );
// TODO this is a hack just for 14.12 not to break API
m_walletGenerator = m_generator;
m_generator = 0;
qDeleteAll( m_pagesVector );
......@@ -2560,6 +2563,7 @@ void Document::closeDocument()
}
d->m_generator = 0;
d->m_generatorName = QString();
d->m_walletGenerator = 0;
d->m_url = KUrl();
d->m_docFileName = QString();
d->m_xmlFileName = QString();
......@@ -4550,6 +4554,8 @@ void Document::walletDataForFile( const QString &fileName, QString *walletName,
{
if (d->m_generator) {
d->m_generator->walletDataForFile( fileName, walletName, walletFolder, walletKey );
} else if (d->m_walletGenerator) {
d->m_walletGenerator->walletDataForFile( fileName, walletName, walletFolder, walletKey );
}
}
......
......@@ -92,6 +92,7 @@ class DocumentPrivate
m_memCheckTimer( 0 ),
m_saveBookmarksTimer( 0 ),
m_generator( 0 ),
m_walletGenerator( 0 ),
m_generatorsLoaded( false ),
m_pageController( 0 ),
m_closingLoop( 0 ),
......@@ -246,6 +247,7 @@ class DocumentPrivate
QHash<QString, GeneratorInfo> m_loadedGenerators;
Generator * m_generator;
QString m_generatorName;
Generator * m_walletGenerator;
bool m_generatorsLoaded;
QVector< Page * > m_pagesVector;
QVector< VisiblePageRect * > m_pageRects;
......
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